Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 591202 - app-emulation/qemu[static-user] on arm: ERROR: sizeof(size_t) doesn't match GLIB_SIZEOF_SIZE_T.
Summary: app-emulation/qemu[static-user] on arm: ERROR: sizeof(size_t) doesn't match G...
Status: RESOLVED DUPLICATE of bug 588952
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal
Assignee: Gentoo QEMU Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-13 17:03 UTC by Sven Müller
Modified: 2016-11-15 04:56 UTC (History)
1 user (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 Sven Müller 2016-08-13 17:03:30 UTC
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.
Comment 1 Roy Bamford gentoo-dev 2016-08-13 19:03:49 UTC
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.
Comment 2 Sven Müller 2016-08-24 11:34:16 UTC
(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).
Comment 3 Priit Laes (IRC: plaes) 2016-09-04 13:08:05 UTC
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]
Comment 4 Oleh 2016-09-07 17:06:40 UTC
indeed ibpcre[static-libs] needed to fix this exact problem
Comment 5 Oleh 2016-09-08 10:03:52 UTC
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.
Comment 6 Matthias Maier gentoo-dev 2016-09-09 05:24:19 UTC
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
Comment 7 SpanKY gentoo-dev 2016-11-15 04:56:12 UTC
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 ***