Reputation: 2663
During building a library I got the following "undefined reference" error:
libtbb.so.2: undefined reference to `__cxa_init_primary_exception@CXXABI_1.3.11'
When I checked the symbols in my libstdc++ library I saw the following
nm -CD libstdc++.so.6.0.24 | grep "__cxa_init_primary_exception"
000000000008fdd8 T __cxa_init_primary_exception@@CXXABI_1.3.11
So the only difference between the symbol name in libstdc++.so and what libtbb.so seems to require is an additional "@" in the symbol name. Even more interesting if I type
nm -C libtbb.so.2 | grep "__cxa_init_primary_exception"
U __cxa_init_primary_exception@@CXXABI_1.3.11
I see that libtbb requires a symbol which actually includes a double @. What's the ratio behind this naming convention and why does the linker search for a symbol name with one @?
Upvotes: 1
Views: 380
Reputation: 11271
Maybe related to a known issue?
It's also mentioned here:
...current TBB has problems with gcc-libs, it’s compiled with gcc-libs 7.x so you will get this error if you try to build OpenCV with newest TBB
Proposed solution there:
This is also posted here, workaround is you should install TBB 2017_20170412-1 from Arch Linux Archive. To do this, first install newest TBB and then downgrade it.
Upvotes: 1