RFR: 8338404: Cross-compilation to different endianness fails after JDK-8318913
Erik Joelsson
erikj at openjdk.org
Thu Aug 29 16:57:19 UTC 2024
On Wed, 28 Aug 2024 14:49:26 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> From the bug report:
>
> After JDK-8318913, trying to cross-compile to a different endian target than the build host is using, will cause the interim image generation to fail:
>
>
> [buildjdk] Creating interim jimage
> Error: specified --endian LITTLE_ENDIAN does not match endianness of target platform linux-s390
> java.io.IOException: specified --endian LITTLE_ENDIAN does not match endianness of target platform linux-s390
> at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImageProvider(JlinkTask.java:574)
> at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.createImage(JlinkTask.java:410)
> at jdk.jlink/jdk.tools.jlink.internal.JlinkTask.run(JlinkTask.java:285)
> at jdk.jlink/jdk.tools.jlink.internal.Main.run(Main.java:56)
> at jdk.jlink/jdk.tools.jlink.internal.Main.main(Main.java:34)
> InterimImage.gmk:47: recipe for target '/localhome/git/jdk-BAR/build/linux-s390x/support/interim-image/bin/java' failed
>
>
> This has only been spotted when cross-compiling from x64 to s390x, but it seems to be a general endianness problem.
>
> ---
>
> In fact, it was technically a problem with how we generate all interim images, but apparently the platform mistake did not affect jlink apart from when cross-compiling and the endianness was off.
Marked as reviewed by erikj (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/20750#pullrequestreview-2269518877
More information about the build-dev
mailing list