[Cmake] critical/crash bug
Marco Nolden
m.nolden at dkfz-heidelberg.de
Thu, 25 Mar 2004 15:53:16 +0100
I have created a test case which could be related to the crash problem:
Just two lines in a CMakeLists.txt file:
INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake )
PROJECT(foo)
gives me the following output after the first invocation of cmake:
-- Looking for XOpenDisplay in
/usr/X11R6/lib/libX11.so;/usr/X11R6/lib/libXext.so
CMake Error: This should not have happen. If you see this message, you
are probably using a broken CMakeLists.txt file or a problematic release
of CMake
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Looking for XOpenDisplay in
/usr/X11R6/lib/libX11.so;/usr/X11R6/lib/libXext.so - not found
-- Looking for dnet_ntoa in dnet
CMake Error: This should not have happen. If you see this message, you
are probably using a broken CMakeLists.txt file or a problematic release
of CMake
CMake Error: Internal CMake error, TryCompile configure of cmake failed
... snipped ...
If I switch the lines:
PROJECT(foo)
INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake )
everything's fine.
Unfortunately I'm actually using a lot of PROJECT and INCLUDE commands
in our project.
Any ideas?
> William A. Hoffman wrote:
>
>> I am not sure why it is crashing, but you should
>> figure out this problem first:
>>
>> CMake Error: Error in cmake code at
>> /opt/linux-gcc3/vtk-4.2/src/CMake/vtkLoadCMakeExtensions.cmake:23:
>> LOAD_COMMAND Attempt to load command failed from file :
>> libcmVTK_GENERATE_JAVA_DEPENDENCIES.so CMake Error: Error in cmake
>> code at /opt/linux-gcc3/vtk-4.2/src/UseVTK.cmake:27: A command failed
>> during the invocation of macro "VTK_LOAD_CMAKE_EXTENSIONS".
>>
>> Looks like for some reason it can not load a dynamic command.
>> What OS? What version of CMAke? Please post the CMakeError.log
>> and CMakeOutput.log files as they may have some clues as to
>> what is going on.
>
>
> It's cmake 1.8.3 on Linux (SuSE 9.0, gcc 3.3.1, glibc 2.3.2)
>
> The vtk-related error messages stopped appearing since I did a fresh VTK
> install. But now I also think it's something basic that doesn't work.
> Another indication in that direction:
> After removing all CMake-generated files I get the following error after
> the first 'cmake .' invocation. CMakeLists.txt contains an
> INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake):
>
> ========================================
> nolden at ford:~/work/ip++> cmake .
> ford
> -- Using Buildname: -
> CMake Error: Error in cmake code at
> /home/nolden/cmake-local/share/CMake/Modules/Dart.cmake:106:
> BUILD_COMMAND called with incorrect number of arguments
> CMake Error: Error in cmake code at
> /home/nolden/cmake-local/share/CMake/Modules/Dart.cmake:106:
> BUILD_COMMAND called with incorrect number of arguments
> -- Check for working C compiler: gcc
> CMake Error: Internal CMake error, TryCompile configure of cmake failed
> -- Check for working C compiler: gcc -- broken
> The C compiler "gcc" is not able to compile a simple test program.
> It fails with the following output:
>
>
> CMake will not be able to correctly generate this project.
> -- Configuring done
> ========================================
>
> CMakeError.log contains only this:
>
> ========================================
> Determining if the C compiler works failed with the following output:
>
>
> ========================================
>
> This problem does not occur if I remove the
> INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
> statement.
>
>
> A second 'cmake .' finishes with no errors:
> ========================================
> nolden at ford:~/work/ip++> cmake .
> -- Using Buildname: -c++
> -- Check for working C compiler: gcc
> -- Check for working C compiler: gcc -- works
> -- Check for working CXX compiler: c++
> -- Check for working CXX compiler: c++ -- works
> -- setting MBI-specific configuration
> -- Looking for XOpenDisplay in
> /usr/X11R6/lib/libX11.so;/usr/X11R6/lib/libXext.so
> -- Looking for XOpenDisplay in
> /usr/X11R6/lib/libX11.so;/usr/X11R6/lib/libXext.so - found
> -- Looking for gethostbyname
> -- Looking for gethostbyname - found
> -- Looking for connect
> -- Looking for connect - found
> -- Looking for remove
> -- Looking for remove - found
> -- Looking for shmat
> -- Looking for shmat - found
> -- Looking for IceConnectionNumber in ICE
> -- Looking for IceConnectionNumber in ICE - found
> -- Looking for pthread.h
> -- Looking for pthread.h - found
> -- Looking for pthread_create in pthreads
> -- Looking for pthread_create in pthreads - not found
> -- Looking for pthread_create in pthread
> -- Looking for pthread_create in pthread - found
> -- Checking to see if CXX compiler acepts flag -Wno-deprecated
> -- Checking to see if CXX compiler acepts flag -Wno-deprecated - yes
> -- Configuring done
> -- Generating done
> ========================================
>
> After that I invoke 'make':
>
> ========================================
> nolden at ford:~/work/ip++> make
> make cmake.depends
> make[1]: Entering directory `/home/nolden/work/ip++'
> Building dependencies. cmake.depends...
> /home/nolden/cmake-local/bin/cmake -S/home/nolden/work/ip++
> -O/home/nolden/work/ip++ -H/home/nolden/work/ip++ -B/home/nolden/work/ip++
> -- Using Buildname: -c++
> make[1]: Leaving directory `/home/nolden/work/ip++'
> make cmake.check_depends
> make[1]: Entering directory `/home/nolden/work/ip++'
> make[1]: `cmake.check_depends' is up to date.
> make[1]: Leaving directory `/home/nolden/work/ip++'
> make -f cmake.check_depends
> make[1]: Entering directory `/home/nolden/work/ip++'
> cmake.depends is up-to-date
> make[1]: Leaving directory `/home/nolden/work/ip++'
> make all
> make[1]: Entering directory `/home/nolden/work/ip++'
> /home/nolden/work/ip++/Build/MITK: building default_target
> make[2]: Entering directory `/home/nolden/work/ip++/Build/MITK'
> make cmake.depends
> make[3]: Entering directory `/home/nolden/work/ip++/Build/MITK'
> Building dependencies. cmake.depends...
> /home/nolden/cmake-local/bin/cmake -S/home/nolden/work/ip++/Build/MITK
> -O/home/nolden/work/ip++/Build/MITK -H/home/nolden/work/ip++
> -B/home/nolden/work/ip++
> -- setting MBI-specific configuration
> -- Checking to see if CXX compiler acepts flag -Wno-deprecated
> -- Checking to see if CXX compiler acepts flag -Wno-deprecated - yes
> make[3]: Leaving directory `/home/nolden/work/ip++/Build/MITK'
> make cmake.check_depends
> make[3]: Entering directory `/home/nolden/work/ip++/Build/MITK'
> make[3]: `cmake.check_depends' is up to date.
> make[3]: Leaving directory `/home/nolden/work/ip++/Build/MITK'
> make -f cmake.check_depends
> make[3]: Entering directory `/home/nolden/work/ip++/Build/MITK'
> make[3]: Leaving directory `/home/nolden/work/ip++/Build/MITK'
> make all
> make[3]: Entering directory `/home/nolden/work/ip++/Build/MITK'
> make[3]: Nothing to be done for `all'.
> make[3]: Leaving directory `/home/nolden/work/ip++/Build/MITK'
> make[2]: Leaving directory `/home/nolden/work/ip++/Build/MITK'
> /home/nolden/work/ip++/Applications/MITKSampleApp: building default_target
> make[2]: Entering directory
> `/home/nolden/work/ip++/Applications/MITKSampleApp'
> make cmake.depends
> make[3]: Entering directory
> `/home/nolden/work/ip++/Applications/MITKSampleApp'
> Building dependencies. cmake.depends...
> /home/nolden/cmake-local/bin/cmake
> -S/home/nolden/work/ip++/Applications/MITKSampleApp
> -O/home/nolden/work/ip++/Applications/MITKSampleApp
> -H/home/nolden/work/ip++ -B/home/nolden/work/ip++
> /home/nolden/work/ip++
> make[3]: *** [cmake.depends] Aborted
> make[3]: Leaving directory
> `/home/nolden/work/ip++/Applications/MITKSampleApp'
> make[2]: *** [default_target] Error 2
> make[2]: Leaving directory
> `/home/nolden/work/ip++/Applications/MITKSampleApp'
> make[1]: *** [default_target_Applications_MITKSampleApp] Error 2
> make[1]: Leaving directory `/home/nolden/work/ip++'
> make: *** [default_target] Error 2
> ========================================
>
>>
>> Also, there may be some useful information in your [..] stuff.
>> If you could show all the output from cmake /opt/linux-gcc3/vtk-4.2/src/
>
> I changed our vtk setup a bit, so right now I can't reproduce exactly
> the situation when I filed the bug report. Maybe you already know my
> problem from the information above.
>
> Thanks,
>
> Marco
>
>
>>
>> -Bill
>>
>> At 04:48 AM 3/15/2004, Marco Nolden wrote:
>>
>>> Hi,
>>>
>>> I've reported a bug to the bugtracker which is blocking our software
>>> release:
>>>
>>> http://www.cmake.org/Bug/bug.php?op=show&bugid=605&pos=0
>>>
>>> Unfortunately I wasn't able to create a simple example reproducing
>>> the error. I only know it's related to using the SUBDIRS command. Not
>>> using SUBDIRS works sometimes. Does anyone have an idea, what the
>>> reason may be? I'm completely stuck at this point now and any hints
>>> will be highly appreciated.
>>>
>>> Marco
>>> _______________________________________________
>>> Cmake mailing list
>>> Cmake at www.cmake.org
>>> http://www.cmake.org/mailman/listinfo/cmake
>>
>>
>>
>>
>
>
--
----------------------------------------------------------------------
Dipl.-Inform. Med. Marco Nolden
Deutsches Krebsforschungszentrum (German Cancer Research Center)
Div. Medical & Biological Informatics Tel: (+49) 6221-42 2325
Im Neuenheimer Feld 280 Fax: (+49) 6221-42 2345
D-69120 Heidelberg eMail: M.Nolden at dkfz.de