Bug 1988112
| Summary: | Enable LTO build of libtool for RHEL 9 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Marek Polacek <mpolacek> |
| Component: | libtool | Assignee: | mkulik |
| Status: | CLOSED ERRATA | QA Contact: | Martin Cermak <mcermak> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 9.0 | CC: | codonell, databases-maint, email, hhorak, jkejda, mcermak, praiskup |
| Target Milestone: | rc | Keywords: | Bugfix, TestCaseNotNeeded, Triaged |
| Target Release: | 9.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libtool-2.4.6-45.el9 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-05-17 13:48:10 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: | |||
The testsuite is still failing when LTO is enabled. I will try to talk to upstream about this issue. No response from upstream yet. Still no response from upstream. I decided to look into this. Here is short explanations for this issue: LTO build seems to be completely fine, no problems during normal usage. We'll only see issues during test check, few testcases will fail when we try to build libtool with LTO, to be precise in these two: 67: Link order of deplibs FAILED (link-order2.at:125) 170: Run tests with low max_cmd_len FAILED (cmdline_wrap.at:47) Number 170 is not a failure caused by LTO. This test is just a repetition of all other tests with changed max_cmd_len, any other test failure will cause test to fail too (most likely). The only problem here is test number 67. Here is link to discussion of the origin for this test: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391427 I didn't dig too deep into this but this failure is not related directly to LTO build of libtool. Here is what actually is causing this failure: Compiler flags for this test (and most likely for rest of them) are inherited from actual build phase. (I'm not sure if this is expected but probably not) Here is example of CFLAGS from current build process: CFLAGS='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC' Flags responsible for LTO '-flto=auto -ffat-lto-objects' will be used in this test only when we specify them in build process. This test will always fail with those flags, regardless of LTO or not-LTO build. TLDR: This issue is not related to libtool LTO build but to usage of LTO flags in testcases and/or correct handling them. Build in testing in Fedora: https://bodhi.fedoraproject.org/updates/FEDORA-2021-6e9c836c28 It can be merge to RHEL9 at later date if there are no issues. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: libtool), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2589 |
This package opts out of LTO with this reasoning: # The testsuite seems to not properly handle template instantiation and as # a result fails. libtool itself appears to be OK from my by-hand testing. # Disable LTO until the testsuite issues are fixed %global _lto_cflags %{nil} It would be nice to track the status of these failures and potentially re-enable LTO if/when possible. To that effect, I'm opening this BZ. If you decide that LTO is not worth the effort for this package, feel free to close as WONTFIX. Thanks! See also: https://issues.redhat.com/browse/RHELPLAN-54371 https://issues.redhat.com/browse/RHELBU-522