Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 867766 - app-emulation/qemu: Unprefixed invocations of pkg-config and clang
Summary: app-emulation/qemu: Unprefixed invocations of pkg-config and clang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: John Helmert III
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: tc-directly
  Show dependency tree
 
Reported: 2022-08-31 20:35 UTC by Allen Webb
Modified: 2023-08-26 03:51 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Allen Webb 2022-08-31 20:35:05 UTC
I have filed this upstream in https://gitlab.com/qemu-project/qemu/-/issues/1185, but figured I would file it here to since the clang part of the issue might not get fixed upstream.

The qemu configure script calls `pkg-config` directly instead of de-referencing the value they obtain earlier in `./configure`. This can be fixed in `src_prepare()` with:
```
sed -i -e 's/pkg-config --modversion/${pkg-config} --modversion/g' configure
```

The configure script also sets `objcc` to `clang` if clang is available even for cross compilation. This can be fixed by including `--objcc="$(tc-getCC)"` in conf_opts in `qemu_src_configure()`.



Reproducible: Always
Comment 1 Brahmajit Das 2023-08-16 08:44:34 UTC
Is this still an issue? I tried qemu-8.0.4 but it build fine with musl clang. Seems like the fix in in the commit https://gitlab.com/qemu-project/qemu/-/commit/c0c34c9105cb2c30222eb8f94005a326ad02efc0, I can make a patch out of it.

@Ajak what do you think?
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-26 03:39:31 UTC
(In reply to listout from comment #1)
> Is this still an issue? I tried qemu-8.0.4 but it build fine with musl
> clang. Seems like the fix in in the commit
> https://gitlab.com/qemu-project/qemu/-/commit/
> c0c34c9105cb2c30222eb8f94005a326ad02efc0, I can make a patch out of it.
> 
> @Ajak what do you think?

You still need to check if it's making unprefixed calls to the tools even if it builds fine for you.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-26 03:40:43 UTC
Looks like the pkg-config fix landed in 8.0.0. I'll throw the objcc bit in though.
Comment 4 Larry the Git Cow gentoo-dev 2023-08-26 03:51:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce974471d1bc7a9b33fa138f54f35f0e9bc7a77b

commit ce974471d1bc7a9b33fa138f54f35f0e9bc7a77b
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-08-26 03:49:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-08-26 03:49:00 +0000

    app-emulation/qemu: add 8.1.0
    
    Fix some test failures too (skip a test which fails for me, probably kernel
    config or network-sandbox related + crank up timeouts).
    
    Closes: https://bugs.gentoo.org/865647
    Closes: https://bugs.gentoo.org/867766
    Signed-off-by: Sam James <sam@gentoo.org>

 app-emulation/qemu/Manifest                        |   2 +
 .../qemu/files/qemu-8.1.0-find-sphinx.patch        |  10 +
 .../qemu/files/qemu-8.1.0-skip-tests.patch         |  64 ++
 app-emulation/qemu/qemu-8.1.0.ebuild               | 963 +++++++++++++++++++++
 app-emulation/qemu/qemu-9999.ebuild                |  19 +-
 5 files changed, 1047 insertions(+), 11 deletions(-)