How to solve undefined reference to `pthread_key_create' when compile PCL? [closed]

asked 2012-07-04 03:31:48 -0600

sam gravatar image

updated 2012-07-04 04:07:38 -0600

mjcarroll gravatar image

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~

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by Eric Perko
close date 2012-07-04 17:41:43

Comments

2

Those instructions build a stand-alone PCL library. Is that what you want? It must be done differently to run PCL with ROS.

joq gravatar image joq  ( 2012-07-04 10:50:17 -0600 )edit

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~

sam gravatar image sam  ( 2012-07-04 15:42:32 -0600 )edit

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.

Eric Perko gravatar image Eric Perko  ( 2012-07-04 17:41:34 -0600 )edit