You are not logged in.
I wanted to compile the code of SSD (https://github.com/weiliu89/caffe/tree/ssd) but failed.
I compiled it with cmake:
$ cmake .. -DBLAS="open" -Dpython_version=3 -DCUDA_HOST_COMPILER=/usr/bin/g++-5
$ make
But error:
$ make
[ 1%] Built target proto
[ 80%] Built target caffe
[ 82%] Linking CXX executable upgrade_solver_proto_text
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/CMakeFiles/upgrade_solver_proto_text.dir/build.make:132: tools/upgrade_solver_proto_text] Error 1
make[1]: *** [CMakeFiles/Makefile2:442: tools/CMakeFiles/upgrade_solver_proto_text.dir/all] Error 2
make: *** [Makefile:128: all] Error 2
I have installed the boost package.
I compiled this code on Ubuntu successfully, so I think the code is probably right.
But I don't know why it compiled failed on my Archlinux.
I have tried to rebuild boost with gcc-6.3.1 but it doesn't help.
Can someone help me?
Last edited by nopy (2017-02-24 16:45:08)
Offline
How are your makefiles linking boost? It's possible there could be some OS specific discrepancies here, and the offending lines, if any, will need to be adjusted.
EDIT: [offtopic]SSD is an unfortunate acronym for this project... I though you were referring to the Solid State Drives when I first saw the title. Oh well.[/offtopic]
Last edited by JohnBobSmith (2017-02-24 18:22:53)
I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.
Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...
Offline
pass "-DCMAKE_VERBOSE_MAKEFILE=ON" to cmake, recompile. The output should be more informative.
There needs to be some "-lboost_regex" in the row.
Online
pass "-DCMAKE_VERBOSE_MAKEFILE=ON" to cmake, recompile. The output should be more informative.
There needs to be some "-lboost_regex" in the row.
I added it and compiled:
$ cmake .. -DBLAS="open" -Dpython_version=3 -DCUDA_HOST_COMPILER=/usr/bin/g++-5 -DCMAKE_VERBOSE_MAKEFILE=ON
And make output:
[ 82%] Linking CXX executable upgrade_solver_proto_text
cd /home/xxx/Desktop/caffe_ssd/caffe/build/tools && /usr/bin/cmake -E cmake_link_script CMakeFiles/upgrade_solver_proto_text.dir/link.txt --verbose=1
/usr/bin/c++ -fPIC -Wall -Wno-sign-compare -Wno-uninitialized -O3 -DNDEBUG CMakeFiles/upgrade_solver_proto_text.dir/upgrade_solver_proto_text.cpp.o -o upgrade_solver_proto_text -Wl,-rpath,/home/xxx/Desktop/caffe_ssd/caffe/build/lib:/opt/cuda/lib64:::::::: -rdynamic ../lib/libcaffe.so.1.0.0-rc3 ../lib/libproto.a -lboost_system -lboost_thread -lboost_filesystem -lboost_regex -lboost_chrono -lboost_date_time -lboost_atomic -lpthread -lglog -lgflags -lprotobuf -lpthread -lglog -lgflags -lprotobuf -lhdf5_cpp -lhdf5 -lz -ldl -lm -lhdf5_hl_cpp -lhdf5_hl -llmdb -lleveldb -lsnappy /opt/cuda/lib64/libcudart.so /opt/cuda/lib64/libcurand.so /opt/cuda/lib64/libcublas.so /opt/cuda/lib64/libcublas_device.a /usr/lib/libopencv_highgui.so.3.2.0 /usr/lib/libopencv_videoio.so.3.2.0 /usr/lib/libopencv_imgcodecs.so.3.2.0 /usr/lib/libopencv_imgproc.so.3.2.0 /usr/lib/libopencv_core.so.3.2.0 -lopenblas -lpython3.6m -lboost_python3
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform(char const*, char const*) const'
../lib/libcaffe.so.1.0.0-rc3: undefined reference to `boost::re_detail_106300::cpp_regex_traits_implementation<char>::transform_primary(char const*, char const*) const'
collect2: error: ld returned 1 exit status
make[2]: *** [tools/CMakeFiles/upgrade_solver_proto_text.dir/build.make:135: tools/upgrade_solver_proto_text] Error 1
make[2]: Leaving directory '/home/xxx/Desktop/caffe_ssd/caffe/build'
make[1]: *** [CMakeFiles/Makefile2:445: tools/CMakeFiles/upgrade_solver_proto_text.dir/all] Error 2
make[1]: Leaving directory '/home/xxx/Desktop/caffe_ssd/caffe/build'
make: *** [Makefile:131: all] Error 2
"-lboost_regex" exsits but compiled error.
Offline
The error messages here https://github.com/weiliu89/caffe/issues/460 make me wonder whether you got boost installed or only boost-libs.
pacman -Qi boost
Online
The error messages here https://github.com/weiliu89/caffe/issues/460 make me wonder whether you got boost installed or only boost-libs.
pacman -Qi boost
Both boost and boost-libs are installed.
$ pacman -Q | grep boost
boost 1.63.0-1
boost-libs 1.63.0-1
And "pacman -Qi boost"
I rebuilt boost package to try to solve the problem but failed.
$ pacman -Qi boost
Name : boost
Version : 1.63.0-1
Description : Free peer-reviewed portable C++ source libraries - development headers
Architecture : x86_64
URL : http://www.boost.org/
Licenses : custom
Groups : None
Provides : None
Depends On : boost-libs=1.63.0
Optional Deps : python: for python bindings [installed]
python2: for python2 bindings [installed]
Required By : None
Optional For : None
Conflicts With : None
Replaces : None
Installed Size : 147.62 MiB
Packager : Unknown Packager
Build Date : Sat Feb 25 00:05:22 2017
Install Date : Sat Feb 25 00:06:35 2017
Install Reason : Installed as a dependency for another package
Install Script : No
Validated By : None
Last edited by nopy (2017-02-25 08:35:53)
Offline
I rebuilt boost package
This is not the stock arch package?
Another thing:
-DCUDA_HOST_COMPILER=/usr/bin/g++-5
Why is there a g++5, where does it come from, why do you (have to pass it) and notably: "stat `which c++`; c++ --version"?
Online
I rebuilt boost package
This is not the stock arch package?
Another thing:
-DCUDA_HOST_COMPILER=/usr/bin/g++-5
Why is there a g++5, where does it come from, why do you (have to pass it) and notably: "stat `which c++`; c++ --version"?
I did have compiled the project with the boost stock arch package but failed. When I Google this problem, I found a similar bug. So I thought the problem may be caused by different gcc version while the boost stock arch package built by GCC 6.2.1. Then I rebuilt boost and boost-libs with this PKGBUILD in official repo using current GCC version 6.3.1. But It didn't work.
"-DCUDA_HOST_COMPILER=/usr/bin/g++-5" is because that CUDA 8.0 doesn't support GCC 6.x.
The SSD project is a fork of Caffe(https://github.com/BVLC/caffe). I compiled the original Caffe with "-DCUDA_HOST_COMPILER=/usr/bin/g++-5" successfully.
I also compared the SSD branch with the original Caffe branch. But I didn't find something useful to solve this problem.
Last edited by nopy (2017-02-25 10:40:56)
Offline