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

how to compile and install TBB on MacOSX?

So I've downloaded oss_src package of TBB and issued make command
after extracting the archive. Afterwards all went smoothly and everything compiled
without any problem. This is good.

I've tried compiling examples by hand and compiler started complaining
about not being able to find -ltbb. Next step? I have sourced
but it did not help at all so I additionally copied all libtbb* to /usr/local/lib.
The compiler then started complaining about not being able to find
tbb::task_scheduler_init or something like that. This is bad.

How do I fix all of this and install the TBB?

Please do not point me to the blog posts, etc. about installing TBB globally
because I've read everything what was available on the topic. The lack of
documentation for such a simple scenario simply stuns me.

How is that a possibly great tool does not come with an install script?

I am really willing to write one (at least for macosx) if somebody gives
me a clue on how to do it properly for OSX.

frustrated user

0 Kudos
1 Reply

There are a couple of things here.

First the script should work.What do your environment variables look like after you source (As a side note, you need to source it like, "." with the "." and not execute it). If the tbbvars script is not working for you, we need to fix it. The tbbvars script should change the values of theDYLD_LIBRARY_PATH and CPATH variables.

Second, if you do install the library by moving the files, like libtbb* to /usr/loca/lib then you also need to move the header files to /usr/local/include. This is probably what the compiler was complaining about. The header files are found in the distribution under /include.


0 Kudos