Bug 1994993 - Enable LTO build of mariadb
Summary: Enable LTO build of mariadb
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mariadb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Schorm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1986172
TreeView+ depends on / blocked
 
Reported: 2021-08-18 09:21 UTC by Michal Schorm
Modified: 2021-12-13 00:30 UTC (History)
8 users (show)

Fixed In Version: mariadb-10.5.13-1.fc35 mariadb-10.5.13-1.fc34 mariadb-10.5-3420211202132324.058368ca mariadb-10.5-3520211202132324.f27b74a8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-11 01:31:55 UTC
Type: Bug


Attachments (Terms of Use)

Description Michal Schorm 2021-08-18 09:21:36 UTC
-------------------------------------------------------------------------
Dave Malcolm wrote in https://bugzilla.redhat.com/show_bug.cgi?id=1986172
-------------------------------------------------------------------------

mariadb.spec:
  https://src.fedoraproject.org/rpms/mariadb/blob/rawhide/f/mariadb.spec#_799
currently disables LTO, with this message in %build:
    # This package has static probe points which do not currently
    # work with LTO and result in undefined symbols at link time.
    # This is being worked on in upstream GCC
    %define _lto_cflags %{nil}

This was added to Fedora's mariadb.spec by Jeff Law on 2020-08-05 in https://src.fedoraproject.org/rpms/mariadb/c/cdfc0ff97706d24ab636f0962a205bfba93d6771 (3:10.4.13-6)

Although the message says "This is being worked on in upstream GCC", I work on upstream GCC and I wasn't able to find a bug report about this in the upstream tracker (Jeff is no longer at Red Hat).

It would be good to re-enable LTO for mariadb in Fedora, CentOS stream, and RHEL 9, so that it can benefit from LTO (smaller/faster binaries, deeper analysis for compiler warnings, etc).  

Please try removing the
   %global _lto_cflags %{nil}
from the specfile.

If you still run into issues, please let me know via this bug so that the toolchain team can fix things appropriately.

Thanks!

-------------------------------------------------------------------------
Michal Schorm wrote:
-------------------------------------------------------------------------

The LTO for MariaDB currently seems broken:
  https://jira.mariadb.org/browse/MDEV-25633

Though, we should verify whether Fedora build would suffer of the same issue as the Debian build described in the upstream issue.

-------------------------------------------------------------------------
Michal Schorm wrote later:
-------------------------------------------------------------------------

I made a successful scratch build with LTO enabled and I haven't encountered the error described in the upstream JIRA issue mentioned in the comment 1 during a swift testing of the core replication functionality.

I will take a closer look at it in Fedora.

Comment 1 Fedora Update System 2021-12-02 15:31:58 UTC
FEDORA-2021-72d5918529 has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-72d5918529

Comment 2 Fedora Update System 2021-12-02 15:32:19 UTC
FEDORA-2021-acef1dc8cf has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2021-acef1dc8cf

Comment 3 Fedora Update System 2021-12-03 01:49:33 UTC
FEDORA-2021-acef1dc8cf has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-acef1dc8cf`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-acef1dc8cf

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 4 Fedora Update System 2021-12-03 02:08:50 UTC
FEDORA-2021-72d5918529 has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-72d5918529`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-72d5918529

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 5 Fedora Update System 2021-12-04 00:14:25 UTC
FEDORA-MODULAR-2021-094ff554ca has been submitted as an update to Fedora 34 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2021-094ff554ca

Comment 6 Fedora Update System 2021-12-04 00:14:37 UTC
FEDORA-MODULAR-2021-c8639f6351 has been submitted as an update to Fedora 35 Modular. https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2021-c8639f6351

Comment 7 Fedora Update System 2021-12-05 01:18:42 UTC
FEDORA-MODULAR-2021-c8639f6351 has been pushed to the Fedora 35 Modular testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2021-c8639f6351

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2021-12-05 01:19:51 UTC
FEDORA-MODULAR-2021-094ff554ca has been pushed to the Fedora 34 Modular testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-MODULAR-2021-094ff554ca

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2021-12-11 01:31:55 UTC
FEDORA-2021-acef1dc8cf has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2021-12-11 01:39:56 UTC
FEDORA-2021-72d5918529 has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2021-12-13 00:22:25 UTC
FEDORA-MODULAR-2021-094ff554ca has been pushed to the Fedora 34 Modular stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2021-12-13 00:30:01 UTC
FEDORA-MODULAR-2021-c8639f6351 has been pushed to the Fedora 35 Modular stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.