[Cmake] Re: [vtkusers] Error while building VTK 4.2.1 with CMake on Linux

Bill Hoffman bill.hoffman at kitware.com
Mon Mar 10 12:26:36 EST 2003


Well, that is a completely different story....

Is this a binary cmake that you downloaded from Kitware, or did you build it?
Can you run ccmake in gdb, and see if there is any information on
where the crash is?

-Bill


At 11:51 AM 3/10/2003, Joseph Barraud wrote:
>You are perfectly right. This error message is in the CMakeError.log. In fact, ccmake just says "segmentation fault" and that's all.
>Here is my CheckLibraryExists.cmake :
>
>#
># Check if the function exists.
>#
># CHECK_LIBRARY_EXISTS - macro which checks if the function exists
># FUNCTION - the name of the function
># VARIABLE - variable to store the result
>#
>
>MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
>  IF("${VARIABLE}" MATCHES "^${VARIABLE}$")
>    SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION
>        "-DCHECK_FUNCTION_EXISTS=${FUNCTION} ${CMAKE_REQUIRED_FLAGS}")
>    MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
>    SET(CHECK_LIBRARY_EXISTS_LIBRARIES ${LIBRARY})
>    IF(CMAKE_REQUIRED_LIBRARIES)
>      SET(CHECK_LIBRARY_EXISTS_LIBRARIES
>          ${CHECK_LIBRARY_EXISTS_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
>    ENDIF(CMAKE_REQUIRED_LIBRARIES)
>    TRY_COMPILE(${VARIABLE}
>               ${CMAKE_BINARY_DIR}
>               ${CMAKE_ROOT}/Modules/CheckFunctionExists.c
>               CMAKE_FLAGS
>                 -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_LIBRARY_EXISTS_DEFINITION}
>                 -DLINK_DIRECTORIES:STRING=${LOCATION}
>                 "-DLINK_LIBRARIES:STRING=${CHECK_LIBRARY_EXISTS_LIBRARIES}"
>               OUTPUT_VARIABLE OUTPUT)
>
>    IF(${VARIABLE})
>      MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
>      SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
>    ELSE(${VARIABLE})
>      MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
>      SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
>      WRITE_FILE(${CMAKE_BINARY_DIR}/CMakeError.log
>        "Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
>        "failed with the following output:\n"
>        "${OUTPUT}\n" APPEND)
>    ENDIF(${VARIABLE})
>  ENDIF("${VARIABLE}" MATCHES "^${VARIABLE}$")
>ENDMACRO(CHECK_LIBRARY_EXISTS)
>
>Joseph.
>
>
>
>At 11:22 10/03/2003 -0500, Andy Cedilnik wrote:
>>Hi Joseph,
>>
>>The error you are referring to should never be displayed. It is written
>>into a file called CMakeError.log. Have you modified Modules from CMake
>>directory? Could you please send me your CheckLibraryExists.cmake?
>>
>>Thank you.
>>
>>                        Andy
>>
>>On Mon, 2003-03-10 at 11:03, Joseph Barraud wrote:
>>> Hi,
>>>
>>> Thanks for your answer.
>>> I am using the latest version of Cmake (1.6.5). My purpose is to instal ITK
>>> with all the available options and demonstration applications. So I started
>>> with the installation of Cmake, then GCC_XML, Cable and FLTK (with the
>>> options shared libraries and threads activated). So I am at the "VTK
>>> stage". Everything worked fine so far (I hope so).
>>>
>>> To run the process, I have "untared" the source file, then I made a
>>> directory vtk-build. I launched ccmake from this directory with:
>>>
>>> ccmake ../VTK-4.2.1
>>>
>>> The error occurs before the display of all the options in ccmake.
>>> I have the latest Mandrake (gcc 3.2.2) and I have installed almost
>>> everything concerning development. I do have pthread.h in /usr/include and
>>> a number of files called thread-something in various places. I don't
>>> understand what's wrong with this pthread_create that seems to be a very
>>> basic function.
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake






More information about the CMake mailing list