Repository navigation
Closed
Labels
0.kind: bugSomething is broken
Description
Describe the bug
Since a recent upgrade, cc tool from LLVM suite, fails to build simple program. I cannot even invoke it with a simple command such as: clang --version:
[user@system:~]$ clang --version
mktemp: illegal option -- -
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
mktemp [-d] [-q] [-u] -t prefixSteps To Reproduce
To reproduce with cargo, but it can be reproduced without it as shown in the description.
- cargo init foo
- cd foo
- cargo build
Expected behavior
The program should build.
Additional context
cargo build
Compiling foo v0.1.0 (/Users/jaudiger/Downloads/test/foo)
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/Users/jaudiger/development/scripts:/Users/jaudiger/development/scripts/ioterop/alaska:/nix/store/dfgwfxmkvsz4lvnsc1pr5wsrrj1p9p41-devenv-profile/bin:/Users/jaudiger/.config/carapace/bin:/Users/jaudiger/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/etc/profiles/per-user/jaudiger/bin:/run/current-system/sw/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/Users/jaudiger/Development/git-repositories/jaudiger/iowa-rs/.devenv/state/cargo-install/bin:/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/bin" VSLANG="1033" ZERO_AR_DATE="1" "cc" "-arch" "arm64" "/var/folders/2p/ffp4lc_n1z3b08fcr0c8x0cw0000gn/T/nix-shell.XXXXXX.UmuyNXXk/rustcioDcXQ/symbols.o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130.1jh3lrjcj17s958y.rcgu.o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130.2xr33ct7iud5m2gv.rcgu.o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130.2xyzgcivkf9qkaqv.rcgu.o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130.3e08yhzy1ox6qalc.rcgu.o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130.5c1ulshnxmkalya4.rcgu.o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130.ahmtt8pmg7y1c7o.rcgu.o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130.2n1nhu2hh32pqpfd.rcgu.o" "-L" "/Users/jaudiger/Downloads/test/foo/target/debug/deps" "-F" "/nix/store/dfgwfxmkvsz4lvnsc1pr5wsrrj1p9p41-devenv-profile/Library/Frameworks" "-L" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libstd-ea564c277a9775e7.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libpanic_unwind-c304a3a182c52105.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libobject-0da73a32c086f64c.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libmemchr-556ad8b38e2b6326.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libaddr2line-57143c50a93b3a9f.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libgimli-adc2359764c1f3f9.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/librustc_demangle-2d8358e39b89a642.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libstd_detect-d0d09b18e41baa81.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libhashbrown-39f4403a59eee8ff.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_alloc-ecdabbd76e51f43d.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libminiz_oxide-aa17e9989b8bb446.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libadler-f43598e54d974a89.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libunwind-ea359c2001d296ca.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libcfg_if-d6ca6b2b6de59e80.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/liblibc-675c3823e7b08979.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/liballoc-b138f6381e7b42de.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/librustc_std_workspace_core-54a048c441247cd0.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libcore-1dcac5a329c19f30.rlib" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib/libcompiler_builtins-9a5dde18cc747729.rlib" "-lSystem" "-lc" "-lm" "-L" "/nix/store/vd6jzf0m9kprxyd95lkd2h3gy73sq90a-rustc-1.72.0/lib/rustlib/aarch64-apple-darwin/lib" "-o" "/Users/jaudiger/Downloads/test/foo/target/debug/deps/foo-81ff2ee467938130" "-Wl,-dead_strip" "-nodefaultlibs"
= note: mktemp: illegal option -- -
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
mktemp [-d] [-q] [-u] -t prefix
error: could not compile `foo` (bin "foo") due to previous error
Notify maintainers
Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"aarch64-darwin"`
- host os: `Darwin 22.6.0, macOS 13.5.2`
- multi-user?: `yes`
- sandbox: `no`
- version: `nix-env (Nix) 2.16.1`
- channels(root): `"nixpkgs"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`Reacted by Denis Bueno, Ray Tang and Felx
Metadata
Metadata
Assignees
Labels
0.kind: bugSomething is broken
Activity
n8henrie commentedon Sep 13, 2023
Working fine here:
jaudiger commentedon Sep 13, 2023
I resolved the aforementioned issue by using the
mktemppackage from Nix. It seems there is a compatibility issue with themktemppackage from MacOS. An option seems to be use by a tool, and this option does not exist in the version of the package exposed by MacOS. If I'm using the one from Nix, I'm now able to build Rust programs.n8henrie commentedon Sep 13, 2023
Good deal, so sounds like this issue can be closed?
jaudiger commentedon Sep 13, 2023
I'll close it, even if I'm concerned about how I encountered this issue at the first place.