libstdc++ with gcc 4.9 on ubuntu 15.10
Peter Steinbach
steinbach at scionics.de
Wed Jan 6 10:47:03 UTC 2016
Hi -
I am the developer of a CUDA library and the users recently reported a bug for ubuntu 15.10. As CUDA currently does not support gcc 5.*, I have to compile all host binaries with gcc-4.9. The funny thing, my build system bails out with the following error message when linking to libboost_unit_test_framework which I was able to reproduce with the attached source code:
$ gcc-4.9 -D_GLIBCXX_USE_CXX11_ABI=0 external_main_example_1.cpp -lboost_unit_test_framework
tmp/ccDk5v3M.o: In function `boost::unit_test::make_test_case(boost::unit_test::callback0<boost::unit_test::ut_detail::unused> const&, boost::unit_test::basic_cstring<char const>)':
external_main_example_1.cpp:(.text._ZN5boost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_detail6unusedEEENS0_13basic_cstringIKcEE[_ZN5boost9unit_test14make_test_caseERKNS0_9callback0INS0_9ut_detail6unusedEEENS0_13basic_cstringIKcEE]+0x42): undefined reference to `boost::unit_test::ut_detail::normalize_test_case_name(boost::unit_test::basic_cstring<char const>)'
collect2: error: ld returned 1 exit status
The above follows the recommendations from https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html. Note that, if I build boost with gcc 4.9 on 15.10, the above works as expected.
I was wondering if this is a known feature of the ubuntu boost distro? Are there any workarounds to this, that I potentially overlooked?
Best,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: external_main_example_1.cpp
Type: text/x-c++src
Size: 1182 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20160106/b209d0ce/attachment.cpp>
More information about the Ubuntu-devel-discuss
mailing list