I'm trying to set up a cross-compiling environment and wanted to install qemu in user-mode. Using the handbook: https://wiki.gentoo.org/wiki/Embedded_Handbook/General/Compiling_with_qemu_user_chroot I tried to compile qemu with: QEMU_USER_TARGETS="arm" QEMU_SOFTMMU_TARGETS="arm" USE="static-user static-libs" emerge --ask --buildpkg --oneshot qemu and it fails with the error message: ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T. You probably need to set PKG_CONFIG_LIBDIR to point to the right pkg-config files for your build target To build qemu with those parameters it reinstall the packages: - glib - attr - zlib - bzip2 with the USE-flag "-static-libs" Additional necessary is to build: libpcre as a static lib. Then it works. So please add this constraint to the qemu-ebuild.
Can confirm the above for app-emulation/qemu-2.6.0 Also, mesa must be built with USE=gbm if opengl is enabled, which the ebuild does not check.
(In reply to Sven Müller from comment #0) > > To build qemu with those parameters it reinstall the packages: > - glib > - attr > - zlib > - bzip2 > with the USE-flag "-static-libs" Of course it has to be USE="static-libs" (the minus was wrong).
The missin(In reply to Sven Müller from comment #2) > (In reply to Sven Müller from comment #0) > > > > To build qemu with those parameters it reinstall the packages: > > - glib > > - attr > > - zlib > > - bzip2 > > with the USE-flag "-static-libs" > > Of course it has to be USE="static-libs" (the minus was wrong). dev-libs/libpcre should be also in this list: [snip] /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lpcre collect2: error: ld returned 1 exit status [/snip]
indeed ibpcre[static-libs] needed to fix this exact problem
COMMON_LIB_DEPEND=">=dev-libs/glib-2.0[static-libs(+)] + dev-libs/libpcre[static-libs(+)] sys-libs/zlib[static-libs(+)] bzip2? ( app-arch/bzip2[static-libs(+)] ) xattr? ( sys-apps/attr[static-libs(+)] )" is an obvious fix, please add.
Fixed in 2.7.0-r1 commit b28fcd11405545eb2e4973f96823337531eebb08 Author: Matthias Maier <tamiko@gentoo.org> Date: Fri Sep 9 00:10:05 2016 -0500 app-emulation/qemu: fix static-user dep, security patches, bug #593038 This commit resolves bug #591202 bug #593024 bug #593034 CVE-2016-7155 bug #593036 CVE-2016-7156 bug #593038 CVE-2016-7157 Package-Manager: portage-2.2.28
this isn't a bug in qemu. i'll revert the libpcre dep. https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50cc5bc8f3ccb2990fce7c56ea843dd35641787f *** This bug has been marked as a duplicate of bug 588952 ***