Open CyrusChiu opened 9 years ago
You can refer to this link for help: https://groups.google.com/forum/#!topic/caffe-users/cI1omAfHxNw, and Have you install libboost-python-dev and python-dev?
I have this problem too.
I solve it by add boost_regex to LIBRARIES in Makefile
263 LIBRARIES += boost_thread stdc++ boost_regex
brother yihui's solution can sovle my problem ,thank you.
@andeyeluguo I met the same question with you, how did you resolve it on boost_regex? thank you and wait for you relay.....
I solve it by add boost_regex to LIBRARIES in Makefile just like this 263 LIBRARIES += boost_thread stdc++ boost_regex maybe you miss the boost_regex
@andeyeluguo I add boost_regex in Makefile,but can not solve question
then I have no idea,sorry
@andeyeluguo which your version of boost ?
I solve this question with boost version of 1.62.0 and modify the Makefile with add boost_regex
I am compiling the repository from https://github.com/weiliu89/caffe/tree/ssd ...the same issue, nevertheless @yihui-he advice solved my problem.
I have compiled the repository but when I run make test -j8 I got a reference error:
.build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::cpp_regex_traits_implementation
where did you add the boost_regex to solve this problem @YIFanH
@haoxuhao 265 line in Makefile; LIBRARIES += boost_thread stdc++ changed to LIBRARIES += boost_thread stdc++ boost_regex
I'm facing the same problem (while compiling ssd caffe; caffe and py-faster-rcnn I already succesfully compiled), but unfortunately adding boost_regex to the LIBRARIES doesn't help. My boost version is also 1.62.0 and I use g++-5.
@YIFanH what version of ubuntu are you using?
I would be very happy about any other ideas how to solve this problem.
@Gesalat Hi, my linux is centos and g++ -version is 4.8.4
@Gesalat I ran into this error with same boost and g++ version, did you solve it?
@WUhailing yes I solved it by compiling ssd caffe on a clean ubuntu 17.04 and also on a 17.10 machine with gcc-6 and cuda 9.1(if you do sudo apt install nvidia-cuda-toolkit
you will get cuda 8 and this could be one problem)
further details:
sudo apt install libboost-dev
(some symlinks were missing and added by hand)sudo apt install <...>
except cudaI hope this helps :-) I think next time I would choose ubuntu 16.04, there might be less version troubles.
I've solved my problem by the way provided by yihui. Some differences are here:
The error message I met was:
boost::program_options::xxxxx undefined
so I added boost_program_options to LIBRARIES in Makefile like this:
265 LIBRARIES += boost_thread stdc++ boost_program_options
and no more error message was shown.
I guess that the correct library should be added.
@YIFanH I add boost_regex in Makefile,but can not solve question
how to do it with CMAKE ? MakeFile not contain "LIBRARES += ...." to append it "boost_thread stdc++ boost_regex"
.build_release/lib/libcaffe.so: undefined reference to cblas_sgemv' .build_release/lib/libcaffe.so: undefined reference to
cblas_dgemm'
.build_release/lib/libcaffe.so: undefined reference to cblas_sscal' .build_release/lib/libcaffe.so: undefined reference to
cblas_dgemv'
.build_release/lib/libcaffe.so: undefined reference to cblas_saxpy' .build_release/lib/libcaffe.so: undefined reference to
cblas_ddot'
.build_release/lib/libcaffe.so: undefined reference to cblas_dasum' .build_release/lib/libcaffe.so: undefined reference to
cblas_sgemm'
.build_release/lib/libcaffe.so: undefined reference to cblas_dscal' .build_release/lib/libcaffe.so: undefined reference to
cblas_scopy'
.build_release/lib/libcaffe.so: undefined reference to cblas_sasum' .build_release/lib/libcaffe.so: undefined reference to
cblas_daxpy'
.build_release/lib/libcaffe.so: undefined reference to cblas_dcopy' .build_release/lib/libcaffe.so: undefined reference to
cblas_sdot'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/caffe.bin] Error 1
I am compiling the repository from https://github.com/weiliu89/caffe/tree/ssd ...the same issue, nevertheless @yihui-he advice solved my problem. I have compiled the repository but when I run make test -j8 I got a reference error: .build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::cpp_regex_traits_implementation::transform_primary(char const, char const) const' Could someone help me? 可能是装了多个boost版本,你可以查看/usr/local/lib/和/usr/lib/ 下boost是否安装了不同版本,如果是删掉一个就可以了,比如删除/usr/local/include/下的boost 和/usr/local/lib/下boost相关的文件,然后make clean,make all 就好了
I have this problem too. I solve it by add boost_regex to LIBRARIES in Makefile
263 LIBRARIES += boost_thread stdc++ boost_regex
谢谢,我的环境是少了regex
I am compiling the repository from https://github.com/weiliu89/caffe/tree/ssd ...the same issue, nevertheless @yihui-he advice solved my problem. I have compiled the repository but when I run make test -j8 I got a reference error: .build_release/lib/libcaffe.so: undefined reference to `boost::re_detail::cpp_regex_traits_implementation::transform_primary(char const, char const) const' Could someone help me? 可能是装了多个boost版本,你可以查看/usr/local/lib/和/usr/lib/ 下boost是否安装了不同版本,如果是删掉一个就可以了,比如删除/usr/local/include/下的boost 和/usr/local/lib/下boost相关的文件,然后make clean,make all 就好了
this solved my problem
WITH_PYTHON_LAYER := 1 in makefile.config
If use WITH_PYTHON_LAYER := 0 in Makefile.config, then build without error. If use WITH_PYTHON_LAYER := 1 in Makefile.config, then it will build fail with command "make -j8 " The error message will pop out:
The following is my step:
I have search from the Internet, it seems related to libboost_regex link problem. But I am not familar with Makefile now, could you provide some hint?