Description of problem:
Distribution builds of OpenJDK 11 on Fedora are tightly integrated with system libraries. For example the following configure switches are being used for Fedora builds: --enable-system-nss --with-zlib=system --with-libjpeg=system --with-giflib=system --with-libpng=system --with-lcms=system. That is, the JDK depends on certain system libraries and versions. Example:
$ ldd $(rpm -ql java-11-openjdk-headless | grep liblcms.so) | grep lcms2
liblcms2.so.2 => /lib64/liblcms2.so.2 (0x00007fd73cd8d000)
$ rpm -qf /lib64/liblcms2.so.2
Yet, one design goal of jlink and related tools is to:
1. Download a JDK build on system A
2. Create a custom JDK image for system B on system A
System A and system B might not be the same platform: System A => Linux, system B => Windows. Or it might even be a different architecture: System A => Linux x86_64, System B => Linux aarch64. The premise seems to be that the JDKs produced are most portable (statically linked and bundled libraries). When distribution builds are being attempted to be used as a basis via the -jmods sub-package most assumptions no longer hold. That is, the java-11-openjdk package build is being used as the "downloaded JDK" build in 1) above.
Version-Release number of selected component (if applicable):
Example illustrating this issue:
$ /usr/lib/jvm/java-11-openjdk/bin/jlink \
--compress 2 \
$ find custom-jdk-image/lib/ | grep liblcms.so
$ ldd custom-jdk-image/lib/liblcms.so | grep lcms2
ldd: warning: you do not have execution permission for `custom-jdk-image/lib/liblcms.so'
liblcms2.so.2 => /lib64/liblcms2.so.2 (0x00007f676f1ff000)
"System A => Linux, system B => Windows" and "System A => Linux x86_64, System B => Linux aarch64" are cross-compile scenarios, which is different from this issue and even fully static builds won't help here. Jlink images contains full runtime with native bits, so it's always bound with OS and arch. You can't use same image on multiple systems.
Cross-compilation is possible, but you would need to have full JDK somewhere on system and tell jlink to use it. Such created image won't work on your system though.
(In reply to Michal Vala from comment #2)
> "System A => Linux, system B => Windows" and "System A => Linux x86_64,
> System B => Linux aarch64" are cross-compile scenarios, which is different
> from this issue and even fully static builds won't help here. Jlink images
> contains full runtime with native bits, so it's always bound with OS and
> arch. You can't use same image on multiple systems.
> Cross-compilation is possible, but you would need to have full JDK somewhere
> on system and tell jlink to use it. Such created image won't work on your
> system though.
That's not what I was saying (using the same JDK image across platforms). What
I was trying to say was that you can *create* the image for a different system
provided you have the JDK bundle for "different system" also downloaded on the
local system. You'd always need two JDKs in that case: One for the system you
run jlink on, one for the target system.
So for "System A => Linux, system B => Windows" it would be:
1. Be sure you have JDK version X with jlink on System A (Linux).
2. Download JDK version X for System B (Windows).
3. Extract JDK from step 2 on your local System A, say to
4. Use jlink on System A with --module-path /path/to/win/jdk/jmods
in order to create the custom image for System B on System A.
The same is true for the Linux x86_64 => Linux aarch64 case. They call this
Note: The issue at hand here is, that this might even break on *same* OS-arch pairs. That is,
distribution builds which are dynamically linked to system libs, to target the same OS-arch on a
*different* distribution. Example: Using the JDK on Fedora 28 (Linux-x86_64), create
a custom image, and try to run it on Centos 7 (Linux-x86_64).
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 29 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
Thank you for reporting this bug and we are sorry it could not be fixed.