Summary: | dev-lang/perl-5.12.3-r1 fails to bootstrap with undefined references to libm on Ubuntu | ||
---|---|---|---|
Product: | Gentoo/Alt | Reporter: | Nicolas Pinto <nicolas.pinto> |
Component: | Prefix Support | Assignee: | Gentoo Prefix <prefix> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Nicolas Pinto
2012-01-25 22:12:55 UTC
Related bug report on the mailing list: http://archives.gentoo.org/gentoo-alt/msg_afacb2f828280fede41f798418f7bc30.xml (In reply to comment #1) > Related bug report on the mailing list: > http://archives.gentoo.org/gentoo-alt/msg_afacb2f828280fede41f798418f7bc30.xml asm/errno.h is now /usr/include/i386-linux-gnu/asm/errno.h I'm guessing the rest of your issues is due to the multiarch garbage that ubuntu does now Thanks for the feedback. So how do I get around this ubuntu multiarch garbage ? Were you able to get it to work on >11.04 ? standby Of course. Let me know how can I help. hmmm, I wonder if we shouldn't get our gcc to "understand" this multiarch include crap :/ I'll be happy to help here. Please let me know how ;-) Fabian, do you have any update on this? this still doesn't work?!? Unfortunately not. Have you been able to bootstrap on Ubuntu 11.* ? I have got a testing VPS from darkside to test bootstraping on Ubuntu. But did not carried out yet. I'll schedule a time to do it in the weekend. (In reply to comment #11) > I have got a testing VPS from darkside to test bootstraping on Ubuntu. But > did not carried out yet. I'll schedule a time to do it in the weekend. No, I killed that because no one logged in for weeks and it just cost me money. (In reply to comment #6) > hmmm, I wonder if we shouldn't get our gcc to "understand" this multiarch > include crap :/ This definitively would be necessary to support the Ubuntu multiarch-crap. However, I'd really wonder if this multiarch thing will ever make it to other distros at all (for Gentoo maybe via multilib-portage). Ahhh, so this patch should do, shouldn't it? Index: perl-5.12.4-r2.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-lang/perl/perl-5.12.4-r2.ebuild,v retrieving revision 1.1 diff -u -r1.1 perl-5.12.4-r2.ebuild --- perl-5.12.4-r2.ebuild 3 Mar 2012 12:29:38 -0000 1.1 +++ perl-5.12.4-r2.ebuild 11 Apr 2012 12:51:36 -0000 @@ -251,7 +251,7 @@ local paths="" echo "int main() {}" > "${T}"/t.c # need to ensure dirs contain compatible libs, bug #358875 - for ldir in /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do + for ldir in /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib/*-linux-gnu /usr/lib/*-linux/gnu /lib /usr/lib ; do [[ -d ${ldir} ]] || continue # look for libc, which should be somewhere llib=${ldir}/libc$(get_libname) cvs diff: Diffing files I still get the same issue: % grep "for ldir" ~/gentoo/usr/portage/dev-lang/perl/perl-5.12.4-r2.ebuild for ldir in /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib/*-linux-gnu /usr/lib/*-linux/gnu /lib /usr/lib ; do % ebuild ~/gentoo/usr/portage/dev-lang/perl/perl-5.12.4-r2.ebuild digest clean merge ... 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 miniperl \ 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_pow': pp.c:(.text+0x3330): undefined reference to `pow' ... can you please post the output of ls {,/usr}/lib/*-linux-gnu/libc.* % ls {,/usr}/lib/*-linux-gnu/libc.* /lib/x86_64-linux-gnu/libc.so.6 /usr/lib/x86_64-linux-gnu/libc.a /usr/lib/x86_64-linux-gnu/libc.so % ls {,/usr}/lib/*-linux-gnu/libm.* /lib/x86_64-linux-gnu/libm.so.6 /usr/lib/x86_64-linux-gnu/libm.a /usr/lib/x86_64-linux-gnu/libm.so Note that the following hack work around the "undefined reference to `pow' " issue: LDFLAGS=-lm ebuild ~/gentoo/usr/portage/dev-lang/perl/perl-5.12.4-r2.ebuild digest clean merge but then the following error occurs: ... make[1]: Leaving directory `/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/work/perl-5.12.4' !!! dolib: /mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/image/home/pinto/gentoo///usr/lib/perl5/5.12.4/x86_64-linux/CORE/libperl.so.5.12.4 does not exist * ERROR: dev-lang/perl-5.12.4-r2 failed (install phase): * dolib failed * * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.4-r2', * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.4-r2'. * The complete build log is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/temp/build.log'. * The ebuild environment file is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/temp/environment'. * S: '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/work/perl-5.12.4' * QA Notice: file does not exist: * * dolib: /mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/image/home/pinto/gentoo///usr/lib/perl5/5.12.4/x86_64-linux/CORE/libperl.so.5.12.4 does not exist * Messages for package dev-lang/perl-5.12.4-r2: * ERROR: dev-lang/perl-5.12.4-r2 failed (install phase): * dolib failed * * If you need support, post the output of 'emerge --info =dev-lang/perl-5.12.4-r2', * the complete build log and the output of 'emerge -pqv =dev-lang/perl-5.12.4-r2'. * The complete build log is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/temp/build.log'. * The ebuild environment file is located at '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/temp/environment'. * S: '/mnt/md1/home/pinto/gentoo/var/tmp/portage/dev-lang/perl-5.12.4-r2/work/perl-5.12.4' [1] 6703 exit 1 LDFLAGS=-lm ebuild ~/gentoo/usr/portage/dev-lang/perl/perl-5.12.4-r2.ebuild Hey Fabian, Is there anything else you think I should try to help fix this bug? Thanks again. N I'm out of ideas. Probably have to get myself a Ubuntu virtual machine to play with sometime. The following patch, derived from yours, worked! diff --git a/files/usr/local/portage/dev-lang/perl/perl-5.12.4-r2.ebuild b/files/usr/local/portage/dev-lang/perl/perl-5.12.4-r2.ebuild index 2b97965..4301020 100644 --- a/files/usr/local/portage/dev-lang/perl/perl-5.12.4-r2.ebuild +++ b/files/usr/local/portage/dev-lang/perl/perl-5.12.4-r2.ebuild @@ -251,7 +251,7 @@ src_configure() { local paths="" echo "int main() {}" > "${T}"/t.c # need to ensure dirs contain compatible libs, bug #358875 - for ldir in /lib64 /lib/64 /usr/lib64 /usr/lib/64 /lib32 /usr/lib32 /lib /usr/lib ; do + 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 # look for libc, which should be somewhere llib=${ldir}/libc$(get_libname) Note the order of the path, and the "gnu" typo fix. Any chance to get it into the tree? Thanks for your help! yup, committed now, thanks! Awesome! I also have a (hacky?) patch for binutils that helps with multiarch distros (e.g. Ubuntu 11.04+) --- ld/genscripts.sh.orig 2012-07-08 12:13:31.405770577 -0400 +++ ld/genscripts.sh 2012-07-07 19:57:39.285777628 -0400 @@ -241,7 +241,8 @@ fi fi -LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");SEARCH_DIR(\\"\1\\/'${TOOL_LIB}'");/g'` +SYSTEM_SEARCH_DIRS=`/usr/bin/ld -verbose | grep SEARCH_DIR` +LIB_SEARCH_DIRS=`echo ${LIB_PATH} | sed -e 's/:/ /g' -e 's/\([^ ][^ ]*\)/SEARCH_DIR(\\"\1\\");SEARCH_DIR(\\"\1\\/'${TOOL_LIB}'");/g'`${SYSTEM_SEARCH_DIRS} # We need it for testsuite. set $EMULATION_LIBPATH So now Prefix works seamlessly there too! |