Robotics StackExchange | Archived questions

gazebo ignition cmake -lpthreads not found

Building ignition from source on ubuntu 20.04 raises the following error in CMakeError.log

Determining if the function pthread_create exists in the pthreads failed with the following output: Change Dir: /home/thor/gsoc/ign-rendering/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/make cmTC6d637/fast && /usr/bin/make -f CMakeFiles/cmTC6d637.dir/build.make CMakeFiles/cmTC6d637.dir/build make[1]: Entering directory '/home/thor/gsoc/ign-rendering/build/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC6d637.dir/CheckFunctionExists.c.o /usr/bin/cc -fPIC -DCHECKFUNCTIONEXISTS=pthreadcreate -o CMakeFiles/cmTC6d637.dir/CheckFunctionExists.c.o -c /usr/share/cmake-3.16/Modules/CheckFunctionExists.c Linking C executable cmTC6d637 /usr/bin/cmake -E cmakelinkscript CMakeFiles/cmTC6d637.dir/link.txt --verbose=1 /usr/bin/cc -fPIC -DCHECKFUNCTIONEXISTS=pthreadcreate CMakeFiles/cmTC6d637.dir/CheckFunctionExists.c.o -o cmTC6d637 -lpthreads /usr/bin/ld: cannot find -lpthreads collect2: error: ld returned 1 exit status make[1]: *** [CMakeFiles/cmTC6d637.dir/build.make:87: cmTC6d637] Error 1 make[1]: Leaving directory '/home/thor/gsoc/ign-rendering/build/CMakeFiles/CMakeTmp' make: *** [Makefile:121: cmTC6d637/fast] Error 2

Asked by anm on 2022-03-31 10:41:18 UTC

Comments

Please share your steps what you did to make this happen.

Also, what ign version? Have you follow the doc?

Asked by kakcalu13 on 2022-04-05 07:39:29 UTC

Answers