FS#63408 - [cuda][gcc8] can't link to opencv compiled with GCC 9
Attached to Project:
Community Packages
Opened by Andrew A (andrew-wja) - Thursday, 08 August 2019, 15:30 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 06 September 2019, 22:20 GMT
Opened by Andrew A (andrew-wja) - Thursday, 08 August 2019, 15:30 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Friday, 06 September 2019, 22:20 GMT
|
Details
Description:
opencv-4.1.1-1 does not dynamically link successfully against the current glibcxx. /usr/bin/ld: /usr/lib/libopencv_videoio.so.4.1.1: undefined reference to `std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()@GLIBCXX_3.4.26' It looks like the dynamic library just needs to be rebuilt against the current glibcxx. The immediately previous version of the package, opencv-4.1.0-2 does not exhibit this issue. Additional info: * package version(s) opencv-4.1.1-1, glibc-2.29-4, gcc-9.1.0-2 Steps to reproduce: Try to build any application which needs to link opencv, for example, any of the opencv examples. |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Friday, 06 September 2019, 22:20 GMT
Reason for closing: Fixed
Additional comments about closing: Closing as this is now confirmed to be an issue of mixing gcc8 and gcc9 ABI. Can be solved using cuda by building native code using gcc9 and then use gcc8 as the nvcc host compiler only.
Friday, 06 September 2019, 22:20 GMT
Reason for closing: Fixed
Additional comments about closing: Closing as this is now confirmed to be an issue of mixing gcc8 and gcc9 ABI. Can be solved using cuda by building native code using gcc9 and then use gcc8 as the nvcc host compiler only.
> c++filt _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev
std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream()
> nm -D /usr/lib/libstdc++.so | grep _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev
00000000001387b0 W _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev
> nm -D /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/libstdc++.so.6 | grep _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev
So nothing wrong with opencv. It's just using symbols from gcc9's libstdc++, which are not available in gcc8's one. Not sure how you would fix this besides providing your own opencv-cuda compiled with GCC 8.