Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
2412 Discussions

Linkage problem when moving from TBB 2.2 to 3.0

inshi1
Beginner
158 Views
Hello,

I've downloaded the latest stable TBB 3.0. I'm running it on Linux (gentoo OS) 64bit (Intel P4 Quad).
I've changed the path variables and everything as I should.
when compiling, the compilation goes ok, but I receive the following linkage error:

"Debug/xxxxx.o: In function `tbb::internal::throw_exception(tbb::internal::exception_id)':
xxxxxxx.cpp:(.text._ZN3tbb8internal15throw_exceptionENS0_12exception_idE[tbb::internal::throw_exception(tbb::internal::exception_id)]+0xf): undefined reference to `tbb::internal::throw_exception_v4(tbb::internal::exception_id)'
collect2: ld returned 1 exit status
make: *** [runDebug] Error 1"

in that file, there is a use in concurrent_queue, when I'm removing it, everything works fine (I use other TBB components in the code).

I'm using gcc 4.3.4.
I've notice I have the following lib:
/opt/intel/tbb/tbb22_20090809oss/build/linux_intel64_gcc_cc4.3.4_libc2.9_kernel2.6.31_release/libtbb.so which I had soft link to.

but I do not have similar lib (meaning for gcc4.3.4) for tbb3.0 (I don't remember were I've downloaded this lib from).
can this be the problem?

Thanks,
Lior.
0 Kudos
4 Replies
Vladimir_P_Intel2
158 Views
Do you try to link 3.0object files to 2.2 library? This should not work.
You can link 2.2 object files to 3.0 library.

--Vladimir
inshi1
Beginner
158 Views
Yes,

I tried to link to /opt/intel/tbb/tbb30_20100406oss/lib/intel64/cc4.1.0_libc2.4_kernel2.6.16.21/libtbb.so
or to
/opt/intel/tbb/tbb30_20100406oss/lib/intel64/cc3.4.3_libc2.3.4_kernel2.6.9/libtbb.so

both resulted the same error as I mentioned above.

any other ideas?
inshi1
Beginner
158 Views
Problem solved!

there were 2 steps I was missing:

1. running gmake from /opt/intel/tbb/tbb30_20100406oss/
2. cp /opt/intel/tbb/tbb30_20100406oss/build/linux_intel64_gcc_cc4.3.4_libc2.9_kernel2.6.31_release/libtbb.so.2 /usr/lib64/
cp /opt/intel/tbb/tbb30_20100406oss/build/linux_intel64_gcc_cc4.3.4_libc2.9_kernel2.6.31_release/libtbb.so /usr/lib64/

Vladimir_P_Intel2
158 Views
Hi there,
Symbol _ZN3tbb8internal18throw_exception_v4ENS0_12exception_idE; was added into TBB 2.2 update 2 (November of 2009) and does not exists before update 2 including 20090809 release. could you check again that you are linking to right library? and you can also to try the latest 3.0 update com-aligned release.
thanks,
--Vladimir
P.S. it looks I was late a bit with suggestion:)
Reply