Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Heiko_Bauke
Beginner
86 Views

Compiling TBB on Linux using Sun Studio 12.1 compilers

In the past I managed to compile Intel Threading Building Blocks on Linux using the GNU C/C++ compiler or the Intel C/C++ compiler. TBB also support Sun Studio compilers on Solaris. Today I tried to compile TBB on a Linux box running Ubuntu 9.10 (x86) using the Sun Studio 12.1 compilers, unfortunately without success.

This combination of OS and compiler is not supported by TBB 2.2. Thus, I copied the file SunOS.suncc.inc to linux.suncc.inc and started the compilation of TBB by "OS=linux compiler=suncc make". However, I got several errors. My approach is probably to naive.

Has anybody managed to compile TBB on Linux using Sun Studio compilers?

0 Kudos
4 Replies
Anton_M_Intel
Employee
86 Views

Your approach is basically right. Please check whether some OS-specific stuff sneaked into compiler-specific "linux.suncc.inc" or vice-versa, compiler-spicifics come into linux.inc. E.g. I found "EXPORT_KEY" definition in linux.inc which should not be there by design. So, please try to move it into compiler files instead.
If you still are not able to compile with suncc, could you share the output with the errors?
Heiko_Bauke
Beginner
86 Views

Finally, I managed to compile TBB on Linux using the Sun compiler. However, just editing "linux.suncc.inc" was not enough. The main problem is that TBB includes several Linux system headers that declare different sets of functions and macros depending on the compiler. For example syscall and pthread_getattr_np cannot be found if the Sun compiler is used. Thus, I had to apply several work-arounds. E.g. in scheduler.cpp I had to add
[cpp]extern "C" int pthread_getattr_np(pthread_t thread, pthread_attr_t *attr); [/cpp]


Alexey_K_Intel3
Employee
86 Views

We would be glad to accept your work as a contribution, and see whether we can incorporate it into the main source trunk, should anybody else be interested in it.
zzli
Beginner
86 Views

Hello Heiko,

I also want to compile TBB on linux with Oracle Studio 12.2. Could you plese tell me in detail about the modifications you made?

Thanks,
Zhongze
Reply