The forum post is quite old, but still wanted to mention that now the Intel Compilers support static linking of libraries for creation of standalone binaries. One can use "-static-intel" flag to statically link libraries such as Intel TBB, this flag can be provided to icpc binary with other options. This will obviously make the binary larger in size. One can distribute this binary without the need of having the libtbb.so present at the destination system and eventually no need of LD_Config.
"-static-intel" does statically linked the tbb bindings in my case. When I removed the flag, I couldn't execute the binary on system having no tbb installed. With the flag, I can execute the binary on any system. Besides here is the excerpt from the man page of icpc.
-shared-intel Causes Intel-provided libraries to be linked in dynamically. Arguments: None Default: OFF Intel(R) libraries are linked in statically, with the exception of Intel's OpenMP* runtime support library, which is linked in dynamically. Description: This option causes Intel-provided libraries to be linked in dynamically. It is the opposite of -static-intel. If you specify option -mcmodel=medium or -mcmodel=large, it sets option -shared-intel.
It mentions specifically "-static-intel" is opposite of "-shared-intel".
Any comments on this?
You are looking at Intel Compiler options and compiler runtime. Intel TBB is not a part of compiler, it is a part of Intel Parallel Studio. AFAIR the only option recognized by compiler is "-tbb". You need to check your system. Many Linux distributions include TBB libraries. Run ldd on your executable to check how you link with tbb.