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

Building TBB as a static library on Linux

Jogi_Narain
Beginner
466 Views
I understand that this is not the most optimum way of using TBB but can I build a static library on Linux? I have seen this (and done it) on Windows.

Is it just a matter of modifying the Makefiles?
0 Kudos
3 Replies
sreenu30
Beginner
466 Views
Quoting - Jogi Narain
I understand that this is not the most optimum way of using TBB but can I build a static library on Linux? I have seen this (and done it) on Windows.

Is it just a matter of modifying the Makefiles?

I am also looking for this. I tried modifying the Makefiles, but it didnt work for me. Has someone got it working?
Jogi_Narain
Beginner
466 Views
Quoting - sreenu30

I am also looking for this. I tried modifying the Makefiles, but it didnt work for me. Has someone got it working?
I still haven't managed to get a static build done but I have now been able incorporate the dynamic library into an existing binary by linking against the dynamic library.

Not really a satisfactory solution but it allows me to continue.


Vivek_Rajagopalan
466 Views
Quoting - Jogi Narain
I still haven't managed to get a static build done but I have now been able incorporate the dynamic library into an existing binary by linking against the dynamic library.

Not really a satisfactory solution but it allows me to continue.



IIRC, there are issues with static linking due to ownership issues of certain singletons. I don't know if this is still the case with tbb 2.2

Unless you really know what you are doing, I'd stay with dynamic linking. If you really want to try static linking, this link might be of help http://software.intel.com/en-us/forums/showthread.php?t=64241
Reply