Bug 2108658 - Abseil-cpp-devel leaks code generation CFLAGS into pkgconfig
Summary: Abseil-cpp-devel leaks code generation CFLAGS into pkgconfig
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: abseil-cpp
Version: 35
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-19 16:14 UTC by Bruno Pitrus
Modified: 2022-08-07 05:09 UTC (History)
3 users (show)

Fixed In Version: abseil-cpp-20211102.0-4.fc37 abseil-cpp-20210324.2-5.fc36 abseil-cpp-20211102.0-3.el9 abseil-cpp-20210324.2-3.fc35
Clone Of:
Environment:
Last Closed: 2022-07-29 14:03:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Make the pkgconfig generation script remove instruction set options before pasting them into CFLAGS. (890 bytes, application/mbox)
2022-07-19 16:14 UTC, Bruno Pitrus
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github abseil abseil-cpp pull 1216 0 None Merged Do not leak -maes -msse4.1 into pkgconfig 2022-07-19 16:14:08 UTC

Description Bruno Pitrus 2022-07-19 16:14:09 UTC
Created attachment 1898159 [details]
Make the pkgconfig generation script remove instruction set options before pasting them into CFLAGS.

The file /usr/libXX/pkgconfig/absl_random_internal_randen_hwaes_impl.pc shipped in abseil-cpp-devel incorrectly specifies -maes -msse4.1 in its CFLAGS, causing any packages which use pkgconfig to compile against abseil to require SSE4.1 instructions to run.

The issue occurs in Fedora 35, 36 and Rawhide.

A patch is attached (present on upstream master and verified to already work on openSUSE)

Comment 1 Ben Beasley 2022-07-29 12:02:03 UTC
Thanks for reporting this, and for submitting it upstream. I will work on getting this backported to Rawhide, F36, F35, and EPEL9. EPEL8 appears to be unaffected since the version there does not install .pc files.

-----

To the best of my understanding—according to [1], and without digging into the code myself, the library uses runtime dispatch to select implementation with these instructions on hardware that supports them. If anyone knows of a case where instructions beyond the architectural baseline are used without runtime detection and dispatch in abseil-cpp itself, please report that as an additional bug.

-----

I ran the command 

> mock -r fedora-rawhide-x86_64 --enablerepo='*source*' --dnf-cmd -- repoquery --whatrequires '*absl_random_internal_randen_hwaes_impl*'

to see if any Fedora packages used the library in question, and if they were affected by the wayward compiler flags. I found that:

- grpc uses it in Rawhide and in EPEL9, but (for some reason) does not appear to pick up the inappropriate compiler flags. (However, grpc in EPEL9 appears to be broken due to a libre2 soname bump, so it needs to be rebuilt anyway.)
- frr uses it in Rawhide only, and definitely picks up the inappropriate compiler flags

So frr will need to be rebuilt in Rawhide as part of the resolution for this bug.

[1] https://github.com/abseil/abseil-cpp/issues/643#issuecomment-602643378

Comment 3 Fedora Update System 2022-07-29 14:01:11 UTC
FEDORA-2022-b909a57118 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b909a57118

Comment 4 Fedora Update System 2022-07-29 14:03:00 UTC
FEDORA-2022-b909a57118 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 5 Ben Beasley 2022-07-29 17:05:38 UTC
PR to rebuild frr in Rawhide: https://src.fedoraproject.org/rpms/frr/pull-request/10

Comment 6 Fedora Update System 2022-07-29 18:36:56 UTC
FEDORA-2022-755db2684e has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-755db2684e

Comment 7 Fedora Update System 2022-07-29 19:43:49 UTC
FEDORA-2022-44cc36a3e7 has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-44cc36a3e7

Comment 8 Fedora Update System 2022-07-30 01:39:49 UTC
FEDORA-2022-755db2684e has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-755db2684e`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-755db2684e

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

Comment 9 Fedora Update System 2022-07-30 02:19:17 UTC
FEDORA-2022-44cc36a3e7 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 --refresh --advisory=FEDORA-2022-44cc36a3e7`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-44cc36a3e7

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

Comment 10 Fedora Update System 2022-07-30 14:21:58 UTC
FEDORA-EPEL-2022-385236becf has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-385236becf

Comment 11 Fedora Update System 2022-07-31 02:17:31 UTC
FEDORA-EPEL-2022-385236becf has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-385236becf

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

Comment 12 Fedora Update System 2022-08-01 07:13:48 UTC
FEDORA-2022-27f1b1aadb has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-27f1b1aadb

Comment 13 Michal Ruprich 2022-08-01 07:18:31 UTC
Hi Ben,

thanks for the PR, frr is now rebuilt with the new abseil-cpp-devel: https://koji.fedoraproject.org/koji/taskinfo?taskID=90335744

Regards,
Michal

Comment 14 Fedora Update System 2022-08-01 07:25:07 UTC
FEDORA-2022-27f1b1aadb has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 15 Fedora Update System 2022-08-07 04:32:09 UTC
FEDORA-2022-755db2684e has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2022-08-07 04:39:19 UTC
FEDORA-EPEL-2022-385236becf has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2022-08-07 05:09:09 UTC
FEDORA-2022-44cc36a3e7 has been pushed to the Fedora 35 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.