Figure out why the build fails for 2.93.0, probably due to modern macOS? #45

Closed
opened 2025-05-10 01:12:22 +00:00 by jade · 3 comments
Owner
lix/lix-installer » cargo zigbuild --target aarch64-apple-darwin --release
   Compiling lix-installer v0.17.1 (/Users/jade/lix/lix-installer)
error: linking with `/Users/jade/Library/Caches/cargo-zigbuild/0.20.0/zigcc-aarch64-apple-darwin-adb5.sh` failed: exit status: 1
  |
  = note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET -u XROS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/jade/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/nix/store/qbj96x8fll6yrhsr7ndv8a00nnrl1qdk-zig-0.14.0/bin:/nix/store/gaw1f5cjfgyvmgcy6xapkyrxg7y8ymb0-xonsh-0.19.4/bin:/nix/store/5nn0msv6c5f23jml1spc1b0ncy1c3b7d-cargo-zigbuild-0.20.0/bin:/Users/jade/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/Users/jade/.nix-profile/bin:/Users/jade/bin:/Users/jade/.local/bin:/usr/local/bin:/usr/local/sbin:/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:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/iTerm.app/Contents/Resources/utilities:/Users/jade/esp/xtensa-esp32-elf/bin:/Users/jade/.npm-packages/bin:/Users/jade/.cargo/bin" VSLANG="1033" ZERO_AR_DATE="1" "/Users/jade/Library/Caches/cargo-zigbuild/0.20.0/zigcc-aarch64-apple-darwin-adb5.sh" "/var/folders/wk/92h51hd93rz0mkf92yxxhr5w0000gn/T/rustcIJQzcn/symbols.o" "<1 object files omitted>" "/var/folders/wk/92h51hd93rz0mkf92yxxhr5w0000gn/T/rustcIJQzcn/{liblzma_sys-62253cf82359d12f.rlib,libring-72ae95c160826885.rlib}" "/Users/jade/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/{libcompiler_builtins-a94b6215175cddb2.rlib}" "-framework" "Security" "-framework" "SystemConfiguration" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/ring-f5bbcb36f7e81572/out" "-L" "/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/lzma-sys-7e3696fe4b6c3efa/out" "-o" "/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/deps/lix_installer-0e9aa7e67b7ff192" "-Wl,-dead_strip" "-nodefaultlibs"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: warning: unable to open library directory '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/ring-f5bbcb36f7e81572/out': FileNotFound
          warning: unable to open library directory '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/lzma-sys-7e3696fe4b6c3efa/out': FileNotFound
          warning: unable to open library directory '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/Users/jade/Library/Caches/cargo-zigbuild/0.20.0/deps': FileNotFound
          error: unable to find framework 'Security'. searched paths:
           /System/Library/Frameworks/Security.framework/Security.tbd
           /System/Library/Frameworks/Security.framework/Security.dylib
           /System/Library/Frameworks/Security.framework/Security
          error: unable to find framework 'SystemConfiguration'. searched paths:
           /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.tbd
           /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.dylib
           /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration
          error: unable to find framework 'CoreFoundation'. searched paths:
           /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd
           /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.dylib
           /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
``` lix/lix-installer » cargo zigbuild --target aarch64-apple-darwin --release Compiling lix-installer v0.17.1 (/Users/jade/lix/lix-installer) error: linking with `/Users/jade/Library/Caches/cargo-zigbuild/0.20.0/zigcc-aarch64-apple-darwin-adb5.sh` failed: exit status: 1 | = note: env -u IPHONEOS_DEPLOYMENT_TARGET -u TVOS_DEPLOYMENT_TARGET -u XROS_DEPLOYMENT_TARGET LC_ALL="C" PATH="/Users/jade/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/bin:/nix/store/qbj96x8fll6yrhsr7ndv8a00nnrl1qdk-zig-0.14.0/bin:/nix/store/gaw1f5cjfgyvmgcy6xapkyrxg7y8ymb0-xonsh-0.19.4/bin:/nix/store/5nn0msv6c5f23jml1spc1b0ncy1c3b7d-cargo-zigbuild-0.20.0/bin:/Users/jade/.nix-profile/bin:/nix/var/nix/profiles/default/bin:/Users/jade/.nix-profile/bin:/Users/jade/bin:/Users/jade/.local/bin:/usr/local/bin:/usr/local/sbin:/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:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Applications/iTerm.app/Contents/Resources/utilities:/Users/jade/esp/xtensa-esp32-elf/bin:/Users/jade/.npm-packages/bin:/Users/jade/.cargo/bin" VSLANG="1033" ZERO_AR_DATE="1" "/Users/jade/Library/Caches/cargo-zigbuild/0.20.0/zigcc-aarch64-apple-darwin-adb5.sh" "/var/folders/wk/92h51hd93rz0mkf92yxxhr5w0000gn/T/rustcIJQzcn/symbols.o" "<1 object files omitted>" "/var/folders/wk/92h51hd93rz0mkf92yxxhr5w0000gn/T/rustcIJQzcn/{liblzma_sys-62253cf82359d12f.rlib,libring-72ae95c160826885.rlib}" "/Users/jade/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib/{libcompiler_builtins-a94b6215175cddb2.rlib}" "-framework" "Security" "-framework" "SystemConfiguration" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/ring-f5bbcb36f7e81572/out" "-L" "/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/lzma-sys-7e3696fe4b6c3efa/out" "-o" "/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/deps/lix_installer-0e9aa7e67b7ff192" "-Wl,-dead_strip" "-nodefaultlibs" = note: some arguments are omitted. use `--verbose` to show all linker arguments = note: warning: unable to open library directory '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/ring-f5bbcb36f7e81572/out': FileNotFound warning: unable to open library directory '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/Users/jade/lix/lix-installer/target/aarch64-apple-darwin/release/build/lzma-sys-7e3696fe4b6c3efa/out': FileNotFound warning: unable to open library directory '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk/Users/jade/Library/Caches/cargo-zigbuild/0.20.0/deps': FileNotFound error: unable to find framework 'Security'. searched paths: /System/Library/Frameworks/Security.framework/Security.tbd /System/Library/Frameworks/Security.framework/Security.dylib /System/Library/Frameworks/Security.framework/Security error: unable to find framework 'SystemConfiguration'. searched paths: /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.tbd /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration.dylib /System/Library/Frameworks/SystemConfiguration.framework/SystemConfiguration error: unable to find framework 'CoreFoundation'. searched paths: /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.tbd /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation.dylib /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation ```
Member

So uhm, seems like cargo-zigbuild is having some issues with Darwin. Looking at the tracker, it has A LOT of issues with Darwin, but this issue seems most relevant to us:

https://github.com/rust-cross/cargo-zigbuild/issues/324

Looks like a Zig issue:

https://github.com/ziglang/zig/issues/17017

Never knew we were using Zig here lol. Wtf.

EDIT: found it in Xonsh build: 2ff4ada891/build-all.xsh

Looking at issues above, seems like downgrading Zig to 0.12 or 0.11 (Nixpkgs stable) might help?

So uhm, seems like `cargo-zigbuild` is having some issues with Darwin. Looking at the tracker, it has A LOT of issues with Darwin, but this issue seems most relevant to us: https://github.com/rust-cross/cargo-zigbuild/issues/324 Looks like a Zig issue: https://github.com/ziglang/zig/issues/17017 Never knew we were using Zig here lol. Wtf. EDIT: found it in Xonsh build: https://git.lix.systems/lix-project/lix-installer/src/commit/2ff4ada89165d05fd9fbd029a2374c87ae818195/build-all.xsh Looking at issues above, seems like downgrading Zig to 0.12 or 0.11 (Nixpkgs stable) might help?
Author
Owner

I agree downgrading zig is probably the solution but neither bug you've linked is the problem:

  • we're not on Windows
  • these are not private frameworks
I agree downgrading zig is probably the solution but neither bug you've linked is the problem: - we're not on Windows - these are not private frameworks
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/3148 ("fix: build on macOS broken")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix-installer/+/3148", "number": 3148, "kind": "commit message"}], "cl_meta": {"3148": {"change_title": "fix: build on macOS broken"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/3148](https://gerrit.lix.systems/c/lix-installer/+/3148) ("fix: build on macOS broken")
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix-installer#45
No description provided.