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

What causes the undefined symbol: _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE error?

Navin_I_
Beginner
616 Views

I would have liked to post some short sample code, but it'll be a while before I can do so. The error encountered is caused when I build my (extremely large) program on 64 bit CentOS 6.5 and link it with TBB (will post all necessary version numbers if you require it). Then I'm giving the executable that got built, to my colleague who runs it on his 64 bit system (RHEL 6) where he's also installed TBB and when the program starts, this is output:

./myprogram: Symbol `_ZTIN3tbb4taskE' has different size in shared object, consider re-linking

and after that this gets output and the program crashes with this error message

./myprogram: symbol lookup error: ./myprogram: undefined symbol: _ZN3tbb10interface58internal9task_base7destroyERNS_4taskE

What causes this error and how can I solve it?

Once I build an executable linked with TBB's ".so" files, I hoped it would work on a computer which does not have TBB installed on it. That was the whole point of creating an executable. This error never happens when I run the executable on my system. Only on my colleague's system. I've asked him to try it on other systems, and he's yet to get back on that. Meanwhile if this is a known error, please do help.

0 Kudos
3 Replies
Vladimir_P_Intel2
616 Views

hello,

could you check via `ldd` command that correct tbb libraries are taken? If you use system-wide tbb its version should be higher that version you have built with. The system-wide tbb version can be found via `rpm -qa | grep tbb` command.

--Vladimir

Navin_I_
Beginner
616 Views

Thanks. Turned out that RHEL had TBB installed by default and my colleague had to delete the TBB files in /usr/include and /usr/lib64/.

Then he just extracted TBB into /usr/local/ which was where even I had extracted my TBB library and the shared library was able to detect TBB's shared libraries there and it worked!

Vladimir_P_Intel2
616 Views

Cool! thanks for the information that the problem has been solved.

--Vladimir

Reply