Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254164 - sys-libs/glibc-2.9_p20081201 - /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
Summary: sys-libs/glibc-2.9_p20081201 - /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/../../....
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-07 22:58 UTC by Martin Mokrejš
Modified: 2009-05-29 13:51 UTC (History)
0 users

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


Attachments
/var/tmp/portage/sys-libs/glibc-2.9_p20081201/temp/build.log (build.log,11.16 KB, text/plain)
2009-01-09 09:05 UTC, Martin Mokrejš
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mokrejš 2009-01-07 22:58:08 UTC
I know I use the "not supported profile" (bug #219908) but no time to switch away and maybe no will to have multilib on this host. Anyway, here is the error from
/var/tmp/portage/sys-libs/glibc-2.9_p20081201/work/build-x86-x86_64-pc-linux-gnu-nptl/config.log
rebuild attempt: 

configure:7970: checking size of long double
configure:8272: x86_64-pc-linux-gnu-gcc -o conftest -O2 -fno-strict-aliasing  -Wl,-O1 conftest.c  >&5
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/libgcc.a when searching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/../../../../x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/libgcc.a when searching for -lgcc
/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lgcc
collect2: ld returned 1 exit status

# gcc-config -l
 [1] x86_64-pc-linux-gnu-4.1.2
 [2] x86_64-pc-linux-gnu-4.2.4
 [3] x86_64-pc-linux-gnu-4.3.1 *
# eselect profile list
Available profile symlink targets:
  [1]   default-linux/amd64/2007.0
  [2]   default-linux/amd64/2007.0/desktop
  [3]   default-linux/amd64/2007.0/no-multilib
  [4]   default-linux/amd64/2007.0/server
  [5]   hardened/amd64
  [6]   hardened/amd64/multilib
  [7]   selinux/2007.0/amd64
  [8]   selinux/2007.0/amd64/hardened
  [9]   default/linux/amd64/2008.0 *
  [10]  default/linux/amd64/2008.0/desktop
  [11]  default/linux/amd64/2008.0/developer
  [12]  default/linux/amd64/2008.0/no-multilib
  [13]  default/linux/amd64/2008.0/server
  [14]  hardened/linux/amd64
# emerge --info
Portage 2.1.6.2 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.24.7-default x86_64)
=================================================================
System uname: Linux-2.6.24.7-default-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Sun, 21 Dec 2008 00:35:01 +0000
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.4-r15, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
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.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=nocona"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/qmail/alias /var/qmail/control /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
PKGDIR="/usr/portage/packages"
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="/nfslarge/usr/portage/local/layman/sunrise /nfslarge/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X amd64 berkdb bzip2 crypt dri gdbm hal java jce kerberos laptop mmx mpich2 multilib ncurses nptl nptlonly nsplugin pam python readline sse sse2 ssl sysfs syslog tcpd unicode 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="vesa nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2009-01-09 07:11:40 UTC
post the full build log of glibc as an attachment
Comment 2 Martin Mokrejš 2009-01-09 09:05:30 UTC
Created attachment 177851 [details]
/var/tmp/portage/sys-libs/glibc-2.9_p20081201/temp/build.log
Comment 3 Martin Mokrejš 2009-01-09 09:06:16 UTC
build.log provided
Comment 4 SpanKY gentoo-dev 2009-01-09 15:45:14 UTC
 * Building multilib glibc for ABIs: x86 amd64

you cannot mix non-multilib toolchains with and multilib profiles.  glibc will build fine as long as your multilib setup is sane (and yes, it builds with or without multilib support).
Comment 5 Martin Mokrejš 2009-01-09 15:55:55 UTC
> * Building multilib glibc for ABIs: x86 amd64
>
> you cannot mix non-multilib toolchains with and multilib profiles.  glibc will
> build fine as long as your multilib setup is sane (and yes, it builds with or
> without multilib support).

But how did I manage that?

# grep -v '#' /etc/make.conf 
CFLAGS="-O2 -pipe -march=nocona"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
USE="-acl amd64 berkdb bzip2 -cli -cracklib crypt -cups -doc dri -fortran gdbm -gnome -gpm hal -iconv -ipv6 -isdnlog java jce -kde -kde2 -kde3 laptop -midi mmx mpich2 -mudflap ncurses -nls nptl nptlonly nsplugin -openmp pam -pcre -perl -pppd python readline -reflection -session -spl sse sse2 ssl syslog tcpd unicode xorg zlib X kerberos"
PORTDIR_OVERLAY="/nfslarge/usr/portage"
ACCEPT_KEYWORDS="~amd64 amd64"
VIDEO_CARDS="vesa nvidia"
source /nfslarge/usr/portage/local/layman/make.conf
# grep glibc /etc/portage/package.use
#
Comment 6 SpanKY gentoo-dev 2009-01-09 21:44:02 UTC
you're using a multilib profile.  i dont really follow the amd64 guys, so you should ask on the users list or join one of the amd64 channels on irc and ask.
Comment 7 Martin Mokrejš 2009-05-29 13:51:15 UTC
(In reply to comment #6)
> you're using a multilib profile.  i dont really follow the amd64 guys, so you
> should ask on the users list or join one of the amd64 channels on irc and ask.
> 

So I managed to convert my nfs server of a cluster of Intel Quad Core x86_64 machines. I selected the multilib profile, same as on my other cluster nodes. I did on one of them:

node004# ebuild /nfslarge/usr/portage/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild compile
node004# ebuild /nfslarge/usr/portage/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild install
node004# ebuild /usr/portage/sys-devel/gcc/gcc-4.2.4-r1.ebuild compile
node004# ebuild /usr/portage/sys-devel/gcc/gcc-4.2.4-r1.ebuild install

Then I moved both /var/tmp/portage/sys-libs/glibc/glibc-2.9_p20081201-r1 and /var/tmp/portage/sys-devel/gcc/gcc-4.2.4-r1 to the nfs server and followed with:

nfssrv# ebuild /nfslarge/usr/portage/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild qmerge
nfssrv# ebuild /nfslarge/usr/portage/sys-devel/gcc/gcc-4.2.4-r1.ebuild qmerge



I could compile all applications before the fix except sanbox, gcc and glibc.
The main reason why then failed was that linker tried to avoid the -lgcc as it seemed to be for a different arch.