Skip to content

macOS bug with newest update #80120

@brightly-salty

Description

@brightly-salty
Contributor

After installing the new macOS update (I am currently on macOS Big Sur 11.1), which also updated the XCode Command Line Tools, I am unable to compile anything that depends on basically anything high-level. Originally posted here

I tried this code:

<default main code from `cargo new` with nom and async-std added as dependencies in Cargo.toml>

I expected to see this happen: Everything work normally, cargo downloads and installs it

Instead, this happened: Cargo failed to link with a nasty error about something missing in Command Line Tools.

Meta

rustc --version --verbose:

rustc 1.50.0-nightly (b32e6e6ac 2020-12-16)
binary: rustc
commit-hash: b32e6e6ac8921035177256ab6806e6ab0d4b9b94
commit-date: 2020-12-16
host: x86_64-apple-darwin
release: 1.50.0-nightly
Backtrace

   Compiling memchr v2.3.4
   Compiling libc v0.2.81
   Compiling cache-padded v1.1.1
   Compiling log v0.4.11
   Compiling futures-core v0.3.8
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.0.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.1.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.10.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.11.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.12.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.13.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.14.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.15.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.2.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.3.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.4.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.5.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.6.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.7.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.8.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.build_script_build.4n8z0r8i-cgu.9.rcgu.o" "-o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/log-28bee42ad963d941/build_script_build-28bee42ad963d941.4knydls61gkjigat.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/deps" "-L" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-cf45c391193686b0.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-bfb82cdc97bd35ea.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libobject-0e543fa90fe41090.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f50981f4143e4c69.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgimli-bbe9b2276f9fe948.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-c04e87d408a5de4c.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-3865f13d7ece40bb.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-83f3487f53b2e684.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-518f93c579715cca.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ab0ea20e972aeb4f.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-50e4694516c58a71.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-8171c7b795c55f62.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-8357f853e5f39333.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-80c77ff1434731cf.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8c8eeab435e54e85.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun


error: aborting due to previous error

error: could not compile `log`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.0.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.1.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.10.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.11.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.12.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.13.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.14.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.15.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.2.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.3.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.4.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.5.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.6.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.7.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.8.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.build_script_build.f2xg8hgd-cgu.9.rcgu.o" "-o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/memchr-fb41dacc4fa9ff2b/build_script_build-fb41dacc4fa9ff2b.a7lkf4gtd4df4hj.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/deps" "-L" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-cf45c391193686b0.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-bfb82cdc97bd35ea.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libobject-0e543fa90fe41090.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f50981f4143e4c69.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgimli-bbe9b2276f9fe948.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-c04e87d408a5de4c.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-3865f13d7ece40bb.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-83f3487f53b2e684.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-518f93c579715cca.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ab0ea20e972aeb4f.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-50e4694516c58a71.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-8171c7b795c55f62.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-8357f853e5f39333.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-80c77ff1434731cf.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8c8eeab435e54e85.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun


error: aborting due to previous error

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.0.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.1.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.10.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.11.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.12.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.13.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.14.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.15.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.2.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.3.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.4.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.5.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.6.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.7.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.8.rcgu.o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.build_script_build.87zvmdmo-cgu.9.rcgu.o" "-o" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/build/libc-3afc5bcdbb7b041a/build_script_build-3afc5bcdbb7b041a.4oil98tj1d5tqwt6.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/cadenhaustein/MEGA/Coding_Projects/hedgehog/target/debug/deps" "-L" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-cf45c391193686b0.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-bfb82cdc97bd35ea.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libobject-0e543fa90fe41090.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-f50981f4143e4c69.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgimli-bbe9b2276f9fe948.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-c04e87d408a5de4c.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-3865f13d7ece40bb.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-83f3487f53b2e684.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-518f93c579715cca.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-ab0ea20e972aeb4f.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-50e4694516c58a71.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-8171c7b795c55f62.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-8357f853e5f39333.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-80c77ff1434731cf.rlib" "/Users/cadenhaustein/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-8c8eeab435e54e85.rlib" "-lSystem" "-lresolv" "-lc" "-lm"
  = note: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun


error: aborting due to previous error

error: build failed

Activity

brightly-salty

brightly-salty commented on Dec 17, 2020

@brightly-salty
ContributorAuthor

Was able to fix with xcode-select --install. It had been installed prior to the update, so updating to 11.1 must have uninstalled the Command Line Tools.

dreson4

dreson4 commented on Dec 18, 2020

@dreson4

Tried xcode-select --install xcode-select --reset didn't work for me.
Even tried deleting CommandLIne tools folder and reinstalling still no solution can't compile hello world.

This is still a problem.

dreson4

dreson4 commented on Dec 18, 2020

@dreson4

Ok realized it's macOS big sur issue. The C libraries location have changed and thus rust can't find them.
The solution I ended up with was

export LIBRARY_PATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib"

That's the current path for the libraries, until Apple changes again with a single update 😡

brightly-salty

brightly-salty commented on Dec 18, 2020

@brightly-salty
ContributorAuthor

@dreson4 Are you on 11.0 or 11.1? After I updated to 11.1, there was a single text file in the Developer/CommandLineTools. After running xcode-select --install and following the prompts, I then ran cargo clean and cargo build again and everything worked again.

dreson4

dreson4 commented on Dec 19, 2020

@dreson4

I'm on 11.1.
I tried xcode-select --install, cargo clean , cargo build all didn't work, even deleting the command line tools folder, reinstalling x-code.
After exporting the LIBRARY_PATH the issue has been fixed. So it's ok for now.

added
O-macosOperating system: macOS
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
and removed on Sep 7, 2023
linked a pull request that will close this issue on Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-macosOperating system: macOST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @ChrisDenton@dreson4@fmease@brightly-salty

      Issue actions

        macOS bug with newest update · Issue #80120 · rust-lang/rust