Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 262054 - distcc on compile farm with mixed platforms failed to build net-dns/libidn-1.5-r1 (and possible other packages)
Summary: distcc on compile farm with mixed platforms failed to build net-dns/libidn-1....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: MATSUU Takuto (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-10 22:01 UTC by NiTr0
Modified: 2009-04-04 13:31 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Result of # MAKEOPTS=-j1 emerge -1 libidn (build.log,77.00 KB, text/plain)
2009-03-13 16:49 UTC, NiTr0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NiTr0 2009-03-10 22:01:37 UTC
I tried to build net-dns/libidn-1.5-r1 on compile farm that consists of 2 PCs: one x86_64 host and one i686. As result I get an error during linking.
Both PCs are configured as in guide - http://www.gentoo.org/doc/en/distcc.xml, http://www.gentoo.org/doc/en/cross-compiling-distcc.xml 

Reproducible: Always

Steps to Reproduce:
1. Install x86-64 and i686 gentoo linux on 2 PCs, emerge & start distcc daemon
2. On i686 add to makefile PORTDIR_OVERLAY=/usr/local/portage, do 'mkdir /usr/local/portage; crossdev -t x86_64'
3. On x86_64 configure make.conf and create wrapper for cc/gcc/g++/c++ as written in guide
4. Do on x86_64 'distcc-config --set-hosts i686_host' (it'll compile all files on i686 host)
5. Do 'emerge libidn'

Actual Results:  
libtool: link:  x86_64-pc-linux-gnu-gcc -std=gnu99 -shared  .libs/nfkc.o .libs/toutf8.o .libs/version.o .libs/stringprep.o .libs/rfc3454.o .libs/profiles.o .libs/punycode.o .libs/idna.o .libs/pr29.o .libs/idn-free.o .libs/strerror-idna.o .libs/strerror-pr29.o .libs/strerror-punycode.o .libs/strerror-stringprep.o .libs/strerror-tld.o .libs/tld.o .libs/tlds.o  -Wl,--whole-archive gl/.libs/libgnu.a -Wl,--no-whole-archive   -march=k8 -Wl,-O1   -Wl,-soname -Wl,libidn.so.11 -Wl,-version-script -Wl,.libs/libidn.ver -o .libs/libidn.so.11.5.34
.libs/toutf8.o: In function `gnu_dev_major':
toutf8.c:(.text+0x0): multiple definition of `gnu_dev_major'
.libs/nfkc.o:nfkc.c:(.text+0x0): first defined here
.libs/toutf8.o: In function `gnu_dev_minor':
toutf8.c:(.text+0x20): multiple definition of `gnu_dev_minor'
.libs/nfkc.o:nfkc.c:(.text+0x20): first defined here
.libs/toutf8.o: In function `gnu_dev_makedev':
toutf8.c:(.text+0x40): multiple definition of `gnu_dev_makedev'
.libs/nfkc.o:nfkc.c:(.text+0x40): first defined here
.libs/toutf8.o: In function `__strcspn_c1':
toutf8.c:(.text+0x90): multiple definition of `__strcspn_c1'
.libs/nfkc.o:nfkc.c:(.text+0x70): first defined here
.libs/toutf8.o: In function `__strcspn_c2':
toutf8.c:(.text+0xd0): multiple definition of `__strcspn_c2'
.libs/nfkc.o:nfkc.c:(.text+0xb0): first defined here
.libs/toutf8.o: In function `__strcspn_c3':
toutf8.c:(.text+0x120): multiple definition of `__strcspn_c3'
.libs/nfkc.o:nfkc.c:(.text+0x100): first defined here
.libs/toutf8.o: In function `__strspn_c1':
toutf8.c:(.text+0x180): multiple definition of `__strspn_c1'
.libs/nfkc.o:nfkc.c:(.text+0x160): first defined here
.libs/toutf8.o: In function `__strspn_c2':
toutf8.c:(.text+0x1a0): multiple definition of `__strspn_c2'
.libs/nfkc.o:nfkc.c:(.text+0x180): first defined here

(...................)

striconv.c:(.text+0xa30): multiple definition of `atof'
.libs/nfkc.o:nfkc.c:(.text+0x14f0): first defined here
collect2: ld returned 1 exit status
distcc[31231] ERROR: compile (null) on localhost failed
make[3]: *** [libidn.la] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-dns/libidn-1.5-r1/work/libidn-1.5/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/net-dns/libidn-1.5-r1/work/libidn-1.5/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-dns/libidn-1.5-r1/work/libidn-1.5'
make: *** [all] Error 2
 *
 * ERROR: net-dns/libidn-1.5-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4564:  Called die
 * The specific snippet of code:
 *       emake || die
 *  The die message:
 *   (no error message)
 *
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/net-dns/libidn-1.5-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/net-dns/libidn-1.5-r1/temp/environment'.
 *
!!! When you file a bug report, please include the following information:
GENTOO_VM=  CLASSPATH="" JAVA_HOME=""
JAVACFLAGS="" COMPILER=""
and of course, the output of emerge --info


Expected Results:  
Normal build (I get it when I set distcc host to only localhost)

x86_64# emerge --info
Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-AMD_Sempron-tm-_Processor_3000+-with-glibc2.2.5
Timestamp of tree: Mon, 09 Mar 2009 01:45:01 +0000
distcc 3.0 x86_64-pc-linux-gnu [enabled]
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.2-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /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/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distcc 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="-j5"
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 amd64 apache2 apm berkdb bzip2 cdr cgi cli cracklib crypt cups dri encode fortran gd gdbm gpm hal iconv ipv6 isdnlog midi mmx mp3 mudflap multilib mysql mysqli ncurses nls nptl nptlonly opengl openmp pam pcre perl php pppd python readline reflection samba session slang spl sqlite sse sse2 ssl sysfs taglib tcpd theora uicode unicode vnc wifi xorg 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vga vesa nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

i686# emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0, gcc-4.1.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-i686-AMD_Athlon-tm-_XP_2500+-with-glibc2.0
Timestamp of tree: Mon, 09 Mar 2009 01:45:01 +0000
distcc 3.0 i686-pc-linux-gnu [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.7
dev-lang/python:     2.5.2-r7
dev-python/pycrypto: 2.0.1-r8
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-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/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distcc distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://files.seti.kr.ua/mirrors/gentoo/ http://mirror.jamit.de/gentoo/ http://mirror.netcologne.de/gentoo/ ftp://mirror.netcologne.de/gentoo/ "
LANG="en_US.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
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="X acl apache2 berkdb bzip2 cairo cli cracklib crypt cups dri firefox fortran gdbm gpm iconv ipv6 isdnlog java midi mudflap mysql ncurses nls nptl nptlonly openmp pam pcre perl php pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg xulrunner zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-13 02:54:44 UTC
Please put /var/tmp/portage/net-dns/libidn-1.5-r1/temp/build.log to attachment.

could you try to emerge with MAKEOPTS="-j1"?

# MAKEOPTS=-j1 emerge -1 libidn

and could you put results of these commands?

in i686 host:
# gcc-config -l
# emerge -pv cross-x86_64-pc-linux-gnu/{binutils,gcc,glibc,linux-headers}

in x86_64 host:
# gcc-config -l
# emerge -pv binutils gcc glibc linux-headers
Comment 2 NiTr0 2009-03-13 16:49:59 UTC
Created attachment 184891 [details]
Result of # MAKEOPTS=-j1 emerge -1 libidn

For # MAKEOPTS=-j1 emerge -1 libidn - I have the same result if I set distcc host as remote PC. If I set distcc host localhost - I have no errors.
Comment 3 NiTr0 2009-03-13 17:05:49 UTC
i686:
#  gcc-config -l
 [1] i686-pc-linux-gnu-4.1.2 *
 [2] x86_64-pc-linux-gnu-4.3.3 *
# emerge -pv cross-x86_64-pc-linux-gnu/{binutils,gcc,glibc,linux-headers}

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] cross-x86_64-pc-linux-gnu/binutils-2.19.1  USE="nls -multislot -multitarget -test -vanilla" 0 kB [?=>1]
[ebuild   R   ] cross-x86_64-pc-linux-gnu/linux-headers-2.6.28-r1  0 kB [?=>1]
[ebuild   R   ] cross-x86_64-pc-linux-gnu/gcc-4.3.3  USE="fortran nls (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -gtk -hardened -ip28 -ip32r10k -libffi -mudflap (-multilib) -multislot (-n32) (-n64) -nocxx -nopie -objc -objc++ -objc-gc -openmp -test -vanilla" 0 kB [?=>1]
[ebuild   R   ] cross-x86_64-pc-linux-gnu/glibc-2.9_p20081201-r2  USE="nls -debug -gd -glibc-omitfp -hardened (-multilib) -profile (-selinux) -vanilla" 0 kB [?=>1]

Total: 4 packages (4 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage
 [?] indicates that the source repository could not be determined


x86_64:
# gcc-config -l
 [1] i686-pc-linux-gnu-4.3.3 *

 [2] x86_64-pc-linux-gnu-4.1.2 *

# emerge -pv sys-devel/{binutils,gcc} sys-kernel/linux-headers sys-libs/glibc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-devel/binutils-2.18-r3  USE="nls -multislot -multitarget -test -vanilla" 0 kB
[ebuild   R   ] sys-kernel/linux-headers-2.6.27-r2  0 kB
[ebuild   R   ] sys-devel/gcc-4.1.2  USE="fortran mudflap (multilib) nls (-altivec) -bootstrap -build -d -doc -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test -vanilla" 0 kB
[ebuild   R   ] sys-libs/glibc-2.8_p20080602-r1  USE="gd (multilib) nls -debug -glibc-omitfp (-hardened) -profile (-selinux) -vanilla" 0 kB

Total: 4 packages (4 reinstalls), Size of downloads: 0 kB


So trouble is that crossdev utility tried to emerge latest availible package, even it is marked as untested.
Comment 4 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-19 17:36:19 UTC
Please check /etc/portage/package.keywords and remove ~ARCH.
Perhaps, its version mismatch issue.
Comment 5 NiTr0 2009-03-19 21:53:57 UTC
Yes, you're right, I have on i686 in package.keywords such lines:
cross-x86_64-pc-linux-gnu/binutils amd64 ~amd64 -x86 -~x86
cross-x86_64-pc-linux-gnu/gcc amd64 ~amd64 -x86 -~x86
cross-x86_64-pc-linux-gnu/linux-headers amd64 ~amd64 -x86 -~x86
cross-x86_64-pc-linux-gnu/glibc amd64 ~amd64 -x86 -~x86
cross-x86_64-pc-linux-gnu/gdb amd64 ~amd64 -x86 -~x86
cross-x86_64-pc-linux-gnu/insight amd64 ~amd64 -x86 -~x86

I tried to clean keywords and emerge cross-environment again via 'crossdev -t x86_64' as written in the manual, and see next line:
 * Forcing the latest versions of {binutils,gcc}-config/gnuconfig ...     [ ok ]
After the break I saw in keyword file same lines as above.
I tried to emerge again cross-environment via 'crossdev -S -t x86_64' (as said 'crossdev --help', -S means stable versions) - all is OK.

IMHO it'll be good to add remark to "DistCC Cross-compiling Guide" about this - because there are no mentioning about -S key.
Comment 6 NiTr0 2009-03-19 22:23:20 UTC
My gladness about matching versions of gcc and libs/headers was too early... I tried to build libidn again - and again I get same linking failure... Cleaning /var/tmp on both machines does nothing good.

i686 PC now have that cross-toolchain:
# emerge -pv cross-x86_64-pc-linux-gnu/{binutils,gcc,glibc,linux-headers}

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] cross-x86_64-pc-linux-gnu/binutils-2.18-r3  USE="nls -multislot -multitarget -test -vanilla" 0 kB [?=>1]
[ebuild   R   ] cross-x86_64-pc-linux-gnu/linux-headers-2.6.27-r2  0 kB [?=>1]
[ebuild   R   ] cross-x86_64-pc-linux-gnu/gcc-4.1.2  USE="fortran nls (-altivec) -bootstrap -build -d -doc -gcj -gtk -hardened -ip28 -ip32r10k -libffi -mudflap (-multilib) -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test -vanilla" 0 kB [?=>1]
[ebuild   R   ] cross-x86_64-pc-linux-gnu/glibc-2.8_p20080602-r1  USE="nls -debug -gd -glibc-omitfp -hardened (-multilib) -profile (-selinux) -vanilla" 0 kB [?=>1]

Total: 4 packages (4 reinstalls), Size of downloads: 0 kB
Portage tree and overlays:
 [0] /usr/portage
 [1] /usr/local/portage
 [?] indicates that the source repository could not be determined

x86_64 PC - remains with same toolchain:
# emerge -pv sys-devel/{binutils,gcc} sys-kernel/linux-headers sys-libs/glibc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] sys-devel/binutils-2.18-r3  USE="nls -multislot -multitarget -test -vanilla" 0 kB
[ebuild   R   ] sys-kernel/linux-headers-2.6.27-r2  0 kB
[ebuild   R   ] sys-devel/gcc-4.1.2  USE="fortran mudflap (multilib) nls (-altivec) -bootstrap -build -d -doc -gcj -gtk (-hardened) -ip28 -ip32r10k -libffi -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test -vanilla" 0 kB
[ebuild   R   ] sys-libs/glibc-2.8_p20080602-r1  USE="gd (multilib) nls -debug -glibc-omitfp (-hardened) -profile (-selinux) -vanilla" 0 kB

Total: 4 packages (4 reinstalls), Size of downloads: 0 kB
Comment 7 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-20 00:17:06 UTC
Could you try distcc-3.1-r3? It fixes cross compile issue, bug #262773.
Comment 8 NiTr0 2009-03-20 18:51:55 UTC
Just update distcc on both PCs, also update gcc-config to 1.4.1 - same error...
Comment 9 MATSUU Takuto (RETIRED) gentoo-dev 2009-03-22 06:39:29 UTC
libidn-1.13 in cvs. could you try it?
Comment 10 NiTr0 2009-04-04 13:31:10 UTC
Yes. Now all is OK.