Skip to content

fix Mac build in local machine#58

Merged
munishchouhan merged 4 commits intomasterfrom
mac-build
Nov 20, 2025
Merged

fix Mac build in local machine#58
munishchouhan merged 4 commits intomasterfrom
mac-build

Conversation

@munishchouhan
Copy link
Member

this pr will fix error while building on mac silicon:

Error: DARWIN does not support building static executable images.
[8/8] Creating image...       [***]                                                                      (0.0s @ 3.01GB)
com.oracle.svm.core.util.UserError$UserException: DARWIN does not support building static executable images.------------------------------------------------------------------------------------------------------------------------

        at org.graalvm.nativeimage.builder/com.oracle.svm.core.util.UserError.abort(UserError.java:73)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.CCLinkerInvocation$DarwinCCLinkerInvocation.setOutputKind(CCLinkerInvocation.java:431)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.CCLinkerInvocation.getCommand(CCLinkerInvocation.java:206)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.image.NativeImageViaCC.write(NativeImageViaCC.java:117)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:741)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGenerator.run(NativeImageGenerator.java:550)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.buildImage(NativeImageGeneratorRunner.java:539)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.build(NativeImageGeneratorRunner.java:721)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.start(NativeImageGeneratorRunner.java:143)
        at org.graalvm.nativeimage.builder/com.oracle.svm.hosted.NativeImageGeneratorRunner.main(NativeImageGeneratorRunner.java:98)
                       7.5s (12.0% of total time) in 205 GCs | Peak RSS: 4.41GB | CPU load: 6.30
========================================================================================================================
Finished generating 'migtool' in 1m 1s.

Copy link
Contributor

@JaimeSeqLabs JaimeSeqLabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, weird.
Is that error happening in the GA? we didn't see that before when building on MacOS GA runner

@munishchouhan
Copy link
Member Author

Hmm, weird. Is that error happening in the GA? we didn't see that before when building on MacOS GA runner

i got this error in my mac laptop

@JaimeSeqLabs
Copy link
Contributor

JaimeSeqLabs commented Nov 7, 2025

Are you able to run the latest migtool macos release in your laptop?
I mean 1.8.1, the one built with the recent macos runner + sign process

@munishchouhan
Copy link
Member Author

Are you able to run the latest migtool macos release in your laptop? I mean 1.8.1, the one built with the recent macos runner + sign process

yes, but this pr is about building native-image

@JaimeSeqLabs
Copy link
Contributor

JaimeSeqLabs commented Nov 7, 2025

yes, but this pr is about building native-image

yes, I understand that. I was just trying to understand why the GA runner (a MacOS M-series machine) is able to build a native-image just fine and your local build (I guess a MacOS M-series machine as well) needs to exclude the static Libc linking

@munishchouhan
Copy link
Member Author

yes, but this pr is about building native-image

yes, I understand that. I was just trying to understand why the GA runner (a MacOS M-series machine) is able to build a native-image just fine and your local build (I guess a MacOS M-series machine as well) needs to exclude the static Libc linking

I am not sure, I have updated by mac to 26 but still getting the error
may be instead of changing it, I will add a not in docs for any one getting this error

@munishchouhan munishchouhan merged commit ca6ce8d into master Nov 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants