catkin_make not linking opencv dependencies
Something has gotten screwed up on one of my machines and now catkin_make
is not linking opencv dependencies correctly (or something along those lines), i.e., I'm am getting a long list of errors of the format: In function 'SOME OPENCV FUNCTION', undefined reference to 'X'.
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(gl_core_3_1.cpp.o): In function `IntGetProcAddress(char const*)':
(.text._ZL17IntGetProcAddressPKc+0x15): undefined reference to `glXGetProcAddressARB'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::makeKey()':
(.text._ZN2cvL7makeKeyEv+0x14): undefined reference to `pthread_key_create'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::Mutex::Mutex()':
(.text._ZN2cv5MutexC2Ev+0x1c): undefined reference to `pthread_spin_init'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::Mutex::~Mutex()':
(.text._ZN2cv5MutexD2Ev+0x34): undefined reference to `pthread_spin_destroy'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::Mutex::operator=(cv::Mutex const&)':
(.text._ZN2cv5MutexaSERKS0_+0x41): undefined reference to `pthread_spin_destroy'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::Mutex::lock()':
(.text._ZN2cv5Mutex4lockEv+0x4): undefined reference to `pthread_spin_lock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::Mutex::unlock()':
(.text._ZN2cv5Mutex6unlockEv+0x4): undefined reference to `pthread_spin_unlock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::Mutex::trylock()':
(.text._ZN2cv5Mutex7trylockEv+0x8): undefined reference to `pthread_spin_trylock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::~TLSDataContainer()':
(.text._ZN2cv16TLSDataContainerD2Ev+0x1f): undefined reference to `pthread_spin_lock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::~TLSDataContainer()':
(.text._ZN2cv16TLSDataContainerD2Ev+0x42): undefined reference to `pthread_spin_unlock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::~TLSDataContainer()':
(.text._ZN2cv16TLSDataContainerD2Ev+0x10f): undefined reference to `pthread_spin_unlock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSStorage::~TLSStorage()':
(.text._ZN2cv10TLSStorageD2Ev+0x3d): undefined reference to `pthread_spin_lock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSStorage::~TLSStorage()':
(.text._ZN2cv10TLSStorageD2Ev+0x62): undefined reference to `pthread_spin_unlock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSStorage::~TLSStorage()':
(.text._ZN2cv10TLSStorageD2Ev+0xcd): undefined reference to `pthread_spin_unlock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::TLSDataContainer()':
(.text._ZN2cv16TLSDataContainerC2Ev+0x24): undefined reference to `pthread_spin_lock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::TLSDataContainer()':
(.text._ZN2cv16TLSDataContainerC2Ev+0x6d): undefined reference to `pthread_spin_unlock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::TLSDataContainer()':
(.text._ZN2cv16TLSDataContainerC2Ev+0xab): undefined reference to `pthread_spin_unlock'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::getData() const':
(.text._ZNK2cv16TLSDataContainer7getDataEv+0x22): undefined reference to `pthread_once'
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libopencv_core.a(system.cpp.o): In function `cv::TLSDataContainer::getData() const ...
Please format console copy/pastes using the Preformatted text button on the formatting toolbar (the one with
101010
on it). It makes things much easier to read. Thanks.Okay. Hope that's better.
It may be helpful if you can post your
CMakeLists.txt
.