When attempting to compile openldap-2.4.17 on either of two x86 machines, compilation fails with message below: added backend library back-hdb/libback_hdb.a a - ldifldif.o a - ldifversion.o added backend library back-ldif/libback_ldif.a -rw-r--r-- 1 root root 488834 2009-07-28 00:27 libbackends.a /bin/sh ../../libtool --mode=link i686-pc-linux-gnu-gcc -march=prescott -O2 -pipe -D_GNU_SOURCE -Wl,-O1 -dlopen self -o slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o lock.o controls.o extended.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o txn.o slapschema.o version.o libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/libldap_r.la ../../libraries/liblber/liblber.la -lltdl -luuid -ldb-4.7 -lslp -lssl -lcrypto -lcrypt -lresolv -pthread libslapi.a -lltdl \ -lwrap mkdir .libs rm -f .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT creating .libs/slapdS.c (cd .libs && cc -c -fno-builtin "slapdS.c") rm -f .libs/slapdS.c .libs/slapd.nm .libs/slapd.nmS .libs/slapd.nmT i686-pc-linux-gnu-gcc -march=prescott -O2 -pipe -D_GNU_SOURCE -Wl,-O1 .libs/slapdS.o -o .libs/slapd main.o globals.o bconfig.o config.o daemon.o connection.o search.o filter.o add.o cr.o attr.o entry.o backend.o backends.o result.o operation.o dn.o compare.o modify.o delete.o modrdn.o ch_malloc.o value.o ava.o bind.o unbind.o abandon.o filterentry.o phonetic.o acl.o str2filter.o aclparse.o init.o user.o lock.o controls.o extended.o passwd.o schema.o schema_check.o schema_init.o schema_prep.o schemaparse.o ad.o at.o mr.o syntax.o oc.o saslauthz.o oidm.o starttls.o index.o sets.o referral.o root_dse.o sasl.o module.o mra.o mods.o sl_malloc.o zn_malloc.o limits.o operational.o matchedValues.o cancel.o syncrepl.o backglue.o backover.o ctxcsn.o ldapsync.o frontend.o slapadd.o slapcat.o slapcommon.o slapdn.o slapindex.o slappasswd.o slaptest.o slapauth.o slapacl.o component.o aci.o alock.o txn.o slapschema.o version.o -pthread -Wl,--export-dynamic libbackends.a liboverlays.a ../../libraries/liblunicode/liblunicode.a ../../libraries/librewrite/librewrite.a ../../libraries/liblutil/liblutil.a ../../libraries/libldap_r/.libs/libldap_r.so /var/tmp/portage/net-nds/openldap-2.4.17/work/openldap-2.4.17/libraries/liblber/.libs/liblber.so ../../libraries/liblber/.libs/liblber.so -luuid /usr/lib/libdb-4.7.so -lpthread /usr/lib/libslp.so -lnsl -lssl -lcrypto -lcrypt -lresolv -pthread libslapi.a /usr/lib/libltdl.so -ldl -lwrap daemon.o: In function `slap_listener': daemon.c:(.text+0xf65): warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead daemon.c:(.text+0xd2e): warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `.libs/slapdS.o' is incompatible with i386 output collect2: ld returned 1 exit status distcc[21635] ERROR: compile (null) on localhost failed make[2]: *** [slapd] Error 1 make[2]: Leaving directory `/var/tmp/portage/net-nds/openldap-2.4.17/work/openldap-2.4.17/servers/slapd' make[1]: *** [all-common] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-nds/openldap-2.4.17/work/openldap-2.4.17/servers' make: *** [all-common] Error 1 * * ERROR: net-nds/openldap-2.4.17 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3151: Called die * The specific snippet of code: * emake CC=$(tc-getCC) AR=$(tc-getAR) || die "emake failed"; * The die message: * emake failed * * 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-nds/openldap-2.4.17/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-nds/openldap-2.4.17/temp/environment'. * >>> Failed to emerge net-nds/openldap-2.4.17, Log file: >>> '/var/tmp/portage/net-nds/openldap-2.4.17/temp/build.log' . Reproducible: Always Steps to Reproduce: 1. emerge openldap with distcc 2. compilation failure. 3. FEATURES='-distcc' emerge openldap 4. compilation succeeds. Expected Results: 1. emerge openldap with distcc 4. compilation succeeds. more to come...
pappy-lap ~ # emerge --info Portage 2.2_rc33 (default/linux/x86/2008.0, gcc-4.3.2, glibc-2.10.1-r0, 2.6.29-zen2 i686) ================================================================= System uname: Linux-2.6.29-zen2-i686-Intel-R-_Celeron-R-_M_CPU_440_@_1.86GHz-with-gentoo-1.12.12 Timestamp of tree: Tue, 28 Jul 2009 04:30:01 +0000 distcc 3.1 i686-pc-linux-gnu [enabled] app-shells/bash: 4.0_p28 dev-lang/python: 2.6.2-r1 dev-python/pycrypto: 2.0.1-r8 dev-util/cmake: 2.6.4 sys-apps/baselayout: 1.12.12 sys-apps/sandbox: 2.0 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2, 1.11 sys-devel/binutils: 2.19.1-r1 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6a virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86 ~x86" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=prescott -O2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config" 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/sandbox.d /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=prescott -O2 -pipe" DISTDIR="/mnt/auto/storage/distfiles" FEATURES="distcc distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="en" MAKEOPTS="-j4" 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://192.168.0.130/gentoo-portage" USE="X a52 aac acl acpi alsa ao audiofile avi bash-completion berkdb bitmap-fonts bzip2 cairo cdr cli cracklib crypt css cups dbus dlloader dri dts dv dvd dvdr dvdread eds encode fam fbcon ffmpeg fftw flac foomaticdb fortran gdbm gif gimp glib gpm gsl gtk hal iconv isdnlog jack jpeg kde ladspa lame ldap libsamplerate mad midi mikmod mmx mp3 mpeg mudflap nas ncurses nls nptl nptlonly objc ogg opengl openmp oss pam pcre pdf perl php png ppds pppd python qt3 quicktime readline reflection samba sdl session slang slp sndfile spell spl sse sse2 ssl svg swat sysfs tcpd theora tiff truetype udev unicode usb v4l v4l2 vidix vorbis wifi win32codecs wxwindows x264 x86 xine xml xorg xscreensaver xv xvid 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="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="intel v4l" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Note: even after successful compilation using FEATURES='-distcc' emerge openldap, compilation will fail when attempting to emerge openldap with distcc enabled. Note also this was not an issue on my amd64 system. Compilation succeeded the first time around.
Likely related to bug 279461 and bug 279430, as all 3 are filed around the same time with the same issue. Not closing as DUPLICATE until the maintainer gets a look at them. bug 279461 has a patch supplied though not uploaded correctly (I'll try to fix that after this commit)
Your GCC instances are generating different output over ccache. You need to fix them, it's not a breakage of openldap. /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: i386:x86-64 architecture of input file `.libs/slapdS.o' is incompatible with i386 output
(In reply to comment #4) > Your GCC instances are generating different output over ccache. You need to fix > them, it's not a breakage of openldap. > > /usr/lib/gcc/i686-pc-linux-gnu/4.3.2/../../../../i686-pc-linux-gnu/bin/ld: > i386:x86-64 architecture of input file `.libs/slapdS.o' is incompatible with > i386 output > ccahce is disabled on *all* my systems. Please note the emerge --info. One of the machines in my stable is a 64 bit which uses crossdev, and it is properly set up. There are other programs that don't compile with distcc. This is known.
Note that openldap-2.4.17-r1 has fixed this issue for both of my x86 machines. The x86_64 also worked with it. Works for me.
Invalid? Why? I think that since a patch that had been discussed about this issue fixes said issue, that's far from invalid! I'd call it fixing a bug. Also, when one considers that my emerge --info wasn't looked at closely enough to notice that I *don't* use ccache, I SERIOUSLY question how this can be called invalid.
Sorry, I meant to write distcc where I wrote ccache. It's interesting to hear that 2.4.17-r1 apparently fixed it. Could you comment out the tc-export line in the -r1 build and tell me if the problem comes back? If it does, that means distcc was definitely at fault (for not selecting the correct compiler output).
(In reply to comment #8) > Sorry, I meant to write distcc where I wrote ccache. > It's interesting to hear that 2.4.17-r1 apparently fixed it. Could you comment > out the tc-export line in the -r1 build and tell me if the problem comes back? > If it does, that means distcc was definitely at fault (for not selecting the > correct compiler output). > Yes. Commenting that line did break compilation again. Here is the snippet: Entering subdirectory libraries make[1]: Entering directory `/var/tmp/portage/net-nds/openldap-2.4.17-r1/work/openldap-2.4.17/libraries' Making all in /var/tmp/portage/net-nds/openldap-2.4.17-r1/work/openldap-2.4.17/libraries Entering subdirectory liblutil make[2]: Entering directory `/var/tmp/portage/net-nds/openldap-2.4.17-r1/work/openldap-2.4.17/libraries/liblutil' rm -f version.c ../../build/mkversion -v "2.4.17" liblutil.a > version.c march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o base64.o base64.c /bin/sh: -O2: command not found make[2]: [base64.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o csn.o csn.c /bin/sh: -O2: command not found make[2]: [csn.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o entropy.o entropy.c /bin/sh: -O2: command not found make[2]: [entropy.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o sasl.o sasl.c /bin/sh: -O2: command not found make[2]: [sasl.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o signal.o signal.c /bin/sh: -O2: command not found make[2]: [signal.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o hash.o hash.c /bin/sh: -O2: command not found make[2]: [hash.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o passfile.o passfile.c /bin/sh: -O2: command not found make[2]: [passfile.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o md5.o md5.c /bin/sh: -O2: command not found make[2]: [md5.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o passwd.o passwd.c /bin/sh: -O2: command not found make[2]: [passwd.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o sha1.o sha1.c /bin/sh: -O2: command not found make[2]: [sha1.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o getpass.o getpass.c /bin/sh: -O2: command not found make[2]: [getpass.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o lockf.o lockf.c /bin/sh: -O2: command not found make[2]: [lockf.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o utils.o utils.c /bin/sh: -O2: command not found make[2]: [utils.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o uuid.o uuid.c /bin/sh: -O2: command not found make[2]: [uuid.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o sockpair.o sockpair.c /bin/sh: -O2: command not found make[2]: [sockpair.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o avl.o avl.c /bin/sh: -O2: command not found make[2]: [avl.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o tavl.o tavl.c /bin/sh: -O2: command not found make[2]: [tavl.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o ldif.o ldif.c /bin/sh: -O2: command not found make[2]: [ldif.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o fetch.o fetch.c /bin/sh: -O2: command not found make[2]: [fetch.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o meter.o meter.c /bin/sh: -O2: command not found make[2]: [meter.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o setproctitle.o setproctitle.c /bin/sh: -O2: command not found make[2]: [setproctitle.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o getpeereid.o getpeereid.c /bin/sh: -O2: command not found make[2]: [getpeereid.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o detach.o detach.c /bin/sh: -O2: command not found make[2]: [detach.o] Error 127 (ignored) march=prescott -O2 -pipe -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.7 -I/usr/include/db4.7 -c -o version.o version.c /bin/sh: -O2: command not found make[2]: [version.o] Error 127 (ignored) ru liblutil.a base64.o csn.o entropy.o sasl.o signal.o hash.o passfile.o md5.o passwd.o sha1.o getpass.o lockf.o utils.o uuid.o sockpair.o avl.o tavl.o ldif.o fetch.o meter.o setproctitle.o getpeereid.o detach.o version.o make[2]: ru: Command not found make[2]: *** [liblutil.a] Error 127 make[2]: Leaving directory `/var/tmp/portage/net-nds/openldap-2.4.17-r1/work/openldap-2.4.17/libraries/liblutil' make[1]: *** [all-common] Error 1 make[1]: Leaving directory `/var/tmp/portage/net-nds/openldap-2.4.17-r1/work/openldap-2.4.17/libraries' make: *** [all-common] Error 1 * * ERROR: net-nds/openldap-2.4.17-r1 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 3158: Called die * The specific snippet of code: * emake CC="${CC}" AR="${AR}" || die "emake failed"; * The die message: * emake failed * * 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-nds/openldap-2.4.17-r1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-nds/openldap-2.4.17-r1/temp/environment'. * >>> Failed to emerge net-nds/openldap-2.4.17-r1, Log file:
yup, so the CC variable isn't reliably populated due to some quirk of your distcc setup.
(In reply to comment #10) > yup, so the CC variable isn't reliably populated due to some quirk of your > distcc setup. > Or a quirk of distcc. I followed the instructions. I'm at a loss.