libstdc++ with gcc 4.9 on ubuntu 15.10

Matthias Klose doko at
Wed Jan 6 10:56:57 UTC 2016

On 06.01.2016 11:47, Peter Steinbach wrote:
> 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

-D_GLIBCXX_USE_CXX11_ABI=0 has no effect with GCC 4.9.

> The above follows the recommendations from 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?

You have to use CUDA 7.5. Afaik that's the only version supporting GCC 5. Or you 
have to rebuild every c++ library except libstdc++ using gcc-4.9 or gcc-5 

More information about the Ubuntu-devel-discuss mailing list