Closed bjorn3 closed 6 years ago
XCode version 9.1 (9B55)
$ cc -v
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I also ran into this, the fix seems to just be to just delete build/x86_64-apple-darwin/llvm
Installing ninja
solved this.
With `-v`
```sh $ ./x.py build -v Updating submodules running: git submodule -q sync running: git submodule update --init --recursive src/llvm src/rt/hoedown src/jemalloc src/tools/rust-installer src/liblibc src/doc/nomicon src/tools/cargo src/doc/reference src/doc/book src/tools/rls src/libcompiler_builtins src/tools/clippy src/tools/rustfmt src/tools/miri src/dlmalloc src/binaryen running: git submodule -q foreach git reset -q --hard running: git submodule -q foreach git clean -qdfx running: /Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/stage0/bin/cargo build --manifest-path /Users/bjorn/Documents/rust_fork/src/bootstrap/Cargo.toml --verbose Fresh unicode-xid v0.0.4 Fresh cc v1.0.3 Fresh itoa v0.3.4 Fresh getopts v0.2.15 Fresh serde v1.0.19 Fresh num-traits v0.1.40 Fresh libc v0.2.33 Fresh dtoa v0.4.2 Fresh quote v0.3.15 Fresh lazy_static v0.2.9 Fresh cfg-if v0.1.2 Fresh synom v0.11.3 Fresh cmake v0.1.26 Fresh toml v0.4.5 Fresh num_cpus v1.7.0 Fresh serde_json v1.0.6 Fresh filetime v0.1.14 Fresh syn v0.11.11 Fresh build_helper v0.1.0 (file:///Users/bjorn/Documents/rust_fork/src/build_helper) Fresh serde_derive_internals v0.17.0 Fresh serde_derive v1.0.19 Fresh bootstrap v0.0.0 (file:///Users/bjorn/Documents/rust_fork/src/bootstrap) Finished dev [unoptimized] target(s) in 0.2 secs running: /Users/bjorn/Documents/rust_fork/build/bootstrap/debug/bootstrap build -v finding compilers CC_x86_64-apple-darwin = "cc" AR_x86_64-apple-darwin = "ar" CXX_x86_64-apple-darwin = "c++" running sanity check learning about cargo > Assemble { target_compiler: Compiler { stage: 2, host: "x86_64-apple-darwin" } } > Assemble { target_compiler: Compiler { stage: 1, host: "x86_64-apple-darwin" } } > Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } < Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } > Rustc { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } > Test { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } > Std { target: "x86_64-apple-darwin", compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } > StartupObjects { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } < StartupObjects { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } Building stage0 std artifacts (x86_64-apple-darwin -> x86_64-apple-darwin) > Sysroot { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } < Sysroot { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } running: "/Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/stage0/bin/cargo" "build" "--target" "x86_64-apple-darwin" "-j" "8" "--release" "--features" "panic-unwind jemalloc backtrace" "--manifest-path" "/Users/bjorn/Documents/rust_fork/src/libstd/Cargo.toml" "--message-format" "json" Finished release [optimized] target(s) in 0.25 secs not updating "/Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/.libstd.stamp"; contents equal and 1511601778.000000000s <= 1511601778.000000000s c Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } > StdLink { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } Copying stage0 std from stage0 (x86_64-apple-darwin -> x86_64-apple-darwin / x86_64-apple-darwin) > Libdir { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } c Sysroot { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } < Libdir { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } > CleanTools { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin", mode: Libstd } < CleanTools { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin", mode: Libstd } < StdLink { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } < Std { target: "x86_64-apple-darwin", compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } Building stage0 test artifacts (x86_64-apple-darwin -> x86_64-apple-darwin) c Sysroot { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } running: "/Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/stage0/bin/cargo" "build" "--target" "x86_64-apple-darwin" "-j" "8" "--release" "--manifest-path" "/Users/bjorn/Documents/rust_fork/src/libtest/Cargo.toml" "--message-format" "json" Finished release [optimized] target(s) in 0.1 secs not updating "/Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/stage0-test/x86_64-apple-darwin/release/.libtest.stamp"; contents equal and 1511601783.000000000s <= 1511601784.000000000s c Assemble { target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" } } > TestLink { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } Copying stage0 test from stage0 (x86_64-apple-darwin -> x86_64-apple-darwin / x86_64-apple-darwin) c Libdir { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } > CleanTools { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin", mode: Libtest } < CleanTools { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin", mode: Libtest } < TestLink { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target_compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } < Test { compiler: Compiler { stage: 0, host: "x86_64-apple-darwin" }, target: "x86_64-apple-darwin" } > Llvm { target: "x86_64-apple-darwin" } Building LLVM for x86_64-apple-darwin running: "cmake" "/Users/bjorn/Documents/rust_fork/src/llvm" "-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_TARGETS_TO_BUILD=X86;ARM;AArch64;Mips;PowerPC;SystemZ;JSBackend;MSP430;Sparc;NVPTX;Hexagon" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_TESTS=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_ENABLE_ZLIB=OFF" "-DWITH_POLLY=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=8" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-apple-darwin" "-DLLVM_LINK_LLVM_DYLIB=ON" "-DCMAKE_C_COMPILER=cc" "-DCMAKE_CXX_COMPILER=c++" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64 -stdlib=libc++" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64 -stdlib=libc++" "-DCMAKE_INSTALL_PREFIX=/Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/llvm" "-DCMAKE_BUILD_TYPE=Release" CMake Warning at /usr/local/Cellar/cmake/3.9.6/share/cmake/Modules/Platform/Darwin-Initialize.cmake:121 (message): Ignoring CMAKE_OSX_SYSROOT value: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk because the directory does not exist. Call Stack (most recent call first): /usr/local/Cellar/cmake/3.9.6/share/cmake/Modules/CMakeSystemSpecificInitialize.cmake:8 (include) CMakeLists.txt:47 (project) -- The ASM compiler identification is unknown -- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- Warning: Did not find file Compiler/-ASM -- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool CMake Warning at CMakeLists.txt:140 (message): Job pooling is only available with Ninja generators. -- Native target architecture is X86 -- Threads enabled. -- Doxygen disabled. -- Sphinx disabled. -- Go bindings disabled. -- 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-darwin16.6.0 -- LLVM default target triple: x86_64-apple-darwin -- Building with -fPIC -- Constructing LLVMBuild project information -- Targeting X86 -- Targeting ARM -- Targeting AArch64 -- Targeting Mips -- Targeting PowerPC -- Targeting SystemZ -- Targeting JSBackend -- Targeting MSP430 -- Targeting Sparc -- Targeting NVPTX -- Targeting Hexagon -- Configuring done CMake Warning (dev): Policy CMP0068 is not set: RPATH settings on macOS do not affect install_name. Run "cmake --help-policy CMP0068" for policy details. Use the cmake_policy command to set the policy and suppress this warning. For compatibility with older versions of CMake, the install_name fields for the following targets are still affected by RPATH settings: LTO This warning is for project developers. Use -Wno-dev to suppress it. -- Generating done -- Build files have been written to: /Users/bjorn/Documents/rust_fork/build/x86_64-apple-darwin/llvm/build running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--" "-j" "8" [ 0%] Built target LLVMDemangle [ 1%] Built target LLVMTableGen [ 2%] Built target LLVMMCParser [ 2%] Built target LLVMMCDisassembler [ 5%] Built target LLVMMC [ 5%] Built target LLVMHello_exports [ 7%] Built target obj.llvm-tblgen [ 12%] Built target LLVMSupport [ 13%] Built target LLVMObjectYAML [ 13%] Built target LLVMOption [ 13%] Built target LLVMDebugInfoMSF [ 14%] Built target LLVMDebugInfoDWARF [ 15%] Built target LLVMDebugInfoCodeView [ 19%] Built target LLVMDebugInfoPDB [ 19%] Built target LLVMSymbolize Scanning dependencies of target LLVMXRay Scanning dependencies of target FileCheck [ 19%] Built target LLVMLineEditor Scanning dependencies of target not [ 19%] Built target llvm-PerfectShuffle Scanning dependencies of target yaml-bench [ 19%] Built target LTO_exports [ 19%] Built target count [ 19%] Building CXX object utils/not/CMakeFiles/not.dir/not.cpp.o [ 19%] Linking CXX executable ../../bin/llvm-config [ 19%] Building CXX object lib/XRay/CMakeFiles/LLVMXRay.dir/Trace.cpp.o [ 19%] Building CXX object utils/yaml-bench/CMakeFiles/yaml-bench.dir/YAMLBench.cpp.o [ 19%] Building CXX object utils/FileCheck/CMakeFiles/FileCheck.dir/FileCheck.cpp.o Scanning dependencies of target llvm-c-test [ 19%] Creating export file for BugpointPasses Scanning dependencies of target llvm-cat [ 19%] Built target BugpointPasses_exports ld: library not found for -lLLVM clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/llvm-config] Error 1 make[1]: *** [tools/llvm-config/CMakeFiles/llvm-config.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... Scanning dependencies of target llvm-cov [ 19%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/attributes.c.o [ 19%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/calc.c.o [ 19%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/diagnostic.c.o [ 19%] Building CXX object tools/llvm-cat/CMakeFiles/llvm-cat.dir/llvm-cat.cpp.o [ 19%] Linking CXX executable ../../bin/not [ 20%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/disassemble.c.o [ 20%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/llvm-cov.cpp.o [ 20%] Building CXX object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/echo.cpp.o [ 20%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/gcov.cpp.o [ 20%] Linking CXX executable ../../bin/yaml-bench [ 20%] Built target not In file included from /Users/bjorn/Documents/rust_fork/src/llvm/tools/llvm-cat/llvm-cat.cpp:16: In file included from /Users/bjorn/Documents/rust_fork/src/llvm/include/llvm/Bitcode/BitcodeReader.h:19: In file included from /Users/bjorn/Documents/rust_fork/src/llvm/include/llvm/IR/ModuleSummaryIndex.h:25: In file included from /Users/bjorn/Documents/rust_fork/src/llvm/include/llvm/IR/Module.h:21: In file included from /Users/bjorn/Documents/rust_fork/src/llvm/include/llvm/IR/Function.h:24: In file included from /Users/bjorn/Documents/rust_fork/src/llvm/include/llvm/IR/Argument.h:19: /Users/bjorn/Documents/rust_fork/src/llvm/include/llvm/IR/Attributes.h:71:14: fatal error: 'llvm/IR/Attributes.gen' file not found #include "llvm/IR/Attributes.gen" ^~~~~~~~~~~~~~~~~~~~~~~~ [ 20%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/helpers.c.o [ 20%] Linking CXX static library ../libLLVMXRay.a 1 error generated. make[2]: *** [tools/llvm-cat/CMakeFiles/llvm-cat.dir/llvm-cat.cpp.o] Error 1 make[1]: *** [tools/llvm-cat/CMakeFiles/llvm-cat.dir/all] Error 2 [ 20%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CodeCoverage.cpp.o [ 20%] Built target yaml-bench [ 20%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/include-all.c.o [ 20%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageExporterJson.cpp.o [ 20%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageFilters.cpp.o [ 20%] Built target LLVMXRay [ 20%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/main.c.o [ 21%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageReport.cpp.o [ 21%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/CoverageSummaryInfo.cpp.o [ 21%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/module.c.o [ 21%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/metadata.c.o [ 21%] Linking CXX executable ../../bin/FileCheck [ 21%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/object.c.o [ 21%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageView.cpp.o [ 21%] Building C object tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/targets.c.o [ 21%] Built target FileCheck [ 21%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewHTML.cpp.o [ 21%] Linking CXX executable ../../bin/llvm-c-test [ 21%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/SourceCoverageViewText.cpp.o ld: library not found for -lLLVM clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/llvm-c-test] Error 1 make[1]: *** [tools/llvm-c-test/CMakeFiles/llvm-c-test.dir/all] Error 2 [ 21%] Building CXX object tools/llvm-cov/CMakeFiles/llvm-cov.dir/TestingSupport.cpp.o [ 21%] Linking CXX executable ../../bin/llvm-cov ld: library not found for -lLLVM clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [bin/llvm-cov] Error 1 make[1]: *** [tools/llvm-cov/CMakeFiles/llvm-cov.dir/all] Error 2 make: *** [all] Error 2 thread 'main' panicked at ' command did not execute successfully, got: exit code: 2 build script failed, must exit now', /Users/bjorn/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.26/src/lib.rs:599:4 stack backtrace: 0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace 1: std::sys_common::backtrace::_print 2: std::panicking::default_hook::{{closure}} 3: std::panicking::default_hook 4: std::panicking::rust_panic_with_hook 5: std::panicking::begin_panic 6: std::panicking::begin_panic_fmt 7: cmake::fail 8: cmake::run 9: cmake::Config::build 10: