On default/linux/amd64/13.0/selinux profile, it is not possible to merge any of the busybox versions in the tree if USE="static" is enabled. As an ugly workaround, it is possible to temporarily switch profile. This way I get a busybox build w/o selinux support but at least it's static. I need it for my encrypted root partition using luks/dmcrypt. Maybe the selinux patch, causes this problem. It is pulled in by the profile's global use flags. Reproducible: Always Steps to Reproduce: # emerge -av1 busybox These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] sys-apps/busybox-1.20.2 USE="ipv6 pam (selinux*) static -livecd -make-symlinks -math -mdev -savedconfig -sep-usr -systemd" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB Would you like to merge these packages? [Yes/No] y Actual Results: ========== debianutils/lib.a(mktemp.o): In function `mktemp_main': mktemp.c:(.text.mktemp_main+0xc3): warning: the use of `tempnam' is dangerous, better use `mkstemp' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x46a): warning: Using 'getgrouplist' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x342): warning: Using 'getgrnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libselinux.a(seusers.o): In function `getseuserbyname': (.text+0x90): warning: Using 'getpwnam_r' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking networking/lib.a(nslookup.o): In function `print_host': nslookup.c:(.text.print_host+0x3e): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libbb/lib.a(inet_common.o): In function `INET_rresolve': inet_common.c:(.text.INET_rresolve+0xef): warning: Using 'gethostbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libbb/lib.a(inet_common.o): In function `INET_resolve': inet_common.c:(.text.INET_resolve+0xbf): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libbb/lib.a(inet_common.o): In function `INET_rresolve': inet_common.c:(.text.INET_rresolve+0x16d): warning: Using 'getnetbyaddr' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libbb/lib.a(inet_common.o): In function `INET_resolve': inet_common.c:(.text.INET_resolve+0xdd): warning: Using 'getnetbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libbb/lib.a(xconnect.o): In function `bb_lookup_port': xconnect.c:(.text.bb_lookup_port+0x3c): warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking networking/lib.a(netstat.o): In function `ip_port_str': netstat.c:(.text.ip_port_str+0x6c): warning: Using 'getservbyport' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libpcre.a(pcre_jit_compile.o): In function `sljit_free_exec': (.text+0x3da): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libpcre.a(pcre_jit_compile.o): In function `_pcre_jit_compile': (.text+0x1867f): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libpcre.a(pcre_jit_compile.o): In function `_pcre_jit_compile': (.text+0x188a5): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libpcre.a(pcre_jit_compile.o): In function `_pcre_jit_compile': (.text+0x18d17): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/../../../../lib64/libpcre.a(pcre_jit_compile.o): In function `sljit_free_exec': (.text+0x443): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_bases': (.text+0x16c4): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_table_bases': (.text+0x178b): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__deregister_frame_info_bases': (.text+0x182e): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__deregister_frame_info_bases': (.text+0x18b6): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `_Unwind_Find_FDE': (.text+0x1966): undefined reference to `pthread_mutex_lock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `_Unwind_Find_FDE': (.text+0x19b7): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_bases': (.text+0x16e3): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_eh.a(unwind-dw2-fde-glibc.o): In function `__register_frame_info_table_bases': (.text+0x17aa): undefined reference to `pthread_mutex_unlock' collect2: ld returned 1 exit status make: *** [busybox_unstripped] Error 1 * ERROR: sys-apps/busybox-1.20.2 failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=sys-apps/busybox-1.20.2'`, * the complete build log and the output of `emerge -pqv '=sys-apps/busybox-1.20.2'`. * The complete build log is located at '/var/tmp/portage/sys-apps/busybox-1.20.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-apps/busybox-1.20.2/temp/environment'. * Working directory: '/var/tmp/portage/sys-apps/busybox-1.20.2/work/busybox-1.20.2' * S: '/var/tmp/portage/sys-apps/busybox-1.20.2/work/busybox-1.20.2' Expected Results: Just merge # emerge --info Portage 2.1.11.31 (default/linux/amd64/13.0/selinux, gcc-4.6.3, glibc-2.16.0, 3.6.11-gentoo x86_64) ================================================================= System uname: Linux-3.6.11-gentoo-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.1 Timestamp of tree: Mon, 28 Jan 2013 23:00:01 +0000 ld GNU ld (GNU Binutils) 2.22 app-shells/bash: 4.2_p37 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.3-r2, 3.2.3 dev-util/cmake: 2.8.9 dev-util/pkgconfig: 0.27.1 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.11.8 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.5.4, 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.6 (virtual/os-headers) sys-libs/glibc: 2.16.0 Repositories: gentoo proaudio x-portage ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox selinux sesandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/pro-audio /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="alsa amd64 berkdb bzip2 cli cracklib crypt cryptsetup cxx dri fortran g3dvl gdbm gnome gpm gtk iconv ipv6 jpeg mmx modules mudflap multilib nautilus ncurses networkmanager nls nptl open_perms openmp pam pcre png pulseaudio readline samba selinux session sse sse2 ssl tcpd unicode vdpau xinerama xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de de_DE en" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nvidia nouveau nv intel vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Created attachment 337168 [details] build.log
Same story for me: for all hosts using default/linux/amd64/13.0/selinux profile, I have to disabled static USE flag to successfully compile sys-apps/busybox
Is libpcre installed with the static-libs USE flag set?
Yes, it is: $ emerge -pv dev-libs/libpcre These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-libs/libpcre-8.30-r2:3 USE="bzip2 cxx jit readline recursion-limit static-libs (unicode) zlib -pcre16" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB
Hi, same for me. I tried recompiling following packages but it did not help: - gcc - glibc - libpcre Regards Daniel
IMHO this cannot be fixed by just recompiling existing packages without further adjustments to the configuration or fixed packages. What I did (without success) is: # emerge -e @system # emerge -e @system # emerge -e @world Unfortunately, the behaviour was exactly like I described it in my first post. It fails when emerging busybox.
@Mike: any idea? I thought we resolved these things with the static-libs on libselinux and libpcre
not an selinux bug ... you'll hit it with any pcre static linking
Created attachment 341670 [details] libpcre-8.30-pkg-config.patch @SpanKY: Thank you very much. Here's my patch but all credits go to you! Ebuild needs an addtional epatch line in src_prepare: epatch "${FILESDIR}"/${P}-pkg-config.patch #454478 With this patch applied, I can emerge libpcre and busybox with success!
should be all set now in the tree; thanks for the report! Commit message: Add -pthread to static pkg-config entries when appropriate http://sources.gentoo.org/dev-libs/libpcre/libpcre-8.32-r1.ebuild?rev=1.1 http://sources.gentoo.org/dev-libs/libpcre/libpcre-8.32.ebuild?r1=1.2&r2=1.3