-
Notifications
You must be signed in to change notification settings - Fork 3k
native-image: Graal's ForeignAPISupport is amd64 only #46731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks for your pull request! Your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
|
/cc @galderz (awt) |
|
🎊 PR Preview 7843777 has been successfully built and deployed to https://quarkus-pr-main-46731-preview.surge.sh/version/main/guides/
|
This comment has been minimized.
This comment has been minimized.
|
No idea why would Micrometer get flaky on this PR. Do you understand the CI results @ebullient @brunobat? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I think the DarwinFeature previously was in core on purpose, to allow for building apps that effectively won't need to initialize AWT at runtime, i.e. don't need full AWT extension.
By DarwinFeature are you referring to https://github.com/quarkusio/quarkus/blob/main/extensions/awt/runtime/src/main/java/io/quarkus/awt/runtime/graal/DarwinAwtFeature.java ?
AFAIS it was always under the awt extension #21566
The result is that the build might pass, but the Quarkus app won't start. If that is the desired design,
No, I don't think this is desired. Reporting it as unsupported seems the right thing to me.
GraalVM has FFI/FFM implemented for amd64 arch only, so effectively starting Mandrel/GraalVM 24.2, i.e. Mandrel for JDK 24, we are losing AWT support on Linux aarch64 where it used to work
We will need to list this as a known issue, in the migration guide I guess.
UBI9's microdnf requires
-y, so container tests hanged onIs this ok [y/N]:
Good catch, I think we need this in ASAP. So if this PR ends up being delayed I would suggest openning a separate PR with just 1de05f2
Thank you @Karm
core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java
Show resolved
Hide resolved
|
@Karm could you create a specific PR for the |
|
@zakkak Thanks for the review
Hmm, I confused it with AwtImageIO.java as I was trying to reason about why wasn't macOS excluded too. You are right.
Ack.
Do I just edit this directly or is it generated?
Ack. Done. |
@gsmet , any specific pointers? |
Directly |
Nope. |
@Karm sorry, it was "more thoughts" as "if it was safe to be backported or not" :). Do you think we need a backport for this one? I rebased to drop the additional commit and will merge when CI is green. |
Status for workflow
|
|
@gsmet I would only consider the part that handles
for backporting, but IMO it's not worth it. |
|
@Karm it looks like AArch64 support will land in GraalVM for JDK 25, see oracle/graal#10856 |
Aww, great. Gonna give their branch a shot. I will make a note to see to removing these if-else version checks for 25 if it's sound. |
@Karm there is a typo in your update. "To switch back to UBI 8" suggests using ubi9 Furthermore, we need to add a note about
|
|
|
Thank you @Karm |
|
JDK 25 won't have this limitation any more though... |

Fixes #46235
Fixes #46988
Summary:
We don't have MacOS support for AWT extension yet. It might be trivial, but it's not coded in yet, so the extension needs to bail out just like on Windows. I am afraid that not having MacOS excluded via
UnsupportedOSBuildItemis an artifact of moving DarwinFeature to AWT extension. The result is that the build might pass, but the Quarkus app won't start. If that is the desired design, we should allow the same on Windows and remove itsUnsupportedOSBuildItem. I think the DarwinFeature previously was in core on purpose, to allow for building apps that effectively won't need to initialize AWT at runtime, i.e. don't need full AWT extension. @zakkak ? Ideas?GraalVM has FFI/FFM implemented for amd64 arch only, so effectively starting Mandrel/GraalVM 24.2, i.e. Mandrel for JDK 24, we are losing AWT support on Linux aarch64 where it used to work
UBI9's microdnf requires
-y, so container tests hanged onIs this ok [y/N]:I tested all combinations that made sense to me and where I had access to HW, e.g. I skipped natively amd64 based MacOS. I used either our Mandrel 24.2 / JDK 24 ea builds or GraalVM CE 25 ea dev builds.
🟢 - run went as expected; spoiler alert: All runs went as expected.
Tested
Windows amd64 hosted 🟢
Expected: 🟠 - SKIPPED, AWT Quarkus unsupported OS
Actual: 🟠
Windows amd64 with Linux amd64 builder image 🟢
Expected: 🟢
Actual: 🟢
MacOS aarch64 hosted 🟢
Expected: 🟠 - SKIPPED, AWT Quarkus unsupported OS
Actual: 🟠
MacOS amd64 (via Rosetta) hosted 🟢
Expected: 🟠 - SKIPPED, AWT Quarkus unsupported OS
Actual: 🟠
MacOS amd64 with Linux amd64 builder
N/A - I don't have access to such HW and I don't want to try to
remove Podman machine from my MacOS aarch64 systems and try to run
podman there via Rosetta. It should work just like Windows above :-)
MacOS aarch64 with Linux aarch64 builder image 🟢
Expected: 🟠 - SKIPPED, ForeignAPISupport is amd64 only
Actual: 🟠
Linux amd64 hosted 🟢
Expected: 🟢
Actual: 🟢
Linux amd64 with Linux amd64 builder image 🟢
Expected: 🟢
Actual: 🟢
Linux aarch64 hosted 🟢
Expected: 🟠 - SKIPPED, ForeignAPISupport is amd64 only
Actual: 🟠
Linux aarch64 with Linux aarch64 builder image 🟢
Expected: 🟠 - SKIPPED, ForeignAPISupport is amd64 only
Actual: 🟠
Thanks for feedback