Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389225 - ERROR: dev-lang/perl-5.12.3-r1 failed (compile phase): undefined references to libm and librt
Summary: ERROR: dev-lang/perl-5.12.3-r1 failed (compile phase): undefined references t...
Status: RESOLVED DUPLICATE of bug 358875
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-01 18:47 UTC by Nicolas Pinto
Modified: 2011-11-02 01:14 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 Nicolas Pinto 2011-11-01 18:47:28 UTC
On a Gentoo Prefix with host: Ubuntu 10.04 amd64 gcc-4.5.2(Ubuntu/Linaro 4.5.2-8ubuntu4)

$ emerge --nodeps --oneshot perl
fails with "undefined references" to libm (see below)

$ LDFLAGS="-lm" emerge --nodeps --oneshot perl
fixes the libm issue but fails with "undefined references" to librt (see below)

$ LDFLAGS="-lm -lrt" emerge --nodeps --oneshot perl
emerges successfully 

Reproducible: Always

Steps to Reproduce:
1. Bootstrap Gentoo Prefix
2. env FEATURES="-collision-protect" emerge --quiet --oneshot portage (failing at perl-5.12.3)
3. emerge --nodeps --oneshot perl (attempt 1: fails, see below)
4. LDFLAGS="-lm" emerge --nodeps --oneshot perl (attempt 2: fails, see below)
5. LDFLAGS="-lm -lrt" emerge --nodeps --oneshot perl (attempt 3: fails, see below)
Actual Results:  
$ emerge --nodeps --oneshot perl
(...)
          CCCMD =  x86_64-pc-linux-gnu-gcc -DPERL_CORE -c -fno-strict-aliasing -pipe -I/home/pinto/gentoo/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=6
4  -std=c89 -O2 -pipe  -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat
`sh  cflags "optimize='-O2 -pipe'" opmini.o`  -DPERL_EXTERNAL_GLOB opmini.c
          CCCMD =  x86_64-pc-linux-gnu-gcc -DPERL_CORE -c -fno-strict-aliasing -pipe -I/home/pinto/gentoo/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=6
4  -std=c89 -O2 -pipe  -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat
`sh  cflags "optimize='-O2 -pipe'" perlmini.o`  -DPERL_IS_MINIPERL perlmini.c
          CCCMD =  x86_64-pc-linux-gnu-gcc -DPERL_CORE -c -fno-strict-aliasing -pipe -I/home/pinto/gentoo/usr/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=6
4  -std=c89 -O2 -pipe  -Wall -ansi -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat
x86_64-pc-linux-gnu-gcc -L/home/pinto/gentoo/usr/lib -Wl,-rpath=/home/pinto/gentoo/usr/lib -L/home/pinto/gentoo/lib -Wl,-rpath=/home/pinto/gentoo/lib -o minipe
rl \
      gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   \
    miniperlmain.o opmini.o perlmini.o
pp.o: In function `Perl_pp_int':
pp.c:(.text+0xbee1): undefined reference to `floor'
pp.c:(.text+0xbf81): undefined reference to `ceil'
pp.o: In function `Perl_pp_sin':
pp.c:(.text+0xc1fb): undefined reference to `sin'
pp.c:(.text+0xc2df): undefined reference to `sqrt'
pp.c:(.text+0xc35e): undefined reference to `cos'
pp.c:(.text+0xc374): undefined reference to `log'
pp.c:(.text+0xc38a): undefined reference to `exp'
pp.o: In function `Perl_pp_atan2':
pp.c:(.text+0xc4e1): undefined reference to `atan2'
pp.o: In function `Perl_pp_modulo':
pp.c:(.text+0xe23d): undefined reference to `floor'
pp.c:(.text+0xe27f): undefined reference to `fmod'
pp.c:(.text+0xe3ce): undefined reference to `floor'
pp.o: In function `Perl_pp_pow':
pp.c:(.text+0xe6c8): undefined reference to `pow'
pp_sys.o: In function `S_gmtime64_r':
pp_sys.c:(.text+0x1cee): undefined reference to `fmod'
pp_sys.c:(.text+0x1d17): undefined reference to `floor'
pp_sys.c:(.text+0x1d31): undefined reference to `fmod'
pp_sys.c:(.text+0x1d5a): undefined reference to `floor'
pp_sys.c:(.text+0x1d74): undefined reference to `fmod'
pp_sys.c:(.text+0x1d9d): undefined reference to `floor'
pp_sys.c:(.text+0x1ddf): undefined reference to `fmod'
pp_sys.c:(.text+0x1e34): undefined reference to `floor'
pp_sys.c:(.text+0x1fc5): undefined reference to `ceil'
pp_sys.c:(.text+0x2149): undefined reference to `ceil'
pp_sys.c:(.text+0x215f): undefined reference to `ceil'
pp_sys.c:(.text+0x2179): undefined reference to `ceil'
pp_sys.o: In function `Perl_pp_gmtime':
pp_sys.c:(.text+0x21ec): undefined reference to `floor'
pp_pack.o: In function `S_pack_rec':
pp_pack.c:(.text+0x3fd3): undefined reference to `floor'
pp_pack.c:(.text+0x3ff2): undefined reference to `floor'
pp_pack.c:(.text+0x401e): undefined reference to `floor'
collect2: ld returned 1 exit status
make: *** [miniperl] Error 1
emake failed

>>> Failed to emerge dev-lang/perl-5.12.3-r1, Log file:

>>>  '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/build.log'

 * Messages for package dev-lang/perl-5.12.3-r1:

 * ERROR: dev-lang/perl-5.12.3-r1 failed (compile phase):
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line  98:  Called src_compile
 *   environment, line 2769:  Called die
 * The specific snippet of code:
 *       emake -j1 || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.3-r1',
 * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.3-r1'.
 * The complete build log is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/environment'.
 * S: '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work/perl-5.12.3'


$ LDFLAGS="-lm" emerge --nodeps --oneshot perl
(...)
x86_64-pc-linux-gnu-gcc -o perl  -lm  perlmain.o lib/auto/B/B.a lib/auto/Compress/Raw/Bzip2/Bzip2.a lib/auto/Compress/Raw/Zlib/Zlib.a lib/auto/Cwd/Cwd.a lib/auto/Data/Dumper/Dumper.a lib/auto/Devel/DProf/DProf.a lib/auto/Devel/PPPort/PPPort.a lib/auto/Devel/Peek/Peek.a lib/auto/Digest/MD5/MD5.a lib/auto/Digest/SHA/SHA.a lib/auto/Encode/Encode.a lib/auto/Fcntl/Fcntl.a lib/auto/File/Glob/Glob.a lib/auto/Filter/Util/Call/Call.a lib/auto/Hash/Util/Util.a lib/auto/Hash/Util/FieldHash/FieldHash.a lib/auto/I18N/Langinfo/Langinfo.a lib/auto/IO/IO.a lib/auto/IPC/SysV/SysV.a lib/auto/List/Util/Util.a lib/auto/MIME/Base64/Base64.a lib/auto/Math/BigInt/FastCalc/FastCalc.a lib/auto/Opcode/Opcode.a lib/auto/POSIX/POSIX.a lib/auto/PerlIO/encoding/encoding.a lib/auto/PerlIO/scalar/scalar.a lib/auto/PerlIO/via/via.a lib/auto/SDBM_File/SDBM_File.a lib/auto/Socket/Socket.a lib/auto/Storable/Storable.a lib/auto/Sys/Hostname/Hostname.a lib/auto/Sys/Syslog/Syslog.a lib/auto/Text/Soundex/Soundex.a lib/auto/Time/HiRes/HiRes.a lib/auto/Time/Piece/Piece.a lib/auto/Unicode/Normalize/Normalize.a lib/auto/attributes/attributes.a lib/auto/mro/mro.a lib/auto/re/re.a lib/auto/threads/threads.a lib/auto/threads/shared/shared.a libperl.a `cat ext.libs` 
lib/auto/POSIX/POSIX.a(POSIX.o): In function `XS_POSIX_tmpnam':
POSIX.c:(.text+0x5016): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
lib/auto/Time/HiRes/HiRes.a(HiRes.o): In function `XS_Time__HiRes_clock_nanosleep':
HiRes.c:(.text+0xcb1): undefined reference to `clock_nanosleep'
lib/auto/Time/HiRes/HiRes.a(HiRes.o): In function `XS_Time__HiRes_clock_getres':
HiRes.c:(.text+0xe69): undefined reference to `clock_getres'
lib/auto/Time/HiRes/HiRes.a(HiRes.o): In function `XS_Time__HiRes_clock_gettime':
HiRes.c:(.text+0xfb9): undefined reference to `clock_gettime'
collect2: ld returned 1 exit status
make: *** [perl] Error 1
emake failed
 * ERROR: dev-lang/perl-5.12.3-r1 failed (compile phase):
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line  98:  Called src_compile
 *   environment, line 2769:  Called die
 * The specific snippet of code:
 *       emake -j1 || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.3-r1',
 * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.3-r1'.
 * The complete build log is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/environment'.
 * S: '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work/perl-5.12.3'

>>> Failed to emerge dev-lang/perl-5.12.3-r1, Log file:

>>>  '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/build.log'

 * Messages for package dev-lang/perl-5.12.3-r1:

 * ERROR: dev-lang/perl-5.12.3-r1 failed (compile phase):
 *   emake failed
 * 
 * Call stack:
 *     ebuild.sh, line  98:  Called src_compile
 *   environment, line 2769:  Called die
 * The specific snippet of code:
 *       emake -j1 || die "emake failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.3-r1',
 * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.3-r1'.
 * The complete build log is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/environment'.
 * S: '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work/perl-5.12.3'

$ LDFLAGS="-lm -lrt" emerge --nodeps --oneshot perl
(...)
  /home/pinto/gentoo/usr/share/man/man1/cpanp.1
  /home/pinto/gentoo/usr/share/man/man1/cpan2dist.1
  /home/pinto/gentoo/usr/share/man/man1/shasum.1
  /home/pinto/gentoo/usr/share/man/man1/splain.1
  /home/pinto/gentoo/usr/share/man/man1/xsubpp.1
  /home/pinto/gentoo/usr/share/man/man1/a2p.1
  /home/pinto/gentoo/usr/share/man/man1/find2perl.1
  /home/pinto/gentoo/usr/share/man/man1/s2p.1
  /home/pinto/gentoo/usr/share/man/man1/psed.1
make[1]: Leaving directory `/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work/perl-5.12.3'
!!! dolib: /mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/image/home/pinto/gentoo///usr/lib/perl5/5.12.3/x86_64-linux/CORE/libperl.so.5.12.3 does not exist
dolib failed
 * ERROR: dev-lang/perl-5.12.3-r1 failed (install phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  98:  Called src_install
 *   environment, line 2872:  Called die
 * The specific snippet of code:
 *           dolib.so "${ED}"/${coredir}/${LIBPERL} || die;
 * 
 * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.3-r1',
 * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.3-r1'.
 * The complete build log is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/build.log'.
 * The ebuild environment file is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/environment'.
 * S: '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work/perl-5.12.3'
 * QA Notice: file does not exist:
 * 
 *      dolib: /mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/image/home/pinto/gentoo///usr/lib/perl5/5.12.3/x86_64-linux/CORE/libperl.so.5.12.3 does not exist

>>> Failed to emerge dev-lang/perl-5.12.3-r1, Log file:

>>>  '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/temp/build.log'

 * Messages for package dev-lang/perl-5.12.3-r1:

 * ERROR: dev-lang/perl-5.12.3-r1 failed (install phase):
 *   (no error message)
 * 
 * Call stack:
 *     ebuild.sh, line  98:  Called src_install
 *   environment, line 2872:  Called die
 * The specific snippet of code:
 *           dolib.so "${ED}"/${coredir}/${LIBPERL} || die;


Expected Results:  
dev-lang/perl-5.12.3-r1 emerged successfully

$ emerge --info =dev-lang/perl-5.12.3-r1
Portage 2.2.01.19295-prefix (prefix/linux/amd64, gcc-4.2.4, unavailable, 2.6.38-11-server x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.38-11-server-x86_64-AMD_Opteron-tm-_Processor_6128-with-debian-squeeze-sid
Timestamp of tree: Mon, 31 Oct 2011 22:40:06 +0000
app-shells/bash:      4.2_p10
sys-devel/binutils:   2.21.53.0.2
sys-devel/gcc:        4.2.4-r01.4
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:    2.4-r01.1
sys-devel/make:       3.82
Repositories: gentoo_prefix
Installed sets: 
ACCEPT_KEYWORDS="~amd64-linux"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CPPFLAGS="-I/home/pinto/gentoo/usr/include"
CXXFLAGS="-O2 -pipe"
DISTDIR="/home/pinto/gentoo/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs collision-protect distlocks ebuild-locks fixlafiles fixpackages parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-L/home/pinto/gentoo/usr/lib -Wl,-rpath=/home/pinto/gentoo/usr/lib -L/home/pinto/gentoo/lib -Wl,-rpath=/home/pinto/gentoo/lib"
MAKEOPTS="-j 9"
PKGDIR="/home/pinto/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/home/pinto/gentoo/"
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="/home/pinto/gentoo/var/tmp"
PORTDIR="/home/pinto/gentoo/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="amd64 bootstrap bzip2 cli cracklib crypt cxx dri iconv ipv6 mmx modules mudflap ncurses nptl nptlonly openmp pppd prefix readline session sse sse2 sysfs 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


$ emerge -pqv =dev-lang/perl-5.12.3-r1                                                                                                         
[ebuild  N    ] sys-devel/libperl-5.10.1-r00.1 
[ebuild  N    ] dev-lang/perl-5.12.3-r1  USE="-berkdb -build -debug -doc -gdbm -ithreads" 
[ebuild  N    ] app-admin/perl-cleaner-2.7
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2011-11-02 01:14:49 UTC
same issue if I read correctly, right?

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