During compilation, pkg-config is invoked by the podman build on gpgme. If it is missing, building will fail. Per the definition of BDEPEND, while gpgme is not executed during the build, it is required to exist on CBUILD for the build to succeed. Reproducible: Always Steps to Reproduce: 1. emerge --onlydeps app-containers/podman 2. emerge --C app-crypt/gpgme 3. emerge app-containers/podman Actual Results: Build dies with ``` # github.com/proglottis/gpgme # [x86_64-pc-linux-gnu-pkg-config --cflags -- gpgme] Package gpgme was not found in the pkg-config search path. Perhaps you should add the directory containing `gpgme.pc' to the PKG_CONFIG_PATH environment variable Package 'gpgme' not found ``` Expected Results: Build succeeds.
(In reply to jewe37 from comment #0) > During compilation, pkg-config is invoked by the podman build on gpgme. If > it is missing, building will fail. Per the definition of BDEPEND, while > gpgme is not executed during the build, it is required to exist on CBUILD > for the build to succeed. > > Reproducible: Always > > Steps to Reproduce: > 1. emerge --onlydeps app-containers/podman > 2. emerge --C app-crypt/gpgme > 3. emerge app-containers/podman > Actual Results: > Build dies with > ``` > # github.com/proglottis/gpgme > # [x86_64-pc-linux-gnu-pkg-config --cflags -- gpgme] > Package gpgme was not found in the pkg-config search path. > Perhaps you should add the directory containing `gpgme.pc' > to the PKG_CONFIG_PATH environment variable > Package 'gpgme' not found > ``` > > Expected Results: > Build succeeds. Minor error in reproduction steps, fixed: 1. emerge --onlydeps app-containers/podman 2. emerge -C app-crypt/gpgme 3. emerge --nodeps app-containers/podman
github.com/proglottis/gpgme uses gpgme.h (and probably a related library), so the dependency belongs in DEPEND, not BDEPEND.
(In reply to Mike Gilbert from comment #2) > github.com/proglottis/gpgme uses gpgme.h (and probably a related library), > so the dependency belongs in DEPEND, not BDEPEND. True, the phrasing in the docs had me confused, I misunderstood the meaning of the "built system".
app-crypt/gpgme already is in DEPEND, as DEPEND includes RDEPEND, where app-crypt/gpgme is specified. I think that the issue here pops up during cross-compilation only. We don't override PKG_CONFIG environment variable, so cgo will use pkg-config instead of <whatever-triplet>-pkg-config. In flatcar we fixed it with: if tc-is-cross-compiler; then tc-export PKG_CONFIG fi Will file a PR on github.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1728e374db8721b71bad2ad4ac1e76e949849a5f commit 1728e374db8721b71bad2ad4ac1e76e949849a5f Author: Krzesimir Nowak <knowak@microsoft.com> AuthorDate: 2024-05-24 11:50:50 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-05-26 23:31:11 +0000 app-containers/podman: Fix cross-compilation issues with gpgme Need to tell cgo to use proper pkg-config with the PKG_CONFIG environment variable. Bug: https://bugs.gentoo.org/930982 Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Closes: https://github.com/gentoo/gentoo/pull/36805 Closes: https://bugs.gentoo.org/930982 Signed-off-by: Zac Medico <zmedico@gentoo.org> app-containers/podman/podman-4.9.4.ebuild | 8 +++++++- app-containers/podman/podman-5.0.2.ebuild | 8 +++++++- app-containers/podman/podman-5.0.3.ebuild | 8 +++++++- app-containers/podman/podman-9999.ebuild | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-) Additionally, it has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1728e374db8721b71bad2ad4ac1e76e949849a5f commit 1728e374db8721b71bad2ad4ac1e76e949849a5f Author: Krzesimir Nowak <knowak@microsoft.com> AuthorDate: 2024-05-24 11:50:50 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2024-05-26 23:31:11 +0000 app-containers/podman: Fix cross-compilation issues with gpgme Need to tell cgo to use proper pkg-config with the PKG_CONFIG environment variable. Bug: https://bugs.gentoo.org/930982 Signed-off-by: Krzesimir Nowak <knowak@microsoft.com> Closes: https://github.com/gentoo/gentoo/pull/36805 Closes: https://bugs.gentoo.org/930982 Signed-off-by: Zac Medico <zmedico@gentoo.org> app-containers/podman/podman-4.9.4.ebuild | 8 +++++++- app-containers/podman/podman-5.0.2.ebuild | 8 +++++++- app-containers/podman/podman-5.0.3.ebuild | 8 +++++++- app-containers/podman/podman-9999.ebuild | 8 +++++++- 4 files changed, 28 insertions(+), 4 deletions(-)