Changed linking order: -pthread -> back.
authorDmytro Mishkin <ducha.aiki@gmail.com>
Mon, 29 Sep 2014 13:10:04 +0000 (16:10 +0300)
committerDmytro Mishkin <ducha.aiki@gmail.com>
Mon, 29 Sep 2014 13:10:04 +0000 (16:10 +0300)
Otherwise error:
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): undefined reference to symbol 'pthread_rwlock_wrlock@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

Makefile

index 5020b41..929f8d5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -165,12 +165,11 @@ ifneq ($(CPU_ONLY), 1)
        LIBRARY_DIRS += $(CUDA_LIB_DIR)
        LIBRARIES := cudart cublas curand
 endif
-LIBRARIES += pthread \
-       glog gflags protobuf leveldb snappy \
+LIBRARIES += glog gflags protobuf leveldb snappy \
        lmdb \
        boost_system \
        hdf5_hl hdf5 \
-       opencv_core opencv_highgui opencv_imgproc
+       opencv_core opencv_highgui opencv_imgproc pthread
 PYTHON_LIBRARIES := boost_python python2.7
 WARNINGS := -Wall -Wno-sign-compare