Bug 1861401

Summary: [LTO] java-11-openjdk fails to build with LTO enabled
Product: [Fedora] Fedora Reporter: Severin Gehwolf <sgehwolf>
Component: java-11-openjdkAssignee: Severin Gehwolf <sgehwolf>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 35CC: ahughes, ashundi, jerboaa, jvanek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-12-13 15:15:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Severin Gehwolf 2020-07-28 14:15:24 UTC
Description of problem:
Package java-11-openjdk fails to build with LTO. Build failure example:
https://koji.fedoraproject.org/koji/taskinfo?taskID=47799680

Failure looks like this:

/usr/bin/ld: /tmp/libjvm.so.bplx2t.ltrans16.ltrans.o: in function `G1CMOopClosure::do_oop(oopDesc**)':
/disk/openjdk/upstream-sources/openjdk-11-dev/src/hotspot/share/gc/g1/g1OopClosures.hpp:176: undefined reference to `void G1CMOopClosure::do_oop_work<oopDesc*>(oopDesc**)'
/usr/bin/ld: /tmp/libjvm.so.bplx2t.ltrans16.ltrans.o: in function `G1RootRegionScanClosure::do_oop(oopDesc**)':
/disk/openjdk/upstream-sources/openjdk-11-dev/src/hotspot/share/gc/g1/g1OopClosures.hpp:190: undefined reference to `void G1RootRegionScanClosure::do_oop_work<oopDesc*>(oopDesc**)'
/usr/bin/ld: /tmp/libjvm.so.bplx2t.ltrans29.ltrans.o: in function `G1CMOopClosure::do_oop(unsigned int*)':
/disk/openjdk/upstream-sources/openjdk-11-dev/src/hotspot/share/gc/g1/g1OopClosures.hpp:177: undefined reference to `void G1CMOopClosure::do_oop_work<unsigned int>(unsigned int*)'
collect2: error: ld returned 1 exit status
gmake[3]: *** [lib/CompileJvm.gmk:153: /disk/openjdk/upstream-sources/openjdk-11-dev/build/linux-x86_64-normal-server-release/support/modules_libs/java.base/server/libjvm.so] Error 1
gmake[3]: *** Waiting for unfinished jobs....
/usr/bin/ld: /tmp/libjvm.so.4jtvpC.ltrans28.ltrans.o: in function `G1CMOopClosure::do_oop(oopDesc**)':
/disk/openjdk/upstream-sources/openjdk-11-dev/src/hotspot/share/gc/g1/g1OopClosures.hpp:176: undefined reference to `void G1CMOopClosure::do_oop_work<oopDesc*>(oopDesc**)'
/usr/bin/ld: /tmp/libjvm.so.4jtvpC.ltrans28.ltrans.o: in function `G1RootRegionScanClosure::do_oop(oopDesc**)':
/disk/openjdk/upstream-sources/openjdk-11-dev/src/hotspot/share/gc/g1/g1OopClosures.hpp:190: undefined reference to `void G1RootRegionScanClosure::do_oop_work<oopDesc*>(oopDesc**)'
/usr/bin/ld: /tmp/libjvm.so.4jtvpC.ltrans40.ltrans.o: in function `G1CMOopClosure::do_oop(unsigned int*)':
/disk/openjdk/upstream-sources/openjdk-11-dev/src/hotspot/share/gc/g1/g1OopClosures.hpp:177: undefined reference to `void G1CMOopClosure::do_oop_work<unsigned int>(unsigned int*)'
collect2: error: ld returned 1 exit status

This can be reproduced upstream with:

$ bash configure --with-extra-cxxflags="-flto -ffat-lto-objects -fcommon" \
               --with-extra-cflags="-flto -ffat-lto-objects -fcommon" [...]
$ make images

Comment 1 Ben Cotton 2020-08-11 13:50:17 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 33 development cycle.
Changing version to 33.

Comment 2 Ben Cotton 2021-11-04 17:37:33 UTC
This message is a reminder that Fedora 33 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 33 on 2021-11-30.
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 '33'.

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 33 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.

Comment 3 Ben Cotton 2022-11-29 16:49:13 UTC
This message is a reminder that Fedora Linux 35 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13.
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
'version' of '35'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 35 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 4 Ben Cotton 2022-12-13 15:15:34 UTC
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13.

Fedora Linux 35 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 Linux
please feel free to reopen this bug against that version. Note that the version
field may be hidden. Click the "Show advanced fields" button if you do not see
the version field.

If you are unable to reopen this bug, please file a new report against an
active release.

Thank you for reporting this bug and we are sorry it could not be fixed.