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

Bug 276301

Summary: sys-libs/glibc-2.9_p20081201-r2 - fail to build with distcc with multilib
Product: Gentoo Linux Reporter: NiTr0 <nitr0>
Component: [OLD] LibraryAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal CC: chris, gentoo.org, gentoo, james, jan.paesmans, pva
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description NiTr0 2009-07-02 21:40:33 UTC
When I try to build glibc with enabled distcc (local) with installed wrappers for generic gcc/cc/cpp to x86_64-pc-linux-gnu-* - I get an error of compilation.

Reproducible: Always

Steps to Reproduce:
1. Install distccd, make wrappers for gcc/cc/.... as explained in http://www.gentoo.org/doc/en/cross-compiling-distcc.xml, and set distcc host to local PC
2. Try to build glibc


Actual Results:  
x86_64-pc-linux-gnu-gcc -Wl,-O1  -shared -static-libgcc -Wl,-O1  -Wl,-z,defs -Wl,-dynamic-linker=/lib32/ld-linux.so.2  -B/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/  -Wl,--version-script=/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu                                       -nptl/libm.map -Wl,-soname=libm.so.6 -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both  -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/math -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/dlfcn -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/nss -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/nis -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/rt -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/resolv -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/crypt -L/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/nptl -Wl,-rpath-link=/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/math:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/dlfcn:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/nss:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/nis:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/rt:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/resolv:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/crypt:/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/nptl -o /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/math/libm.so -T /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/shlib.lds /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/abi-note.o -Wl,--whole-archive /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/math/libm_pic.a -Wl,--no-whole-archive /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/interp.os /var./tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ld.so /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.so /var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_nonshared.a
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/math/libm_pic.a(w_remainder.os)' is incompatible with i386 output
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/../../../../x86_64-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `/var/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/math/libm_pic.a(w_scalb.os)' is incompatible with i386 output
...........................................

* ERROR: sys-libs/glibc-2.9_p20081201-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3659:  Called eblit-run 'src_compile'
 *             environment, line 1213:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  180:  Called src_compile
 *             environment, line 3659:  Called eblit-run 'src_compile'
 *             environment, line 1213:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  188:  Called toolchain-glibc_src_compile
 *       src_compile.eblit, line  123:  Called die
 * The specific snippet of code:
 *              make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed                                       "
 *  The die message:
 *   make for x86 failed

Expected Results:  
Normal compilation

# emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.3.2, glibc-2.9_p20081201-r2, 2.6.29-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-x86_64-AMD_Sempron-tm-_Processor_3000+-with-glibc2.2.5
Timestamp of tree: Thu, 02 Jul 2009 00:45:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://files.seti.kr.ua/mirrors/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://files.seti.kr.ua/gentoo-portage"
USE="3dnow X acl acpi alsa amd64 apache2 apm berkdb bzip2 cdr cgi cli cracklib crypt cups dri encode fat fortran gd gdbm gpm hal iconv ipv6 isdnlog java jpeg jpeg2k midi mmx mp3 mudflap multilib mysql mysqli ncurses nls nptl nptlonly opengl openmp pam pcre perl php png pppd python qt readline reflection reiser4 reiserfs samba session slang spl sqlite sse sse2 ssl svg symlink sysfs taglib tcpd theora tiff unicode usb vnc wifi xfce xorg xulrunner 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="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 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" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 emerald 2009-07-03 10:50:09 UTC
don't use portage with gcc/g++ wrappers for distcc, ccache or whatever, portage 
will utilize the relevant programs on it's on when FEATURES is set accordingly
Comment 2 NiTr0 2009-07-03 11:12:09 UTC
But when I don't use wrappers for gcc - I can't compile many packages with distcc because I use compile farm with different architecture (x86 & x86_64)
Comment 3 Christophe PEREZ 2009-07-03 17:14:01 UTC
Same problem here, and I don't use any wrapper.

distcc[19313] ERROR: compile (null) on localhost failed
make[2]: *** [/sauve_loc/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/math/libm.so] Error 1
make[2]: Leaving directory `/sauve_loc/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/glibc-2.9-20081201/math'
make[1]: *** [math/others] Error 2
make[1]: Leaving directory `/sauve_loc/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/work/glibc-2.9-20081201'
make: *** [all] Error 2
 *
 * ERROR: sys-libs/glibc-2.9_p20081201-r2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 3665:  Called eblit-run 'src_compile'
 *             environment, line 1219:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  180:  Called src_compile
 *             environment, line 3665:  Called eblit-run 'src_compile'
 *             environment, line 1219:  Called eblit-glibc-src_compile
 *       src_compile.eblit, line  188:  Called toolchain-glibc_src_compile
 *       src_compile.eblit, line  123:  Called die
 * The specific snippet of code:
 *              make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
 *  The die message:
 *   make for x86 failed
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/log/portage/sys-libs:glibc-2.9_p20081201-r2:20090703-170538.log'.
 * The ebuild environment file is located at '/sauve_loc/tmp/portage/sys-libs/glibc-2.9_p20081201-r2/temp/environment'.


# emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-x86_64-Intel-R-_Core-TM-2_CPU_6300_@_1.86GHz-with-glibc2.2.5
Timestamp of tree: Fri, 03 Jul 2009 11:15:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r2
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib64/fax /usr/share/config /var/spool/fax/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /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 /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe"
DISTDIR="/download/Linux/gentoo/portage"
EMERGE_DEFAULT_OPTS="--with-bdeps y --keep-going"
FEATURES="buildsyspkg ccache distcc distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://mirror.jamit.de/gentoo/"
LANG="fr_FR@euro"
LC_ALL="fr_FR@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="fr fr_FR"
MAKEOPTS="-j3"
PKGDIR="/sauve_loc/portage/pkgdir"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/sauve_loc/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://novazur.fr/gentoo-portage"
USE="X a52 aac acl acpi aim alsa amd64 audiofile bash-completion berkdb bluetooth branding bzip2 cairo caps cdr cli cracklib crypt cups dbus dri dts dvd dvdr dvdread eds emboss encode evo exif fam fbcon ffmpeg firefox flac gdbm gif gnome gphoto2 gstreamer gtk gtk2 gtkhtml hal iconv imagemagick imlib iodbc isdnlog jabber java joystick jpeg kde ldap libnotify libsamplerate lm_sensors mad matroska midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly nsplugin odbc ogg oggvorbis openal opengl openmp pam pcre pdf perl png portaudio pppd python qt3 qt3support qt4 quicktime readline reflection scanner sdl session sndfile sox speex spell spl sse sse2 ssl startup-notification svg sysfs tcltk tcpd theora tiff truetype unicode usb v4l vorbis x264 xcomposite xinerama xml xorg xpm xulrunner xv xvid zlib" ALSA_CARDS="hda-intel emu10k1 sco" 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="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 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" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="keyboard mouse joystick evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="fr fr_FR" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev nv"
Unset:  CPPFLAGS, CTARGET, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-07-04 22:50:02 UTC
I think either something is wrong in your toolchain wrappers, or something broke recently in glibc's treatment of flags.
Comment 5 SpanKY gentoo-dev 2009-07-05 17:52:34 UTC
the multilib handling has always been in the gcc-config wrapper and that is after distcc.  no real plans to address this currently ...
Comment 6 Ryan 2009-09-28 08:00:59 UTC
I've experienced this same problem, but found it was actually ccache causing my problem, not distcc, since i use both together. After removing ccache from the toolchain, I was able to use distcc with no dramas. It seems to be pretty good at picking when it can dist a compilation, or when to keep it local. 
Might be the thing to try if you are in fact using ccache.
Comment 7 SpanKY gentoo-dev 2009-10-26 09:52:02 UTC
please make sure to clear all ccaches so that Bug 196243 is allowed to work.  there is no way to automatically handle that -- people have to forcibly invalidate their entire cache.

assuming this is fallout of Bug 196243 ...

*** This bug has been marked as a duplicate of bug 196243 ***
Comment 8 SpanKY gentoo-dev 2010-04-29 22:51:09 UTC
*** Bug 317327 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2010-04-29 22:51:16 UTC
*** Bug 317181 has been marked as a duplicate of this bug. ***
Comment 10 SpanKY gentoo-dev 2010-05-07 19:12:45 UTC
*** Bug 317181 has been marked as a duplicate of this bug. ***
Comment 11 SpanKY gentoo-dev 2010-06-22 22:11:07 UTC
*** Bug 325025 has been marked as a duplicate of this bug. ***
Comment 12 SpanKY gentoo-dev 2010-08-14 01:41:35 UTC
*** Bug 300764 has been marked as a duplicate of this bug. ***