Skip to content

Instantly share code, notes, and snippets.

@danieldk
Created November 7, 2018 14:29
Show Gist options
  • Select an option

  • Save danieldk/32e8d9beba4c5d7e442f917a06ab0635 to your computer and use it in GitHub Desktop.

Select an option

Save danieldk/32e8d9beba4c5d7e442f917a06ab0635 to your computer and use it in GitHub Desktop.
Rust build error Darwin
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-sysroot/lib/rustlib/x86_64-apple-darwin/lib" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std0-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std1-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std2-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std3-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std4-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std5-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std6-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std7-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std8-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.std9-253959ed13d7cb4de72920affc706e1c.rs.rcgu.o" "-o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/libstd-ec2ed65eaa044d02.dylib" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.crate.metadata.rcgu.o" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps/std-ec2ed65eaa044d02.crate.allocator.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/deps" "-L" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/release/deps" "-L" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/native/libbacktrace/" "-L" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/native/libbacktrace" "-L" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-std/x86_64-apple-darwin/release/build/compiler_builtins-22e9f583cd68b0b6/out" "-L" "/nix/store/42lsjkifndxxzn4i8c3iyl0rijrsan0v-jemalloc-5.1.0/lib" "-L" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-sysroot/lib/rustlib/x86_64-apple-darwin/lib" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/native/libbacktrace/libbacktrace.a" "-lSystem" "-lresolv" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/libpanic_unwind-a84911fec51083b2.rlib" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/liballoc_jemalloc-e7b3103f124fbae0.rlib" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/libunwind-755b3176ad02a994.rlib" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/liballoc_system-09e4527d0c37fb35.rlib" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/liblibc-f643fd59cdd72307.rlib" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/liballoc-e72c39acf1597006.rlib" "-Wl,-force_load" "-Wl,/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/libcore-b9296007fd078eab.rlib" "/private/tmp/nix-build-rustc-1.29.2.drv-0/rustczfGReA/libcompiler_builtins-a6686c1cb5ff2b11.rlib" "-lpthread" "-lc" "-lm" "-dynamiclib" "-Wl,-dylib" "-Wl,-install_name" "-Wl,@rpath/libstd-ec2ed65eaa044d02.dylib" "-Wl,-rpath,@loader_path/../lib"
= note: ld: warning: directory not found for option '-L/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-sysroot/lib/rustlib/x86_64-apple-darwin/lib'
ld: warning: directory not found for option '-L/private/tmp/nix-build-rustc-1.29.2.drv-0/rustc-1.29.2-src/build/x86_64-apple-darwin/stage0-sysroot/lib/rustlib/x86_64-apple-darwin/lib'
Undefined symbols for architecture x86_64:
"typeinfo for std::bad_alloc", referenced from:
GCC_except_table8 in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"___cxa_guard_acquire", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"std::__1::mutex::~mutex()", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"std::terminate()", referenced from:
___clang_call_terminate in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"std::__1::mutex::lock()", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"std::set_new_handler(void (*)())", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"std::__1::mutex::unlock()", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"___cxa_begin_catch", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
___clang_call_terminate in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"_je_mallocx", referenced from:
___rde_alloc in liballoc_jemalloc-e7b3103f124fbae0.rlib(alloc_jemalloc-e7b3103f124fbae0.alloc_jemalloc0-74f4696faa327c66302b5cd10bdd5d6a.rs.rcgu.o)
___rde_alloc_zeroed in liballoc_jemalloc-e7b3103f124fbae0.rlib(alloc_jemalloc-e7b3103f124fbae0.alloc_jemalloc0-74f4696faa327c66302b5cd10bdd5d6a.rs.rcgu.o)
"std::__throw_bad_alloc()", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"_je_sdallocx", referenced from:
___rde_dealloc in liballoc_jemalloc-e7b3103f124fbae0.rlib(alloc_jemalloc-e7b3103f124fbae0.alloc_jemalloc0-74f4696faa327c66302b5cd10bdd5d6a.rs.rcgu.o)
"_je_rallocx", referenced from:
___rde_realloc in liballoc_jemalloc-e7b3103f124fbae0.rlib(alloc_jemalloc-e7b3103f124fbae0.alloc_jemalloc0-74f4696faa327c66302b5cd10bdd5d6a.rs.rcgu.o)
"___gxx_personality_v0", referenced from:
operator new(unsigned long, std::nothrow_t const&) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
operator new[](unsigned long, std::nothrow_t const&) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"_je_calloc", referenced from:
___rde_alloc_zeroed in liballoc_jemalloc-e7b3103f124fbae0.rlib(alloc_jemalloc-e7b3103f124fbae0.alloc_jemalloc0-74f4696faa327c66302b5cd10bdd5d6a.rs.rcgu.o)
"___cxa_guard_release", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
"___cxa_end_catch", referenced from:
handleOOM(unsigned long, bool) in liballoc_jemalloc-e7b3103f124fbae0.rlib(jemalloc_cpp.pic.o)
ld: symbol(s) not found for architecture x86_64
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
error: Could not compile `std`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment