NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.06k stars 14.12k forks source link

Build failure: graalvm-ce on x86_64-darwin #354059

Open FliegendeWurst opened 2 days ago

FliegendeWurst commented 2 days ago

Steps To Reproduce

  1. build graalvm-ce on x86_64-darwin

Build log

https://hydra.nixos.org/build/276756639

Notify maintainers

@bennyandresen @hlolli @glittershark @ericdallo @thiagokokada

Metadata

Build was attempted on Hydra.


Add a :+1: reaction to issues you find important.

matteo-pacini commented 1 day ago

Looks like a regression? https://github.com/NixOS/nixpkgs/pull/299203

thiagokokada commented 1 day ago

Looks like a regression? #299203

This doesn't look like to be the same issue. I think the reason is the recent macOS SDK bump.

ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libnio.a(UnixFileSystem.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libnio.a(UnixNativeDispatcher.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(TimeZone_md.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(UnixFileSystem_md.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libnio.a(nio_util.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(VM.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(VMSupport.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(VM_md.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(VirtualThread.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(canonicalize_md.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(check_classname.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(check_version.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(childproc.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(io_util.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(io_util_md.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(java_props_macosx.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(java_props_md.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(jio.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(jni_util.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(jni_util_md.o)) was built for newer macOS version (11.0) than being linked (10.12)
ld: warning: object file (/nix/store/75r6jjjlb65ikiwjjw550p6app04jacq-graalvm-ce-23.0.0/lib/static/darwin-amd64/libjava.a(path_util.o)) was built for newer macOS version (11.0) than being linked (10.12)

Unfortunaly I can't figure out the issue here. The obvious fix would be to set MACOSX_DEPLOYMENT_TARGET to 11.0 (we also need to add to the wrapper native-image wrapper), but it results in another error:

Undefined symbols for architecture x86_64:
  "____chkstk_darwin", referenced from:
      _InflateFully in libzip.a(zip_util.o)
      _checkCPUFeatures in liblibchelper.a(cpuid.o)
      _readBytes in libjava.a(io_util.o)
      _writeBytes in libjava.a(io_util.o)
      _collapse in libjava.a(path_util.o)
ld: symbol(s) not found for architecture x86_64
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.handleLinkerFailure(NativeImageViaCC.java:204)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.runLinkerCommand(NativeImageViaCC.java:154)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.write(NativeImageViaCC.java:115)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:761)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:554)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:528)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:711)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:139)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:94)