我尝试在Centos 7上根据此tutorial安装BigARTM。 但是我收到了这个错误:
/bin/ld: cannot find -lboost_thread-mt
/bin/ld: cannot find -lboost_program_options-mt
/bin/ld: cannot find -lboost_date_time-mt
/bin/ld: cannot find -lboost_filesystem-mt
/bin/ld: cannot find -lboost_iostreams-mt
/bin/ld: cannot find -lboost_system-mt
/bin/ld: cannot find -lboost_chrono-mt
/bin/ld: cannot find -lboost_timer-mt
/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libpthread.a(libpthread.o): In function 'sem_open':
(.text+0x6823): warning: the use of 'mktemp' is dangerous, better use 'mkstemp'
collect2: error: ld returned 1 exit status
make[2]: [bin/bigartm] Error 1
make[1]: [src/bigartm/CMakeFiles/bigartm.dir/all] Error 2
make: [all] Error 2
我使用'Development Tools'
安装了yum
,我在/usr/lib64
rpm -ql boost-devel | grep '_program-\|_date_time-\|_thread-\|_filesystem-\|_iostreams-\|_system-\|_chrono-\|_timer-'
/usr/lib64/libboost_chrono-mt.so
/usr/lib64/libboost_date_time-mt.so
/usr/lib64/libboost_filesystem-mt.so
/usr/lib64/libboost_iostreams-mt.so
/usr/lib64/libboost_system-mt.so
/usr/lib64/libboost_thread-mt.so
/usr/lib64/libboost_timer-mt.so
我尝试了三种方式:
ln
到/usr/lib64/libboost_<name>-mt.so
的链接(使用/usr/lib64/lboost_<name>-mt.so
),并将/usr/lib64
添加到LD_LIBRARY_PATH
。/usr/lib64/libboost_<name>-mt.so
到/usr/lib/lboost_<name>-mt.so
的链接。LIBS = -L /usr/lib64
添加到MakeFile。 例如:
[oshri@analytics build]$ ls -l /usr/lib/\*program\*
lrwxrwxrwx 4 root root 37 Jan 19 17:38 /usr/lib/lboost_program_options-mt -> libboost_program_options-mt.so.1.53.0
lrwxrwxrwx 4 root root 37 Jan 19 17:38 /usr/lib/lboost_program_options-mt.so -> libboost_program_options-mt.so.1.53.0
[oshri@analytics build]$ ls -l /usr/lib64/\*program\*
lrwxrwxrwx 4 root root 37 Jan 19 17:38 /usr/lib64/lboost_program_options-mt.so -> libboost_program_options-mt.so.1.53.0
lrwxrwxrwx 4 root root 37 Jan 19 17:38 /usr/lib64/libboost_program_options-mt.so -> libboost_program_options-mt.so.1.53.0
-rwxr-xr-x 1 root root 468952 Nov 5 20:58 /usr/lib64/libboost_program_options-mt.so.1.53.0
lrwxrwxrwx 1 root root 34 Jan 19 17:38 /usr/lib64/libboost_program_options.so -> libboost_program_options.so.1.53.0
-rwxr-xr-x 1 root root 468944 Nov 5 20:58 /usr/lib64/libboost_program_options.so.1.53.0
[oshri@analytics build]$ printenv LD_LIBRARY_PATH
/home/oshri/PycharmProjects/EuroSalesOptimization/runtime/:/usr/lib64/