Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ck install package:lib-caffe-intel-request-cpu" fails with LLVM 5.0 #136

Open
psyhtest opened this issue Feb 19, 2018 · 0 comments
Open
Assignees

Comments

@psyhtest
Copy link
Member

psyhtest commented Feb 19, 2018

After I relaxed the compiler constraints on building Caffe (i.e. allow to use C++ compilers other than GCC), I found that building with Clang (LLVM) fails due to linking issues:

$ sudo apt install clang-5.0
$ ck detect soft:compiler.llvm
$ ck pull repo:ck-caffe  --url=https://github.com/dividiti/ck-caffe
$ ck install package:lib-caffe-intel-request-cpu

I see at least 2 different issues:

  1. Due to Boost regex (tried with 1.65.1 an 1.66.0, both full and min-for-caffe):
[ 88%] Linking CXX executable device_query
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::put_mem_block(void*)'
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::perl_matcher<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<boost::sub_match<__gnu_cxx::__normal_iterator<char const*,
 std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::construct_init(boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, boost::regex_constants::_matc
h_flags)'
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::get_default_error_string(boost::regex_constants::error_type)'
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::get_mem_block()'
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::verify_options(unsigned int, boost::regex_constants::_match_flags)'
../lib/libcaffe.so.1.1.0: undefined reference to `boost::re_detail_106600::raise_runtime_error(std::runtime_error const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
tools/CMakeFiles/device_query.dir/build.make:132: recipe for target 'tools/device_query' failed
make[2]: *** [tools/device_query] Error 1
CMakeFiles/Makefile2:664: recipe for target 'tools/CMakeFiles/device_query.dir/all' failed
make[1]: *** [tools/CMakeFiles/device_query.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
  1. Due to GFlags:
CMakeFiles/convert_annoset.dir/convert_annoset.cpp.o: In function `_GLOBAL__sub_I_convert_annoset.cpp':
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x5f): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x8a): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x116): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(c
har const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:clang(: .text.startup+0x20c): undefined reference to `error: google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocat
or<char> > >(char const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)linker command failed with exit code 1 (use -v to see invocation)'

/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x2d5): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(c
har const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x386): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(c
har const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x3ea): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x415): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x440): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x46b): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x496): undefined reference to `google::FlagRegisterer::FlagRegisterer<int>(char const*, char const*, char const*, int*, int*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x4c1): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x4ec): undefined reference to `google::FlagRegisterer::FlagRegisterer<bool>(char const*, char const*, char const*, bool*, bool*)'
/home/anton/CK_TOOLS/lib-caffe-intel-request-cpu-request-llvm-5.0.0-3~16.04.1-linux-64/src/tools/convert_annoset.cpp:(.text.startup+0x564): undefined reference to `google::FlagRegisterer::FlagRegisterer<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(c
har const*, char const*, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
tools/CMakeFiles/train_net.dir/build.make:132: recipe for target 'tools/train_net' failed
@psyhtest psyhtest changed the title "ck install package:lib-caffe-intel-master-cpu" fails with LLVM 5.0 "ck install package:lib-caffe-intel-request-cpu" fails with LLVM 5.0 Feb 19, 2018
@ens-lg4 ens-lg4 self-assigned this Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants