[llvm-dev] cmake 3.7.0-rc1 breaks stage2 bootstrap in openmp on 10.11 with Xcode 8
Jack Howarth via llvm-dev
llvm-dev at lists.llvm.org
Sat Oct 8 10:33:54 PDT 2016
The new cmake 3.7.0-rc1 release produces a stage2 bootstrap failure in
openmp project build on OS X 10.11 under Xcode 8....
In file included from
/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src/kmp_alloc.c:16:
In file included from
/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src/kmp.h:98:
/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src/kmp_lock.h:26:10:
fatal error: 'atomic' file not found
#include <atomic>
^
This appears to be due to the new cmake 3.7.0-rc1 resulting in
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
being used in the compilation of openmp....
cd /sw/src/fink.build/llvm40-4.0.0-1/build/stage2/projects/openmp/runtime/src
&& /sw/src/fink.build/llvm40-4.0.0-1/opt-bin/cc-st1-clang
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-Domp_EXPORTS -I/sw/src/fink.build/llvm40-4.0.0-1/build/stage2/projects/openmp/runtime/src
-I/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src
-I/sw/src/fink.build/llvm40-4.0.0-1/build/stage2/include
-I/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/include
-I/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src/i18n
-I/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src/include/45
-I/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src/thirdparty/ittnotify
-Wall -W -Wno-unused-parameter -Wwrite-strings
-Wmissing-field-initializers -pedantic -Wno-long-long
-Wcovered-switch-default -Wdelete-non-virtual-dtor -Werror=date-time
-O3 -DNDEBUG -arch x86_64 -arch i386 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
-fPIC -D _GNU_SOURCE -D _REENTRANT -I/sw/include -std=c++11
-fno-exceptions -Wno-sign-compare -Wno-unused-function
-Wno-unused-local-typedef -Wno-unused-value -Wno-unused-variable
-Wno-switch -Wno-covered-switch-default -Wno-deprecated-register
-Wno-gnu-anonymous-struct -Wno-unknown-pragmas
-Wno-missing-field-initializers -Wno-missing-braces -Wno-comment
-Wno-self-assign -Wno-vla-extension -Wno-format-pedantic -x c++ -o
CMakeFiles/omp.dir/kmp_alloc.c.o -c
/sw/src/fink.build/llvm40-4.0.0-1/llvm-4.0.0.src/projects/openmp/runtime/src/kmp_alloc.c
The problem doesn't exist under cmake 3.6.2 because the openmp build
doesn't append -isysroot in that case.
Jack
ps Note this seems to be related to using any SDK for -sysroot as
substituting...
-isysroot /Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
from the Xcode 7.3.1 release also fails but substituting...
-isysroot /
or omitting -sysroot entirely allows the compilation to succeed. So it
seems that the openmp code doesn't like being compiled against SDKs
rather than / on darwin.
More information about the llvm-dev
mailing list