Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 543748 - dev-lang/perl-5.20.2 fails to build with undefined reference to glibc_main
Summary: dev-lang/perl-5.20.2 fails to build with undefined reference to glibc_main
Status: UNCONFIRMED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-19 03:28 UTC by Kim Nilsson
Modified: 2015-12-27 17:19 UTC (History)
1 user (show)

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


Attachments
Build log (build.log,10.12 KB, text/plain)
2015-03-19 03:29 UTC, Kim Nilsson
Details
patch for perl-5.22.1 (test.patch,336 bytes, patch)
2015-12-26 20:09 UTC, James McMechan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kim Nilsson 2015-03-19 03:28:46 UTC
dev-lang/perl-5.20.2 fails to build with undefined reference to glibc

Please note that I am still using glibc-2.20, as glibc-2.20-r2 fails to build.

Reproducible: Always

Steps to Reproduce:
1. emerge -u perl
Actual Results:  
Build fails because of linker error


Portage 2.2.14-prefix (python 2.7.8-final-0, default/linux/arm/13.0/armv7a, gcc-4.9.2, unavailable, 3.4.104-Barracuda-g218fe10 armv7l)
=================================================================
System uname: Linux-3.4.104-Barracuda-g218fe10-armv7l-ARMv7_Processor_rev_3_-v7l-with-glibc2.4
KiB Mem:     2842204 total,    870924 free
KiB Swap:    1048572 total,   1048572 free
Timestamp of tree: Thu, 19 Mar 2015 01:36:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
distcc 3.1 armv7a-hardfloat-linux-gnueabi [disabled]
app-shells/bash:          4.2_p53
dev-lang/perl:            5.20.1-r3::heroxbd
dev-lang/python:          2.7.8::heroxbd
sys-apps/baselayout:      2.2::heroxbd
sys-apps/openrc:          0.13.6
sys-devel/autoconf:       2.69
sys-devel/automake:       1.14.1
sys-devel/binutils:       2.24-r3::heroxbd
sys-devel/gcc:            4.9.2::heroxbd
sys-devel/gcc-config:     1.8-r1
sys-devel/libtool:        2.4.2-r1
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.19 (virtual/os-headers)
sys-libs/glibc:           2.20::heroxbd
Repositories: gentoo_prefix heroxbd
ACCEPT_KEYWORDS="arm ~amd64-linux ~arm ~arm-linux"
ACCEPT_LICENSE="* -@EULA"
CBUILD="armv7a-hardfloat-linux-gnueabi"
CFLAGS="-O2 -pipe -march=armv7-a -mcpu=cortex-a9 -mfpu=neon -funsafe-math-optimizations"
CHOST="armv7a-hardfloat-linux-gnueabi"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=armv7-a -mcpu=cortex-a9 -mfpu=neon -funsafe-math-optimizations"
DISTDIR="/storage/sdcard1/Distfiles"
FCFLAGS="-O2 -pipe -march=armv7-a"
FEATURES="assume-digests binpkg-logs case-insensitive-fs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersync"
FFLAGS="-O2 -pipe -march=armv7-a"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/data/gentoo/usr/portage/packages"
PORTAGE_CONFIGROOT="/data/gentoo/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/data/gentoo/var/tmp"
PORTDIR="/data/gentoo/usr/portage"
PORTDIR_OVERLAY="/data/gentoo/var/lib/layman/heroxbd"
USE="acl arm armv5te armv6 armv6t2 berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 libav modules ncurses nls nptl openmp pcre prefix rap readline session ssl tcpd unicode zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" 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 ublox 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="exynos fbdev omap omapfb 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"
USE_PYTHON="2.7"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC
Comment 1 Kim Nilsson 2015-03-19 03:29:13 UTC
Created attachment 399226 [details]
Build log
Comment 2 James McMechan 2015-12-26 20:09:21 UTC
Created attachment 420908 [details, diff]
patch for perl-5.22.1

This was a bit weird, perl was auto detecting linux-android as the OS under prefix and disabling gcc it would then barf due to not having a valid compiler.
This is a user patch I installed as 
${EPREFIX}/etc/portage/patches/dev-lang/perl-5.22.1/test.patch
that disables the problematic auto-config test.

Alas perl does not have epatch_user in its builds so I changed the ebuild by replaceing 
src_prepare()   { eblit-run src_prepare   v50160001 ; }
with
src_prepare()   { epatch_user ; eblit-run src_prepare   v50160001 ; }
and running 
ebuild ${EPREFIX}/usr/portage/dev-lang/perl/perl-5.22.1.ebuild manifest

Then my emerge worked.

I am not sure what the correct method to do this would be though...
Comment 3 Fabian Groffen gentoo-dev 2015-12-27 09:14:33 UTC
So, you have a /system/lib/libandroid.so on your system?
Comment 4 James McMechan 2015-12-27 17:19:29 UTC
(In reply to Fabian Groffen from comment #3)
> So, you have a /system/lib/libandroid.so on your system?

Yep, I am updating gentoo-prefix on a android tablet.

Kim Nilsson had the same problem, if you look closely at the build log attached to this bug you will see that it auto-detected linux-android and then complained about the C compiler not working, I had almost the exact same build failure but this time I hacked it to a working state.

It would be better if I understood how to turn off auto-detection via setting EXTRA_ECONF or something, but I did not see how to set perl's rather different config system to do that...

Anyway this hack worked in my case so, I thought I would drop it here and hopefully help other people until a better fix is found :)