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

Binary compiled with Clang++ 5.5.0 on GNU/Linux crashes [TBB 2018U1]


Hello there:

I am trying to compile my C++ 14 code with Clang++ 5.0.0 on GNU/Linux using TBB 2018 update 1. Everything works fine with g++ 7.2.0 and Intel C++ Compiler 18, but when I try to switch to Clang++, it compiles but it crashes when I try to run it. Even, a simple hello world appliccation crashes when link it with TBB.

I am using the following module for detecting TBB from my system with cmake 3.9.3. The error is the following:

When I run it from terminal:

terminating with unexpected foreign exception
Aborted (core dumped)


When I run it from Clion 2017.2.3:

terminating with unexpected foreign exception

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

Also, I have tried to compile TBB from source code using Clang++ and libc++ but without success. I got a linker error. But when I try to compile only with Clang++ (without libc++), TBB compile with success. Also, using the compiled TBB also crashed the binary.

I have tried the following linker flags (obtained from here):


-DCMAKE_EXE_LINKER_FLAGS="-lc++ -lc++abi -lm -lc -lgcc_s -lgcc"

I am using Linux kernel 4.13.3. Clang++ 5.5.0, Intel C++ compiler 18.0.0 20170811 and g++ 7.2.0.

Am I missing something or doing something in the wrong way?

Thanks in advance.

0 Kudos
0 Replies