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

Riyaz Puthiyapurayil via Openmp-dev openmp-dev at lists.llvm.org
Fri Sep 2 21:07:03 PDT 2016


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20160903/4a398784/attachment.html>


More information about the Openmp-dev mailing list