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.
Tomas, are you willing to qa-ack it?
(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+
@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?
(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
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.
(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.
Mesa build was fine so I think it should be fine.
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