How to solve undefined reference to `pthread_key_create' when compile PCL? [closed]
I followed Compiling from source.
I run:
wget http://www.pointclouds.org/assets/files/1.5.1/PCL-1.5.1-Source.tar.bz2
tar xvf PCL-1.5.1-Source.tar.bz2
cd PCL-1.5.1-Source && mkdir build && cd build
cmake ..
make
sudo make install
I got:
Scanning dependencies of target test_gaussian
[ 5%] Building CXX object common/test/CMakeFiles/test_gaussian.dir/test_gaussian.cpp.o
Linking CXX executable test_gaussian
[ 5%] Built target test_gaussian
Scanning dependencies of target test_macros
[ 5%] Building CXX object common/test/CMakeFiles/test_macros.dir/test_macros.cpp.o
Linking CXX executable test_macros
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libgtest.so: undefined reference to `pthread_key_create'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libgtest.so: undefined reference to `pthread_getspecific'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libgtest.so: undefined reference to `pthread_key_delete'
/usr/lib/gcc/x86_64-linux-gnu/4.4.5/../../../../lib/libgtest.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make[2]: *** [common/test/test_macros] Error 1
make[1]: *** [common/test/CMakeFiles/test_macros.dir/all] Error 2
make: *** [all] Error 2
sam@sam:~/code/ros/sam_perception/PCL-1.5.1-Source/build$
How to solve it?
Thank you~
Those instructions build a stand-alone PCL library. Is that what you want? It must be done differently to run PCL with ROS.
I just try,because ROS PCL only can run some parts of PCL tutorials. I want to set up an environment can run all PCL tutorials. By the way, how to solve the question I post original. Thank you~
Closing as off-topic (this issue would be best raised on the pcl-users mailing list) since this question is unrelated to ROS and is a problem with compiling the standalone version of PCL.