Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 425538 - dev-lang/perl-5.16.0 - pp.o: In function `Perl_pp_pow': pp.c:(.text+0x2d5a): undefined reference to `pow'
Summary: dev-lang/perl-5.16.0 - pp.o: In function `Perl_pp_pow': pp.c:(.text+0x2d5a): ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-09 20:38 UTC by Steven Trogdon
Modified: 2012-08-13 20:19 UTC (History)
0 users

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


Attachments
build log (build.log.bz2,10.95 KB, application/x-bzip)
2012-07-09 20:38 UTC, Steven Trogdon
Details
environment file (environment.bz2,25.34 KB, application/x-bzip)
2012-07-09 20:39 UTC, Steven Trogdon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Trogdon 2012-07-09 20:38:31 UTC
Created attachment 317732 [details]
build log

The failure I'm getting is identical to that reported in https://bugs.gentoo.org/show_bug.cgi?id=40083 with the exception of the linking libraries. Here I get

i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -o miniperl \
    perlmini.o opmini.o miniperlmain.o   gv.o toke.o perly.o pad.o regcomp.o dump.o util.o
 mg.o reentr.o mro.o keywords.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 n
umeric.o mathoms.o locale.o pp_pack.o pp_sort.o   -lgdbm -ldb -lgdbm_compat
pp.o: In function `Perl_pp_pow':
pp.c:(.text+0x2d5a): undefined reference to `pow'

Bug 40083 was associated with bootstrapping prefix on ubuntu. Here the failure also occurred in prefix but not during bootstrapping. Since it failed in prefix this may be a gentoo-alt issue, but I'm unable to test on native x86. The subject package does build on amd64 as well as ~amd64-linux. For reference, the host OS is debian with 64bit hardware.
Comment 1 Steven Trogdon 2012-07-09 20:39:54 UTC
Created attachment 317734 [details]
environment file
Comment 2 Steven Trogdon 2012-07-09 20:51:18 UTC
It looks like I didn't completely copy the correct url of the referenced bug. It should be Bug 400839 (https://bugs.gentoo.org/show_bug.cgi?id=400839).
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-07-10 14:28:35 UTC
Please post your `emerge --info' output in a comment.
Comment 4 Steven Trogdon 2012-07-10 15:35:53 UTC
my emerge --info:

Portage 2.2.01.20757-prefix (prefix/linux/x86, gcc-4.6.3, unavailable, 2.6.32-5-686 i686)
=================================================================
System uname: Linux-2.6.32-5-686-i686-Intel-R-_Core-TM-2_Quad_CPU_Q9300_@_2.50GHz-with-debian-6.0.5
Timestamp of tree: Mon, 09 Jul 2012 14:56:24 +0000
ccache version 3.1.7 [enabled]
app-shells/bash:          4.2_p29::gentoo_prefix
dev-java/java-config:     2.1.11-r3::gentoo_prefix
dev-lang/python:          2.7.3-r2::gentoo_prefix
dev-util/ccache:          3.1.7::gentoo_prefix
dev-util/cmake:           2.8.8-r3::gentoo_prefix
dev-util/pkgconfig:       0.26::gentoo_prefix
sys-apps/sandbox:         2.5::gentoo_prefix
sys-devel/autoconf:       2.13::gentoo_prefix, 2.69::gentoo_prefix
sys-devel/automake:       1.11.5::gentoo_prefix, 1.12.1::gentoo_prefix
sys-devel/binutils:       2.22-r1::gentoo_prefix
sys-devel/gcc:            4.4.6-r1::gentoo_prefix, 4.5.3-r1::gentoo_prefix, 4.6.3::gentoo_prefix
sys-devel/gcc-config:     1.5-r2::gentoo_prefix
sys-devel/libtool:        2.4.2::gentoo_prefix
sys-devel/make:           3.82::gentoo_prefix
sys-kernel/linux-headers: 3.4::gentoo_prefix (virtual/os-headers)
Repositories: gentoo_prefix local-overlay sage-on-gentoo sage-on-prefix my-gentoo-sage sage-flask
ACCEPT_KEYWORDS="~x86-linux"
ACCEPT_LICENSE="* -@EULA dlj-1.1 Oracle-BCLA-JavaSE"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/portage /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/storage/strogdon/gentoo/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build=n"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix news parallel-fetch parse-eapi-ebuild-head preserve-libs protect-owned sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/storage/strogdon/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/storage/strogdon/gentoo/"
PORTAGE_RSYNC_EXTRA_OPTS="--delete-after --timeout=500"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/storage/strogdon/gentoo/var/tmp"
PORTDIR="/storage/strogdon/gentoo/usr/portage"
PORTDIR_OVERLAY="/storage/strogdon/gentoo/usr/local/portage /storage/strogdon/gentoo/usr/local/portage/sage-on-gentoo /storage/strogdon/gentoo/usr/local/portage/sage-on-prefix /storage/strogdon/gentoo/usr/local/portage/my-gentoo-sage /storage/strogdon/gentoo/usr/local/portage/sage-flask"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 modules mudflap ncurses nls nptl openmp pcre pppd prefix readline session ssl tcpd unicode x86 xorg 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 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 sheets 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" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" 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:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, USE_PYTHON
Comment 5 Fabian Groffen gentoo-dev 2012-07-11 06:58:53 UTC
-lm is missing from your link line, question is why perl's Configure thought it didn't need it.

The 64-bits hardware doesn't matter here, as you seem to be in a pure 32-bits environment.  (Waste of your hardware, but that's a different topic.)
Comment 6 Steven Trogdon 2012-07-11 15:43:50 UTC
(In reply to comment #5)
> -lm is missing from your link line, question is why perl's Configure thought
> it didn't need it.
> 
There may be other things that are missing as well:

Building on amd64 in prefix:

Use which C compiler? [x86_64-pc-linux-gnu-gcc]
Checking for GNU cc in disguise and/or its version number...
Now, how can we feed standard input to your C preprocessor...
Directories to use for library searches?
[/storage/strogdon/gentoo/lib /storage/strogdon/gentoo/usr/lib /lib64 /usr/lib64
 /lib /usr/lib]
What is the file extension used for shared libraries? [so]
Build Perl for SOCKS? [n]
Try to use long doubles if available? [n]
Checking for optional libraries...
What libraries to use?
[-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat]
What optimizer/debugger flag should be used? [-march=opteron -O2 -pipe]
Any additional cc flags?
[-fno-strict-aliasing -pipe -I/storage/strogdon/gentoo/usr/include]
Let me guess what the preprocessor flags are...
Any additional ld flags (NOT including libraries)? [-Wl,-O1 -Wl,--as-needed]

Building on x86 in prefix (the subject Bug):

Use which C compiler? [i686-pc-linux-gnu-gcc]
Checking for GNU cc in disguise and/or its version number...
Now, how can we feed standard input to your C preprocessor...
Directories to use for library searches?
[/storage/strogdon/gentoo/lib /storage/strogdon/gentoo/usr/lib /lib]
What is the file extension used for shared libraries? [so]
Build Perl for SOCKS? [n]
Try to use long doubles if available? [n]
Checking for optional libraries...
What libraries to use? [-lgdbm -ldb -lgdbm_compat]
What optimizer/debugger flag should be used? [-march=core2 -O2 -pipe]
Any additional cc flags?
[-fno-strict-aliasing -pipe -I/storage/strogdon/gentoo/usr/include]
Let me guess what the preprocessor flags are...
Any additional ld flags (NOT including libraries)? [-Wl,-O1 -Wl,--as-needed]

Perhaps the search path for libraries is the culprit?

> The 64-bits hardware doesn't matter here, as you seem to be in a pure
> 32-bits environment.  (Waste of your hardware, but that's a different topic.)

Unfortunately, I don't have any choice here. I'm not the maintainer of the host OS.
Comment 7 Steven Trogdon 2012-07-11 23:03:03 UTC
Well I've believe I've found at least one problem that may be the problem. In src_configure-v50160001.eblit there is

for ldir in /lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do
     [[ -d ${ldir} ]] || continue
     # find a random lib from here
     llib=( ${ldir}/*$(get_libname) )
     [[ -e ${llib[0]} ]] || continue
     $(tc-getCC) -o "${T}"/t "${T}"/t.c ${llib[0]} >& /dev/null \
          && paths="${paths} ${ldir}"
done

On my system the first ldir not to fail is /lib with corresponding llib=/lib/klibc-wbwbg7GBhllIGBCTEv0okjVELWk.so. The compile passes and /lib is added to paths. When ldir is /usr/lib the corresponding llib=/usr/lib/VBoxOGL.so
and BOOM!

gcc -o t t.c /usr/lib/VBoxOGL.so
/usr/lib/VBoxOGL.so: undefined reference to `glXQueryExtensionsString'
/usr/lib/VBoxOGL.so: undefined reference to `glNewList'
/usr/lib/VBoxOGL.so: undefined reference to `glPixelStorei'
/usr/lib/VBoxOGL.so: undefined reference to `glBitmap'
/usr/lib/VBoxOGL.so: undefined reference to `_glapi_set_dispatch'
/usr/lib/VBoxOGL.so: undefined reference to `_glapi_get_dispatch'
/usr/lib/VBoxOGL.so: undefined reference to `glGetIntegerv'
/usr/lib/VBoxOGL.so: undefined reference to `glEndList'
collect2: ld returned 1 exit status

with /usr/lib not being added to paths. Perhaps just a fluke?
Comment 8 Fabian Groffen gentoo-dev 2012-07-12 06:48:58 UTC
Hmmm, design error if you ask me.  Prefix-only issue, removing perl@ not to bother them with this crap any further.

When I wrote that check, I didn't take into account that libs could have dependencies, not listed in the ELF's needed entries.

Perhaps it's better to figure out the target of the compiler by compiling something, and then use scanelf/scanmacho to compare if the architecture matches (and hence something compatible is in there).
Comment 9 Fabian Groffen gentoo-dev 2012-07-12 06:57:18 UTC
in your case something like


$(tc-getCC) -o "${T}"/t "${T}"/t.c > /dev/null || die
local mtype=$(scanelf -BF "%a#f" "${T}"/t.c)
for ldir in /lib/*-linux-gnu /usr/lib/*-linux-gnu /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do
     [[ -d ${ldir} ]] || continue
     # find a random lib from here
     llib=( ${ldir}/*$(get_libname) )
     [[ -e ${llib[0]} ]] || continue
     [[ $(scanelf -BF "%a#f" ${llib[0]}) == ${mtype} ]] \ 
          && paths="${paths} ${ldir}"
done
Comment 10 Steven Trogdon 2012-07-12 13:30:01 UTC
OK, I see what you're doing. This works here. Small typo. I believe

local mtype=$(scanelf -BF "%a#f" "${T}"/t.c)

should be

local mtype=$(scanelf -BF "%a#f" "${T}"/t)

Is scanelf still a problem with bootstrapping, i.e. will it be present? Or will this version of perl simply not be used during that process?
Comment 11 Steven Trogdon 2012-08-13 02:04:36 UTC
Not unexpectedly, but dev-lang/perl-5.16.1 fails here for the same reason referenced above. The fix given in Comment 9 also resolves the issue.
Comment 12 Fabian Groffen gentoo-dev 2012-08-13 06:34:32 UTC
You mean I didn't commit that fix?  Oh my!
Comment 13 Fabian Groffen gentoo-dev 2012-08-13 20:19:22 UTC
ok, I recalled why, I just drafted this one up without verifying anything

Luckily, it seems we can rely on pax-utils being installed when bootstrapping perl.  I've changed it to use scanmacho iso scanelf on Darwin.

Thanks!