Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

Intel C++ 16 and boost 1.59 link error

Scott_S-S_
Beginner
695 Views

Hi

Further to the previous post we can work around the compiler error by removing the -fpermissive flag, but have now hit a problem at the link stage. I'm not able to provide a small reproducible example for this unfortunately, but the link errors we get are:

LINK /.../linux_icc64_release/bin/test_suite
/...//linux_64/lib/libboost_unit_test_framework-gcc49-mt-1_59.so: undefined reference to `std::__detail::_List_node_base::_M_unhook()@GLIBCXX_3.4.15'
/...//linux_64/lib/libboost_unit_test_framework-gcc49-mt-1_59.so: undefined reference to `std::__throw_out_of_range_fmt(char const*, ...)@GLIBCXX_3.4.20'
/...//linux_64/lib/libboost_regex-gcc49-mt-1_59.so: undefined reference to `std::overflow_error::~overflow_error()@GLIBCXX_3.4.15'
/...//linux_64/lib/libboost_regex-gcc49-mt-1_59.so: undefined reference to `std::invalid_argument::~invalid_argument()@GLIBCXX_3.4.15'
/...//linux_64/lib/libboost_signals-gcc49-mt-1_59.so: undefined reference to `std::__detail::_List_node_base::_M_reverse()@GLIBCXX_3.4.15'
/...//linux_64/lib/libboost_signals-gcc49-mt-1_59.so: undefined reference to `std::__detail::_List_node_base::swap(std::__detail::_List_node_base&, std::__detail::_List_node_base&)@GLIBCXX_3.4.15'
/...//linux_64/lib/libboost_unit_test_framework-gcc49-mt-1_59.so: undefined reference to `std::__detail::_List_node_base::_M_transfer(std::__detail::_List_node_base*, std::__detail::_List_node_base*)@GLIBCXX_3.4.15'
/...//linux_64/lib/libboost_unit_test_framework-gcc49-mt-1_59.so: undefined reference to `std::__detail::_List_node_base::_M_hook(std::__detail::_List_node_base*)@GLIBCXX_3.4.15'

We build our boost libs using gcc4.9, so I'm wondering if there's a binary compatibility issue between gcc4.9 and icpc 16?

I've tried using the gnu linker (ld v2.25)  instead of icpc and get the following, I don't know if relevant

LINK /.../linux_icc64_release/bin/test_suite
/.../ld: unrecognised emulation mode: 64
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 i386linux elf_l1om elf_k1om

Thanks,

 

0 Kudos
3 Replies
Melanie_B_Intel
Employee
695 Views

icpc 16 will interoperate with gcc 4.9

Is this a private test case or is the link failure coming from the boost regression testing suite? 

I don't think it's related to the fpermissive issue you reported separately.

--Melanie

0 Kudos
Amanda_S_Intel
Employee
695 Views

The linker errors are odd. It looks like 2 different versions of glibc are being pulled into your build so something is awry there. Are you using one version of gcc to create the boost build but a different gcc version to perform the Intel compiler test and link? This won't work. Also, if you build with icc and link with gcc, this won't work either.

I suggest that you start form scratch and ensure there are not multiple versions of gcc (and  related libraries) in the environment before building. And if you are consistently able to reproduce this behavior in a clean environment, please list the steps here so we can reproduce it. Thanks!

0 Kudos
Scott_S-S_
Beginner
695 Views

Hi

Yes after futher investigation, it appears this is not an intel compiler issue as such. I replicated it using a gcc 4.4 build of our code linking to boost libs built with gcc 4.9, so it's a problem with the way our linker is configured. A tweak to our makefile generation scripts should do the trick.

Thanks,

 

0 Kudos
Reply