[cfe-dev] Error building openmp 3.1 on clang 3.7

Marcelo Novaes via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 9 10:15:10 PDT 2017


Hi all,

Should I be able to use OpenMP 3.1 using Clang 3.7 on  LLVM 3.7 on an ARM
board with a Linux 3.10.63+?

I've built the llvm 3.7 with clang 3.7 successfully, but it didn't generate
omp dynamic lib. I'm getting an error when I try to do a "make" inside of
my build/projects/openmp.

Linking C shared library ../../../../lib/libomp.so
CMakeFiles/omp.dir/z_Linux_util.c.o: In function `__kmp_invoke_microtask':
z_Linux_util.c:(.text.__kmp_invoke_microtask+0x9e): undefined reference to
`ffi_prep_cif'
z_Linux_util.c:(.text.__kmp_invoke_microtask+0xac): undefined reference to
`ffi_call'
z_Linux_util.c:(.text.__kmp_invoke_microtask+0xd4): undefined reference to
`ffi_type_pointer'
z_Linux_util.c:(.text.__kmp_invoke_microtask+0xd8): undefined reference to
`ffi_type_void'
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libomp.so] Error 1

However, I have libffi linked, it didn't help.

I want to generate a dyn lib I can call, I was calling a dyn from my gcc,
but clang was not able to execute multi thread code compiled with the
gcc's dynamic lib (it basically ignored the pragmas).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170809/ef3cc4ab/attachment.html>


More information about the cfe-dev mailing list