[Cmake] Error while building VTK 4.2.1 with CMake on Linux
Joseph Barraud
jbar02 at esc.cam.ac.uk
Mon Mar 10 10:16:57 EST 2003
Dear all,
I am on Linux Mandrake 9.1 and CMake gives me the following error message
when I try to configure the makefiles for the building of VTK 4.2.1 (i.e.
with ccmake, before the display of the list of options):
Determining if the function pthread_create exists in the pthreads failed
with the following output:
echo "Building object file CheckFunctionExists.o..."
Building object file CheckFunctionExists.o...
gcc -o
CheckFunctionExists.o -DCHECK_FUNCTION_EXISTS=pthread_create
-I/home/joseph/ITK_Stuff/VTK/vtk-build/CMakeTmp -c
/usr/local/share/CMake/Modules/CheckFunctionExists.c
echo "Building executable cmTryCompileExec..."
Building executable cmTryCompileExec...
gcc -rdynamic -DCHECK_FUNCTION_EXISTS=pthread_create
CheckFunctionExists.o -o cmTryCompileExec -rdynamic -lpthreads
/usr//bin/ld: cannot find -lpthreads
collect2: ld returned 1 exit status
gmake: *** [cmTryCompileExec] Erreur 1
I am rather a newbie in Linux but I managed to find that POSIX thread
libraries are a part of linux for at least four years. I have the latest
Mandrake 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 have found by surfing on many forums and mailing lists that sometimes
both -lpthread and -lpthreads (with S) are checked. Could it be a track to
follow ?
Many thanks for your help,
Joseph.
More information about the CMake
mailing list