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

Bug 198521

Summary: can not compile libperl-5.8.8-r1 or perl-5.8.8-r2
Product: Gentoo Linux Reporter: Justus Ranvier <gentoo>
Component: Current packagesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: gcc output

Description Justus Ranvier 2007-11-09 00:37:47 UTC
Trying to compile libperl or perl both fail with the same error:

I used the command:

        x86_64-pc-linux-gnu-gcc -o try -O2 -pipe -fno-strict-aliasing -pipe -Wdeclaration-after-statement -L/usr/local/lib64 try.c -lpthread -lnsl -ldb -ldl -lm -lcrypt -lutil -lc
         ./try

and I got the following output:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/libnsl.so: undefined reference to `gdtdomainname@GLIBC_2.2.5'
collect2: ld returned 1 exit status
I can't compile the test program.
You have a BIG problem.  Shall I abort Configure [y]
Ok.  Stopping Configure.


Reproducible: Always




Portage 2.1.3.19 (!/home/portage/local/profiles/local, gcc-4.1.2, glibc-2.6.1-r0, 2.6.23.1-cfs-v22 x86_64)
=================================================================
System uname: 2.6.23.1-cfs-v22 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
Timestamp of tree: Thu, 08 Nov 2007 01:30:09 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.10-r5
sys-apps/sandbox:    1.2.18.1-r1
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23
ABI="amd64"
ACCEPT_KEYWORDS="amd64"
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 mulaw multi null plug rate route share shm softvol"
ARCH="amd64"
ASFLAGS_x86="--32"
AUTOCLEAN="yes"
BROWSER="firefox '%s' &"
CBUILD="x86_64-pc-linux-gnu"
CCACHE_SIZE="10G"
CDEFINE_amd64="__x86_64__"
CDEFINE_x86="__i386__"
CFLAGS="-O2 -pipe"
CFLAGS_x86="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
CHOST="x86_64-pc-linux-gnu"
CHOST_amd64="x86_64-pc-linux-gnu"
CHOST_x86="i686-pc-linux-gnu"
CLEAN_DELAY="5"
CONFIG_PROTECT="/etc /usr/lib/X11/app-defaults"
CONFIG_PROTECT_MASK="/etc/bash_completion.d /etc/dbus-1 /etc/env.d /etc/gconf /etc/init.d /etc/modules.d /etc/pam.d /etc/pango /etc/profile.d /etc/revdep-rebuild /etc/security /etc/sound /etc/terminfo /etc/udev /etc/udev/rules.d /usr/kde/3.5/share/config"
CVS_RSH="ssh"
CXXFLAGS="-O2 -pipe"
DEFAULT_ABI="amd64"
DISTDIR="/home/portage/distfiles"
EDITOR="/bin/nano"
ELIBC="glibc"
EMERGE_DEFAULT_OPTS="--alphabetical --ask --columns --deep --verbose"
EMERGE_WARNING_DELAY="10"
FEATURES="ccache confcache distlocks metadata-transfer parallel-fetch sfperms strict unmerge-orphans userfetch"
FETCHCOMMAND="/usr/bin/wget -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}"
GCC_PATH="/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2"
GCC_SPECS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
HOME="/root"
INFOPATH="/usr/share/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/info:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/info"
INPUT_DEVICES="keyboard mouse"
INSTALL_MASK="kernel-2.4"
KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text"
LDFLAGS_x86="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib"
LESS="-R -M --shift 5"
LESSOPEN="|lesspipe.sh %s"
LIBDIR_amd64="lib64"
LIBDIR_x86="lib32"
LINGUAS="en_US"
LOGNAME="root"
LS_COLORS="no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.pdf=00;32:*.ps=00;32:*.txt=00;32:*.patch=00;32:*.diff=00;32:*.log=00;32:*.tex=00;32:*.doc=00;32:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:"
MAIL="/var/mail/root"
MAKEOPTS="-j2"
MANPATH="/usr/local/share/man:/usr/share/man:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.18/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/4.1.2/man"
MULTILIB_ABIS="amd64 x86"
MULTILIB_STRICT_DENY="64-bit.*shared object"
MULTILIB_STRICT_DIRS="/lib /usr/lib /usr/kde/*/lib /usr/qt/*/lib /usr/X11R6/lib"
MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|binutils|eclipse-3|debug|portage)"
OLDPWD="/mnt/gentoo"
PAGER="/usr/bin/less"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2"
PKGDIR="/home/portage/packages"
PORTAGE_ARCHLIST="ppc s390 amd64 x86 ppc64 x86-fbsd m68k arm sparc sh mips ia64 alpha ppc-macos hppa sparc-fbsd"
PORTAGE_BINHOST_CHUNKSIZE="3000"
PORTAGE_BIN_PATH="/usr/lib64/portage/bin"
PORTAGE_CONFIGROOT="/"
PORTAGE_DEBUG="0"
PORTAGE_DEPCACHEDIR="/var/cache/edb/dep"
PORTAGE_ELOG_CLASSES="log warn error"
PORTAGE_ELOG_MAILFROM="portage@localhost"
PORTAGE_ELOG_MAILSUBJECT="[portage] ebuild log for ${PACKAGE} on ${HOST}"
PORTAGE_ELOG_MAILURI="root"
PORTAGE_ELOG_SYSTEM="save_summary echo"
PORTAGE_GID="250"
PORTAGE_INST_GID="0"
PORTAGE_INST_UID="0"
PORTAGE_PYM_PATH="/usr/lib64/portage/pym"
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_RSYNC_RETRIES="3"
PORTAGE_TMPDIR="/var/tmp"
PORTAGE_WORKDIR_MODE="0700"
PORTDIR="/home/portage/tree"
PORTDIR_OVERLAY="/home/portage/local /home/portage/local/layman/musicbrainz"
PWD="/mnt/gentoo/etc"
PYTHONPATH="/usr/lib64/portage/pym"
RESUMECOMMAND="/usr/bin/wget -c -t 5 -T 60 --passive-ftp -O ${DISTDIR}/${FILE} ${URI}"
ROOT="/"
ROOTPATH="/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.1.2"
RPMDIR="/usr/portage/rpm"
SHELL="/bin/bash"
SHLVL="1"
SSH_AGENT_PID="3372"
SSH_AUTH_SOCK="/tmp/ssh-toksMU3371/agent.3371"
SSH_CLIENT="120.0.1.5 43626 22"
SSH_CONNECTION="120.0.1.5 43626 120.0.1.6 22"
SSH_TTY="/dev/pts/0"
STAGE1_USE="nptl nptlonly unicode"
SYMLINK_LIB="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
TERM="xterm"
USE="3dnow 3dnowext X509 aalib acl acpi amd64 berkdb bitmap-fonts bzip2 cli cracklib crypt cups dri fam foomaticdb fortran gpm iconv idea ipv6 isdnlog ldap midi mmx mmxext mudflap ncurses nls nonfsv4 nptl nptlonly offensive openmp pam pcre perl pppd python readline reflection session spell spl sse sse2 ssl sysfs syslog threads truetype-fonts type1-fonts unicode usb xorg xvmc 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 mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="nvidia vesa vga"
USER="root"
USERLAND="GNU"
USE_EXPAND="ALSA_CARDS ALSA_PCM_PLUGINS CAMERAS CROSSCOMPILE_OPTS DVB_CARDS ELIBC FCDSL_CARDS FOO2ZJS_DEVICES FRITZCAPI_CARDS INPUT_DEVICES KERNEL LCD_DEVICES LINGUAS LIRC_DEVICES MISDN_CARDS USERLAND VIDEO_CARDS"
USE_EXPAND_HIDDEN="CROSSCOMPILE_OPTS ELIBC KERNEL USERLAND"
USE_ORDER="env:pkg:conf:defaults:pkginternal:env.d"
VIDEO_CARDS="nvidia vesa vga"
XARGS="xargs -r"
_="/usr/bin/emerge"
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-11-09 02:31:30 UTC
I think your glibc/gcc might be broken.
emerge gcc glibc
then try perl again.
Comment 2 Justus Ranvier 2007-11-09 02:55:01 UTC
(In reply to comment #1)
> I think your glibc/gcc might be broken.
> emerge gcc glibc
> then try perl again.
>

I've ran "emerge -e world" several times now, I've been able to fix everything else except these two packages. This is a fresh stage 3 install, with a handfull of extra packages.
Comment 3 Justus Ranvier 2007-11-09 02:56:06 UTC
I guess I could try bootstrapping...
Comment 4 SpanKY gentoo-dev 2007-11-09 09:50:14 UTC
the output you posted doesnt tell me *which* test in perl is failing

you should take that try.c and compile/link it by hand and use these options:
-Wl,-M -Wl,--verbose

then see where this "gdtdomainname" is coming from ... i suspect it should actually be "getdomainname"

also, post the output of doing:
readelf -W -s /lib64/libnsl.so* | grep domain
readelf -W -s /lib64/libc.so* | grep domain
Comment 5 Justus Ranvier 2007-11-09 12:16:55 UTC
First the easy parts:


readelf -W -s /lib64/libnsl.so* | grep domain
    21: 0000000000000000     5 OBJECT  GLOBAL DEFAULT  UND _libc_intl_domainname@GLIBC_2.2.5 (4)
    63: 0000000000000000   121 FUNC    GLOBAL DEFAULT  UND getdomainname@GLIBC_2.2.5 (4)
   149: 000000000000cfb0   151 FUNC    GLOBAL DEFAULT   12 nis_domain_of_r@@GLIBC_2.2.5
   159: 0000000000004770    10 FUNC    GLOBAL DEFAULT   12 xdr_domainname@@GLIBC_2.2.5
   192: 0000000000005f50   171 FUNC    GLOBAL DEFAULT   12 yp_get_default_domain@@GLIBC_2.2.5
   222: 000000000000cf90    17 FUNC    GLOBAL DEFAULT   12 nis_domain_of@@GLIBC_2.2.5

readelf -W -s /lib64/libc.so* | grep domain
    19: 00000000000d2f80    23 FUNC    GLOBAL DEFAULT   11 __getdomainname_chk@@GLIBC_2.4
   372: 00000000000b9fb0   121 FUNC    GLOBAL DEFAULT   11 getdomainname@@GLIBC_2.2.5
   464: 0000000000106f82     5 OBJECT  GLOBAL DEFAULT   14 _libc_intl_domainname@@GLIBC_2.2.5
   526: 000000000002a7b0    27 FUNC    WEAK   DEFAULT   11 bind_textdomain_codeset@@GLIBC_2.2.5
  1528: 000000000002d690   307 FUNC    WEAK   DEFAULT   11 textdomain@@GLIBC_2.2.5
  1612: 000000000033db28     8 OBJECT  GLOBAL DEFAULT   33 _nl_domain_bindings@@GLIBC_2.2.5
  1894: 000000000002a7d0    27 FUNC    WEAK   DEFAULT   11 bindtextdomain@@GLIBC_2.2.5
  1989: 00000000000ba030    37 FUNC    GLOBAL DEFAULT   11 setdomainname@@GLIBC_2.2.5
Comment 6 Justus Ranvier 2007-11-09 12:27:02 UTC
I took the command line from the error message and added the options you specified:

x86_64-pc-linux-gnu-gcc -o try -O2 -pipe -fno-strict-aliasing -pipe -Wdeclaration-after-statement -L/usr/local/lib64 try.c -lpthread -lnsl -ldb -ldl -lm -lcrypt -lutil -lc -Wl,-M -Wl,--verbose

The resulting text is very long, so I'll upload it as an attachment.
Comment 7 Justus Ranvier 2007-11-09 12:28:00 UTC
Created attachment 135580 [details]
gcc output
Comment 8 SpanKY gentoo-dev 2007-11-09 18:04:59 UTC
unfortunately, that shows that it worked

did you get an error when running the command by hand ?
Comment 9 Justus Ranvier 2007-11-18 15:36:23 UTC
(In reply to comment #8)
> unfortunately, that shows that it worked
> 
> did you get an error when running the command by hand ?
> 

I found the problem: I have bad ram. Switching to a custom memmap that skips over the bad areas seems to have fixed the problem. Also I deleted the ccache directory, since everything in it was suspect.
Comment 10 SpanKY gentoo-dev 2007-11-18 17:29:04 UTC
sounds good
Comment 11 SpanKY gentoo-dev 2007-11-18 17:29:13 UTC

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