RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1899620 - meson builds QEMU with PIC objects instead of PIE
Summary: meson builds QEMU with PIC objects instead of PIE
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: meson
Version: ---
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: Danilo de Paula
QA Contact: Tomas Pelka
URL:
Whiteboard:
Depends On:
Blocks: 1899619
TreeView+ depends on / blocked
 
Reported: 2020-11-19 17:08 UTC by Paolo Bonzini
Modified: 2021-05-18 16:32 UTC (History)
6 users (show)

Fixed In Version: meson-0.55.3-3.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 16:27:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:1962 0 None None None 2021-05-18 16:27:36 UTC

Description Paolo Bonzini 2020-11-19 17:08:34 UTC
QEMU uses lots of static libraries to group parts of the build.  Unless those libraries are compiled as position-independent executable (PIE) code and not position-independent shared library (PIC) code, there will be a substantial performance hit.

In theory, b_staticpic is meant for libraries that are never installed and only linked to executables.  However, Meson right now uses position-*dependent* code unconditionally if b_staticpic=false, even if b_pie=true.  Thus b_staticpic=false causes the build to fail.

We can backport a patch from Meson 0.56 in order to fix this case and let QEMU compile with b_staticpic=false.

The patch is at https://github.com/mesonbuild/meson/commit/021d242f9ce8e.patch and it applies cleanly with context changes only.

Comment 6 Paolo Bonzini 2020-12-10 14:28:04 UTC
Tomas, are you willing to qa-ack it?

Comment 7 Tomas Pelka 2020-12-10 18:36:29 UTC
(In reply to Paolo Bonzini from comment #6)
> Tomas, are you willing to qa-ack it?

I did already 

Tomas Pelka 2020-12-02 15:36:43 UTC
Flags: qa_ack? → qa_ack+

Comment 8 Danilo de Paula 2020-12-15 00:52:06 UTC
@Paolo: I got a minor conflict when dealing with the proposed patch.

@tpelka are you able to test this change?
Actually, what actually do you do when you test it? Can we automate it and include it on the gating stuff?

Comment 11 Tomas Pelka 2021-01-08 21:06:42 UTC
(In reply to Danilo Cesar Lemes de Paula from comment #8)
> @Paolo: I got a minor conflict when dealing with the proposed patch.
> 
> @tpelka are you able to test this change?
> Actually, what actually do you do when you test it? Can we automate it and
> include it on the gating stuff?

I thought I know but I don't pbonzini idea?

Thanks
in advance
-Tom

Comment 12 Paolo Bonzini 2021-01-08 22:08:32 UTC
Rebuilding some of Mesa, systemd and QEMU would be a pretty good gating.  Considering changes to Meson are pretty rare, it's probably not a big deal if it takes some time.

Comment 13 Tomas Pelka 2021-01-11 19:20:00 UTC
(In reply to Paolo Bonzini from comment #12)
> Rebuilding some of Mesa, systemd and QEMU would be a pretty good gating. 
> Considering changes to Meson are pretty rare, it's probably not a big deal
> if it takes some time.

Thanks Paolo, make sense from my point of view.

Comment 14 Tomas Pelka 2021-01-12 21:32:19 UTC
Mesa build was fine so I think it should be fine.

Comment 16 errata-xmlrpc 2021-05-18 16:27:23 UTC
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 (meson bug fix and enhancement update), 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-2021:1962


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