Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 346563

Summary: gcc fails to pull in emul-linux-x86-xlibs in selinux amd64 profiles which use.mask multilib
Product: Gentoo Linux Reporter: Andy Getz <suertreus>
Component: HardenedAssignee: SE Linux Bugs <selinux>
Severity: minor CC: gizmo, pebenito
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 365483    
Attachments: durandal@tomp ~ $ emerge --info

Description Andy Getz 2010-11-23 20:28:01 UTC
Part of GCC fails to configure with USE="gcj -multilib":
tomp ~ # emerge -1a "=sys-devel/gcc-4.5.1-r1"
[ebuild  NS   ] sys-devel/gcc-4.5.1-r1 [4.4.5] USE="doc fortran gcj graphite gtk hardened mudflap nls nptl openmp (-altivec) -bootstrap -build (-fixed-point) (-libffi) -lto (-multilib) -multislot (-n32) (-n64) -nocxx -nopie -nossp -objc -objc++ -objc-gc -test -vanilla" 0 kB
checking for XTestQueryExtension in -lXtst... no
configure: error: libXtst not found, required by java.awt.Robot
make[1]: *** [configure-target-libjava] Error 1
make[1]: Leaving directory `/mnt/build/portage/sys-devel/gcc-4.5.1-r1/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
 * ERROR: sys-devel/gcc-4.5.1-r1 failed:
 *   emake failed with bootstrap-lean

Why am I missing the appropriate
From another machine in a non-selinux amd64 multilib profile that has GCC built successfully with USE="gcj":
durandal@tycho ~ $ equery b `locate`
 * Searching for /usr/lib32/,/usr/lib32/,/usr/lib32/,/usr/lib64/,/usr/lib64/,/usr/lib64/ ... 
app-emulation/emul-linux-x86-xlibs-20100915 (/usr/lib32/
app-emulation/emul-linux-x86-xlibs-20100915 (/usr/lib32/ ->
app-emulation/emul-linux-x86-xlibs-20100915 (/usr/lib32/ ->
x11-libs/libXtst-1.2.0 (/usr/lib64/
x11-libs/libXtst-1.2.0 (/usr/lib64/ ->
x11-libs/libXtst-1.2.0 (/usr/lib64/ ->

Why wasn't the providing package (app-emulation/emul-linux-x86-xlibs) pulled in by DEPEND?
durandal@tomp ~ $ grep "^DEPEND" /usr/portage/gentoo/sys-devel/gcc/gcc-4.5.1-r1.ebuild -A8
	test? ( >=dev-util/dejagnu-1.4.4 >=sys-devel/autogen-5.5.4 )
	elibc_glibc? ( >=sys-libs/glibc-2.8 )
	amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) )
	ppc? ( >=${CATEGORY}/binutils-2.17 )
	ppc64? ( >=${CATEGORY}/binutils-2.17 )

Where is multilib use.masked?
durandal@tomp ~ $ ls -la /etc/make.profile
lrwxrwxrwx. 1 root root 65 Nov 17 00:21 /etc/make.profile -> ../usr/portage/gentoo/profiles/selinux/v2refpolicy/amd64/hardened
durandal@tomp ~ $ find /usr/portage/gentoo/profiles/selinux -name use.mask | xargs grep multilib -B1 
/usr/portage/gentoo/profiles/selinux/use.mask-# Only used by mips and old amd64 profiles

The obvious workaround is to emerge -1 app-emulation/emul-linux-x86-xlibs, but I think this is a real (though low-impact) bug.  It will probably only hit systems that are being newly-installed with this profile and these useflags; any in-use desktop box will probably have long since pulled in the missing dep as mine above (tycho) must have.

I assume multilib is use.masked by selinux for some good reason I am not aware of and thus the obvious solution of un-use.masking that flag is inappropriate or inadvisable.  One alternative that occurs to me is to have the gcc ebuilds pull in emul-linux-x86-xlibs in the case of USE="amd64 selinux gcj", but that's a little icky too.

`emerge --info`, build.log, and config.log to be attached.

Thanks for your good work!
Comment 1 Andy Getz 2010-11-23 20:31:23 UTC
Created attachment 255225 [details]
durandal@tomp ~ $ emerge --info
Comment 2 Andy Getz 2010-11-23 20:32:09 UTC
Created attachment 255227 [details]
Comment 3 Andy Getz 2010-11-23 20:35:13 UTC
Created attachment 255231 [details]

Redacted for sanity/filesize.
Comment 4 Sven Vermeulen 2011-04-16 09:21:34 UTC
There is indeed something weird with (no)multilib and the SELinux profiles. A suggestion is made to clean up the profiles a bit by using a features/selinux dependency within the profile rather than a new profile tree

See also
Comment 5 Sven Vermeulen (RETIRED) gentoo-dev 2011-12-10 17:41:16 UTC
This is now fixed with the new profiles.