Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192142 - glibc-2.6.1 fails to compile undefined reference to `__sync_fetch_and_add_4' w/ -march unset
Summary: glibc-2.6.1 fails to compile undefined reference to `__sync_fetch_and_add_4' ...
Status: VERIFIED DUPLICATE of bug 185404
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-11 12:59 UTC by helge preuss
Modified: 2007-09-11 13:05 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description helge preuss 2007-09-11 12:59:10 UTC
I have two amd64 systems, and on both I get the same error when emerging glibc. This problem occurs only since 2.6.1 is out:



Reproducible: Always

Steps to Reproduce:
1. emerge uD world or emerge glibc

Actual Results:  
[...]
/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.os: In function `__GI___fork':
: undefined reference to `__sync_bool_compare_and_swap_4'
/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.os: In function `nscd_getpw_r':
nscd_getpw_r.c:(.text+0xd8d30): undefined reference to `__sync_fetch_and_add_4'
nscd_getpw_r.c:(.text+0xd8d72): undefined reference to `__sync_fetch_and_add_4'
/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.os: In function `nscd_getgr_r':
nscd_getgr_r.c:(.text+0xd9196): undefined reference to `__sync_fetch_and_add_4'
nscd_getgr_r.c:(.text+0xd91da): undefined reference to `__sync_fetch_and_add_4'
/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.os: In function `nscd_gethst_r':
nscd_gethst_r.c:(.text+0xd97fe): undefined reference to `__sync_fetch_and_add_4'
/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.os:nscd_gethst_r.c:(.text+0xd9842): more undefined references to `__sync_fetch_and_add_4' follow
/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.os: In function `__nscd_get_map_ref':
: undefined reference to `__sync_val_compare_and_swap_4'
/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc_pic.os: In function `__libc_freeres':
: undefined reference to `__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status
make[1]: *** [/var/tmp/portage/sys-libs/glibc-2.6.1/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.so] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.6.1/work/glibc-2.6.1'
make: *** [all] Error 2
 *
 * ERROR: sys-libs/glibc-2.6.1 failed.
 * Call stack:
 *   ebuild.sh, line 1654:   Called dyn_compile
 *   ebuild.sh, line 990:   Called qa_call 'src_compile'
 *   ebuild.sh, line 44:   Called src_compile
 *   glibc-2.6.1.ebuild, line 147:   Called eblit-run 'src_compile'
 *   glibc-2.6.1.ebuild, line 143:   Called eblit-glibc-src_compile
 *   src_compile.eblit, line 168:   Called src_compile
 *   glibc-2.6.1.ebuild, line 147:   Called eblit-run 'src_compile'
 *   glibc-2.6.1.ebuild, line 143:   Called eblit-glibc-src_compile
 *   src_compile.eblit, line 179:   Called toolchain-glibc_src_compile
 *   src_compile.eblit, line 122:   Called die
 *
 * make for x86 failed
[...]


no special USE flags for glibc in  /etc/portage/package.use

emerge -pv glibc:
[ebuild     U ] sys-libs/glibc-2.6.1 [2.6] USE="nls -debug -glibc-compat20 -glibc-omitfp (-hardened) (-multilib) -profile (-selinux)"

active gcc profile:
x86_64-pc-linux-gnu-4.1.2

emerge info:
Portage 2.1.3.9 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.6-r0, 2.6.21-suspend2-r4 x86_64)
=================================================================
System uname: 2.6.21-suspend2-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Timestamp of tree: Tue, 11 Sep 2007 01:30:09 +0000
app-shells/bash:     3.2_p17-r1
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.3.6-r2, 2.4.4-r4, 2.5.1-r2
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.10-r4
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18.50.0.1
sys-devel/gcc-config: 1.4.0-r2
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /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/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en en_GB nds"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl alsa amd64 arts bash-completion bashlogger berkdb bitmap-fonts bzip2 cdr cli cracklib crypt cups dbus doc dri dvd dvdr encode esd fam ffmpeg flac fortran gdbm gif gpm gtk hal iconv imlib ipv6 isdnlog java jpeg kde kdeenablefinal mad midi mp3 mpeg mudflap mysql ncurses nls nptl nptlonly nsplugin offensive ogg opengl openmp pam pcre perl png ppds pppd python qt3 qt4 quicktime readline reflection samba session spell spl ssl tcpd theora tiff truetype truetype-fonts type1-fonts unicode vorbis x264 xorg xv zlib" ALSA_CARDS="emu10k1 ca0106" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB nds" USERLAND="GNU" VIDEO_CARDS="nvidia nv vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-09-11 13:03:08 UTC

*** This bug has been marked as a duplicate of bug 185404 ***