[Openmp-dev] CMake config failure

Jim Cownie via Openmp-dev openmp-dev at lists.llvm.org
Thu Feb 4 04:43:10 PST 2021


p.s. Note that if I switch to the “master” branch (and add a few more build targets as below), then this failure does not occur.
     -DLLVM_ENABLE_PROJECTS='clang;openmp;polly;clang-tools-extra;libcxx;libcxxabi' 

> On 4 Feb 2021, at 12:34, Jim Cownie <JCOWNIE at GMAIL.COM> wrote:
> 
> I am trying to build the runtime on MacOS, but Cmake is failing.
> 
> $ git branch 
>   master
>   release/11.x
> * release/12.x
> 
> $ git describe
> llvmorg-12.0.0-rc1-51-ge8cdcaeae406
> 
> $ cat JimConfig.sh
> // Config script
> BUILD_SYSTEM=Ninja
> BUILD_TAG=ninja
> INSTALLDIR=$HOME/software/clang-12.0.0/arm64
> 
> cmake ../llvm \
>       -G$BUILD_SYSTEM -B ${BUILD_TAG}_build \
>       -DCMAKE_OSX_ARCHITECTURES='arm64' \
>       -DCMAKE_C_COMPILER=`which clang` \
>       -DCMAKE_CXX_COMPILER=`which clang++` \
>       -DCMAKE_BUILD_TYPE=Release \
>       -DCMAKE_INSTALL_PREFIX=$INSTALLDIR \
>       -DLLVM_LOCAL_RPATH=$INSTALLDIR/lib \
>       -DLLVM_ENABLE_WERROR=FALSE \
>       -DLLVM_TARGETS_TO_BUILD='AArch64' \
>       -DLLVM_DEFAULT_TARGET_TRIPLE='aarch64-apple-darwin20.2.0' \
>       -DDEFAULT_SYSROOT="$(xcrun --show-sdk-path)" \
>       -DLLVM_ENABLE_PROJECTS=‘openmp'
> 
> $ sh JimConfig.sh 
> -- clang project is disabled
> -- clang-tools-extra project is disabled
> -- compiler-rt project is disabled
> -- debuginfo-tests project is disabled
> -- libc project is disabled
> -- libclc project is disabled
> -- libcxx project is disabled
> -- libcxxabi project is disabled
> -- libunwind project is disabled
> -- lld project is disabled
> -- lldb project is disabled
> -- mlir project is disabled
> -- openmp project is enabled
> -- parallel-libs project is disabled
> -- polly project is disabled
> -- pstl project is disabled
> -- flang project is disabled
> -- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
> -- Native target X86 is not selected; lli will not JIT code
> -- Threads enabled.
> -- Doxygen disabled.
> -- Go bindings disabled.
> -- Ninja version: 1.10.2
> -- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
> -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
> -- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
> -- OCaml bindings disabled.
> -- LLVM host triple: x86_64-apple-darwin20.2.0
> -- LLVM default target triple: aarch64-apple-darwin20.2.0
> CMake Warning at cmake/modules/HandleLLVMOptions.cmake:261 (message):
>   -fPIC is not supported.
> Call Stack (most recent call first):
>   cmake/modules/HandleLLVMOptions.cmake:297 (add_flag_or_print_warning)
>   CMakeLists.txt:698 (include)
> 
> 
> -- Targeting AArch64
> CMake Error at /Users/jcownie/llvm-project/openmp/CMakeLists.txt:93 (add_subdirectory):
>   The binary directory
> 
>     /Users/jcownie/llvm-project/build_aarch64/ninja_build/projects/openmp/runtime
> 
>   is already used to build a source directory.  It cannot be used to build
>   source directory
> 
>     /Users/jcownie/llvm-project/openmp/runtime
> 
>   Specify a unique binary directory name.
> 
> 
> -- Registering Bye as a pass plugin (static build: OFF)
> -- Failed to find LLVM FileCheck
> -- Version: 0.0.0
> -- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- failed to compile
> -- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
> -- Performing Test HAVE_POSIX_REGEX -- success
> -- Performing Test HAVE_STEADY_CLOCK -- success
> -- Configuring incomplete, errors occurred!
> See also "/Users/jcownie/llvm-project/build_aarch64/ninja_build/CMakeFiles/CMakeOutput.log".
> See also "/Users/jcownie/llvm-project/build_aarch64/ninja_build/CMakeFiles/CMakeError.log".
> $ 
> 
> This previously worked (with an older version of 12.0).
> 
> Suggestions, please...
> 
> -- Jim
> James Cownie <jcownie at gmail.com <mailto:jcownie at gmail.com>>
> Mob: +44 780 637 7146
> 


-- Jim
James Cownie <jcownie at gmail.com>
Mob: +44 780 637 7146




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20210204/078188fb/attachment-0001.html>


More information about the Openmp-dev mailing list