rusty-dos
rusty-dos copied to clipboard
Compilation error on macOS 12.6.3 (clang-1400.0.29.202)
I entirely expect this is because I'm not using actual gcc
but I hit link-time errors when building at the moment:
WARN rustc_codegen_ssa::back::link Linker does not support -no-pie command line option. Retrying without.
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/Users/me/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/me/.cargo/bin:/opt/homebrew/opt/openjdk/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion Tech Preview.app/Contents/Public" VSLANG="1033" "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-Wl,--gc-sections" "-m16" "-nostdlib" "-march=i386" "-ffreestanding" "-fno-pie" "-Tcom.ld" "/var/folders/db/k7txrdsj4cl_p_bf5_5gz9c00000gn/T/rustceH6GoE/symbols.o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.dos.49079d62-cgu.0.rcgu.o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.dos.49079d62-cgu.1.rcgu.o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.dos.49079d62-cgu.2.rcgu.o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.dos.49079d62-cgu.3.rcgu.o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.dos.49079d62-cgu.4.rcgu.o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.dos.49079d62-cgu.5.rcgu.o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.dos.49079d62-cgu.6.rcgu.o" "-Wl,--as-needed" "-L" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps" "-L" "/Users/me/Documents/Code/rust/other/rusty-dos/target/release/deps" "-L" "/Users/me/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib" "-Wl,-Bstatic" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/libstatic_assertions-7b3a22f385d712a5.rlib" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/libbitflags-df4d6f15de3bffa7.rlib" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/librustc_std_workspace_core-72e6f8c8fd97affe.rlib" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/libcore-9701ff8d25450f25.rlib" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/libcompiler_builtins-1f1e3cf246152175.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/Users/me/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib" "-o" "/Users/me/Documents/Code/rust/other/rusty-dos/target/dos/release/deps/dos-094b9fa3f51d414f.com" "-Wl,--gc-sections" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: ld: warning: directory not found for option '-L/Users/me/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib'
ld: warning: directory not found for option '-L/Users/me/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib'
ld: unknown option: --as-needed
clang: error: linker command failed with exit code 1 (use -v to see invocation)
warning: `dos` (bin "dos") generated 14 warnings
error: could not compile `dos` (bin "dos") due to previous error; 14 warnings emitted
MyMachin:rusty-dos me$ cc --version
Apple clang version 14.0.0 (clang-1400.0.29.202)
Target: arm64-apple-darwin21.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
I've got the same error trying to compile on the latest macOS (ARM):
error: linking with `cc` failed: exit status: 1
|
= note: LC_ALL="C" PATH="/Users/arg/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/Users/arg/.rbenv/shims:/Users/arg/.cargo/bin:/Users/arg/.rbenv/shims:/opt/homebrew/sbin:/opt/homebrew/bin:/Users/arg/.local/bin:/opt/homebrew/opt/fzf/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin" VSLANG="1033" "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-Wl,--gc-sections" "-m16" "-nostdlib" "-march=i386" "-ffreestanding" "-fno-pie" "-Tcom.ld" "/var/folders/6s/mmf24w6d3vg6132q1kf5j2sr0000gn/T/rustc2CLDNe/symbols.o" "/Users/arg/Development/dosrust/target/dos/release/deps/dos-4bce01320b08944f.dos.b2504f06377c94f-cgu.0.rcgu.o" "-Wl,--as-needed" "-L" "/Users/arg/Development/dosrust/target/dos/release/deps" "-L" "/Users/arg/Development/dosrust/target/release/deps" "-L" "/Users/arg/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib" "-Wl,-Bstatic" "/Users/arg/Development/dosrust/target/dos/release/deps/libstatic_assertions-eefbda7a030c38eb.rlib" "/Users/arg/Development/dosrust/target/dos/release/deps/libbitflags-4359290eb120422f.rlib" "/Users/arg/Development/dosrust/target/dos/release/deps/librustc_std_workspace_core-9be288d33a3daf80.rlib" "/Users/arg/Development/dosrust/target/dos/release/deps/libcore-55990f33432d5897.rlib" "/Users/arg/Development/dosrust/target/dos/release/deps/libcompiler_builtins-5c1c1aefb3d9c6e3.rlib" "-Wl,-Bdynamic" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/Users/arg/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib" "-o" "/Users/arg/Development/dosrust/target/dos/release/deps/dos-4bce01320b08944f.com" "-Wl,--gc-sections" "-Wl,-z,relro,-z,now" "-nodefaultlibs"
= note: ld: warning: directory not found for option '-L/Users/arg/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib'
ld: warning: directory not found for option '-L/Users/arg/.rustup/toolchains/nightly-aarch64-apple-darwin/lib/rustlib/dos/lib'
ld: unknown option: --as-needed
clang: error: linker command failed with exit code 1 (use -v to see invocation)