[Openmp-dev] LLVM 3.9 openmp build failure on linux -- cannot find atomic

Hahnfeld, Jonas via Openmp-dev openmp-dev at lists.llvm.org
Sun Sep 11 23:03:26 PDT 2016


Hi,

 

-stdlib=libc++ is needed if you wish to use libc++ on a Linux system that would otherwise require a recent version of libstdc++ from GCC.

The flag is currently passed in by the LLVM root build system but probably does not work because the .c files are compiled as C++.

Intel’s plan was to clean that up by the end of September which should fix the problem.

 

In the meantime, could you try to specify LIBOMP_CXXFLAGS which should inject the parameters to the right places?

Note: The runtime does not really use or link against libc++ nor libstdc++ but clang requires the flag to actually find the atomic header…

 

Cheers,

Jonas

 

From: Openmp-dev [mailto:openmp-dev-bounces at lists.llvm.org] On Behalf Of Paul Osmialowski via Openmp-dev
Sent: Friday, September 09, 2016 8:25 PM
To: openmp-dev at lists.llvm.org
Subject: Re: [Openmp-dev] LLVM 3.9 openmp build failure on linux -- cannot find atomic

 

Hi Riyaz,

 

I'm always building LLVM OpenMP runtime with latest LLVM and Clang (from git master) and I on every of my Linux machines I never had to set any additional flags. What system are you building it on?

 

On 09/03/16 05:07, Riyaz Puthiyapurayil via Openmp-dev wrote:

With Release 3.9, kmp_lock.h is now including <atomic> under #ifdef __cplusplus. This wasn’t the case with Release 3.8.1. However, there are ‘.c’ files that are compiled as C++ files with ‘-x c++’ but they are not compiled with -stdlib=libc++. As a result, clang does not find <atomic> and gives the following error:

 

… Building C object projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.c.o

:

:

In file included from /remote/vgsource7/riyaz/llvm/projects/openmp/runtime/src/kmp_error.c:16:

In file included from /remote/vgsource7/riyaz/llvm/projects/openmp/runtime/src/kmp.h:92:

/remote/vgsource7/riyaz/llvm/projects/openmp/runtime/src/kmp_lock.h:26:10: fatal error: 'atomic' file not found

#include <atomic>

         ^

1 error generated.

 

Should LIBOMP_USE_STDCPPLIB be set to TRUE?

 

-Riyaz

 






_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20160912/cc2524f0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5868 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20160912/cc2524f0/attachment.bin>


More information about the Openmp-dev mailing list