Bug 1349979 - Boost not linking correctly under Clang
Summary: Boost not linking correctly under Clang
Keywords:
Status: CLOSED DUPLICATE of bug 1282645
Alias: None
Product: Fedora
Classification: Fedora
Component: clang
Version: 23
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Dave Airlie
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-24 17:47 UTC by Vitaliy Gribko
Modified: 2016-07-01 09:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-01 09:57:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vitaliy Gribko 2016-06-24 17:47:16 UTC
Compile C++ program with clang++ successfully (generated object files without any errors).

But at linking with boost get an error like this:

CMakeFiles/test.dir/home/vitaliy/src/node_async/AbstractWorker.cpp.o: In function `__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > boost::re_detail::re_is_set_member<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, char, boost::regex_traits<char, boost::cpp_regex_traits<char> >, unsigned int>(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, boost::re_detail::re_set_long<unsigned int> const*, boost::re_detail::regex_data<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > > const&, bool)':
/home/vitaliy/src/cpp/src/node_async/AbstractWorker.cpp:(.text._ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x275): undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform[abi:cxx11](char const*, char const*) const'
/home/vitaliy/src/node_async/binding/AbstractWorker.cpp:(.text._ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb[_ZN5boost9re_detail16re_is_set_memberIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEjEET_SH_SH_PKNS0_11re_set_longIT2_EERKNS0_10regex_dataIT0_T1_EEb]+0x3c5): undefined reference to `boost::re_detail::cpp_regex_traits_implementation<char>::transform_primary[abi:cxx11](char const*, char const*) const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The GCC C++ ABI changed in version 5 (http://developerblog.redhat.com/2015/02/05/gcc5-and-the-c11-abi) which can cause some object incompatibilities: "Users just need to make sure that they are building with the ABI used by the libraries that they depend on".

Please, apply pathes from this thread: https://llvm.org/bugs/show_bug.cgi?id=23529

Reproduced with clang 3.7 at Fedora 23 and clang 3.8 at Fedora 24.

Comment 1 Stephan Bergmann 2016-07-01 09:57:59 UTC

*** This bug has been marked as a duplicate of bug 1282645 ***


Note You need to log in before you can comment on or make changes to this bug.