NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.04k stars 13.38k forks source link

graalvm8: fails on darwin with "Error compiling query code" #83772

Open eraserhd opened 4 years ago

eraserhd commented 4 years ago

Describe the bug

Both a local package of mine and clj-kondo cannot build with graalvm8. The error is the same, but it occurs in a different file. I'm on master, but this has been happening ever since graalvm8 19.2.1 was merged (granted, this was an improvement over the prior situation).

To Reproduce

$ nix-build . -A clj-kondo

Expected behavior Build success.

Screenshots

...
[clj-kondo:36294]        (cap):     394.32 ms
[clj-kondo:36294]        setup:     631.32 ms
Error: Error compiling query code (in /var/folders/pq/k0s7p0bx7lz9nn1sk5h3nzymty834y/T/SVM-7092200027434014152/JNIHeaderDirectives.c). Compiler command  /nix/store/0963sa2x7jqjnshcdhs07i7swssf3vsq-gcc-8.4.0/bin/gcc -F /nix/store/2vk4q26phv6j0596vyq8h02j9h8qg026-apple-framework-CoreFoundation/Library/Frameworks -framework CoreFoundation -I/System/Volumes/Data/nix/store/8p22m2wa50kpbc5xji2qcjiwklcr60q2-graal-19.2.1/include/darwin /var/folders/pq/k0s7p0bx7lz9nn1sk5h3nzymty834y/T/SVM-7092200027434014152/JNIHeaderDirectives.c -o /var/folders/pq/k0s7p0bx7lz9nn1sk5h3nzymty834y/T/SVM-7092200027434014152/JNIHeaderDirectives output included error: collect2: error: ld returned 1 exit status
com.oracle.svm.core.util.UserError$UserException: Error compiling query code (in /var/folders/pq/k0s7p0bx7lz9nn1sk5h3nzymty834y/T/SVM-7092200027434014152/JNIHeaderDirectives.c). Compiler command  /nix/store/0963sa2x7jqjnshcdhs07i7swssf3vsq-gcc-8.4.0/bin/gcc -F /nix/store/2vk4q26phv6j0596vyq8h02j9h8qg026-apple-framework-CoreFoundation/Library/Frameworks -framework CoreFoundation -I/System/Volumes/Data/nix/store/8p22m2wa50kpbc5xji2qcjiwklcr60q2-graal-19.2.1/include/darwin /var/folders/pq/k0s7p0bx7lz9nn1sk5h3nzymty834y/T/SVM-7092200027434014152/JNIHeaderDirectives.c -o /var/folders/pq/k0s7p0bx7lz9nn1sk5h3nzymty834y/T/SVM-7092200027434014152/JNIHeaderDirectives output included error: collect2: error: ld returned 1 exit status
        at com.oracle.svm.core.util.UserError.abort(UserError.java:114)
        at com.oracle.svm.hosted.c.NativeLibraries.reportErrors(NativeLibraries.java:196)
        at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1524)
        at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1005)
        at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:834)
        at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:524)
        at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:444)
        at java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1386)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Error: Image build request failed with exit status 1
com.oracle.svm.driver.NativeImage$NativeImageError: Image build request failed with exit status 1
        at com.oracle.svm.driver.NativeImage.showError(NativeImage.java:1447)
        at com.oracle.svm.driver.NativeImage.build(NativeImage.java:1225)
        at com.oracle.svm.driver.NativeImage.performBuild(NativeImage.java:1187)
        at com.oracle.svm.driver.NativeImage.main(NativeImage.java:1146)
builder for '/nix/store/3nxa1r92vaq9kpqywnfi5licnfznfkzx-clj-kondo-2019.12.14.drv' failed with exit code 1
error: build of '/nix/store/3nxa1r92vaq9kpqywnfi5licnfznfkzx-clj-kondo-2019.12.14.drv' failed

Metadata

Maintainer information:

attribute:
- clj-kondo
- graalvm8
eraserhd commented 4 years ago

@hlolli Any ideas off the top of your head? I don't know how this works very well but my guess is there's a missing dependency needed on Mac OS.

bennyandresen commented 4 years ago

You should give graalvm-ce a try (not in nix) and see if it's an upstream issue or if it's a nixos issue.

(I'm going to see if I can upgrade graalvm8 to 19.3 or 20, but I'm on NixOS - so it may not help)

hlolli commented 4 years ago

On top off my head, yes, I noticed right away on hydra after the last merge that darwin was failing. The sandbox on darwin isn't as sandboxed as on linux so it had some apple framework dependencies missing. Every time I bump graalvm I end up a bit burnt out :D it's so time consuming. I think I'll look at 20x soon and fix that darwin bug in the way, I also noticed that node-graal is compiled but isn't returning a binary. That needs fixing too, but for the darwin bug, I think it's easy from the hydra-logs.

stale[bot] commented 3 years ago

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info