Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 901481 - app-containers/conmon: Fails to cross-compile
Summary: app-containers/conmon: Fails to cross-compile
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Zac Medico
Depends on:
Reported: 2023-03-16 15:09 UTC by Dustin C. Hatch
Modified: 2023-03-17 22:18 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Dustin C. Hatch 2023-03-16 15:09:48 UTC
Building app-containers/conmon with a cross-compiling toolchain fails because the compiler searches the wrong PKG_CONFIG_PATH.

aarch64-unknown-linux-gnu-gcc -O2 -pipe -fomit-frame-pointer  -DVERSION=\"2.1.6\" -DGIT_COMMIT=\"v2.1.6\"  -D USE_JOURNALD=1  -D USE_SECCOMP=1  -o src/ctr_logging.o -c src/ctr_logging.c
In file included from src/conmon.c:8:
src/utils.h:9:10: fatal error: glib.h: No such file or directory
    9 | #include <glib.h>
      |          ^~~~~~~~
compilation terminated.
Package glib-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `glib-2.0.pc'
to the PKG_CONFIG_PATH environment variable
Package 'glib-2.0', required by 'virtual:world', not found

Fortunately, the fix for this is to simply add PKG_CONFIG to the list of environment variables to export with the `tc-export` function.