On Ubuntu 11.04 and 11.10 64 bit: dev-lang/perl-5.12.3-r1 fails to bootstrap with the following errors: gcc -L/root/gentoo/usr/lib -Wl,-rpath=/root/gentoo/usr/lib -L/root/gentoo/lib -Wl,-rpath=/root/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+0x30a9): undefined reference to `pow' pp.o: In function `Perl_pp_modulo': pp.c:(.text+0x3e03): undefined reference to `floor' pp.c:(.text+0x3e37): undefined reference to `floor' pp.c:(.text+0x41c0): undefined reference to `fmod' pp.o: In function `Perl_pp_atan2': pp.c:(.text+0x8ebf): undefined reference to `atan2' pp.o: In function `Perl_pp_sin': pp.c:(.text+0x9062): undefined reference to `sin' pp.o: In function `Perl_pp_int': pp.c:(.text+0x9501): undefined reference to `floor' pp.c:(.text+0x9521): undefined reference to `ceil' pp.o:(.rodata+0x280): undefined reference to `cos' pp.o:(.rodata+0x288): undefined reference to `sin' pp.o:(.rodata+0x290): undefined reference to `sin' pp.o:(.rodata+0x298): undefined reference to `exp' pp.o:(.rodata+0x2a0): undefined reference to `log' pp.o:(.rodata+0x2a8): undefined reference to `sqrt' pp_sys.o: In function `S_gmtime64_r.isra.3': pp_sys.c:(.text+0x1c5): undefined reference to `ceil' pp_sys.c:(.text+0x21e): undefined reference to `ceil' pp_sys.c:(.text+0x279): undefined reference to `ceil' pp_sys.c:(.text+0x32e): undefined reference to `floor' pp_sys.c:(.text+0x4bf): undefined reference to `ceil' pp_sys.c:(.text+0x5f1): undefined reference to `floor' pp_sys.c:(.text+0x639): undefined reference to `floor' pp_sys.c:(.text+0x651): undefined reference to `floor' pp_sys.c:(.text+0x6b4): undefined reference to `fmod' pp_sys.c:(.text+0x6e0): undefined reference to `fmod' pp_sys.c:(.text+0x704): undefined reference to `fmod' pp_sys.c:(.text+0x72e): undefined reference to `fmod' pp_sys.o: In function `Perl_pp_gmtime': pp_sys.c:(.text+0xcc48): undefined reference to `floor' pp_pack.o: In function `S_pack_rec': pp_pack.c:(.text+0x34a7): undefined reference to `floor' pp_pack.c:(.text+0x34c9): undefined reference to `floor' pp_pack.c:(.text+0x34f2): undefined reference to `floor' collect2: ld returned 1 exit status make[1]: *** [miniperl] Error 1 There seems to be a bad interaction with the new gcc in Ubuntu/Debian gcc --version gcc (Ubuntu/Linaro 4.6.1-9ubuntu3) 4.6.1 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. LDFLAGS="-lm" can help solve part of the issue but there must be a better way. Other report from another user: https://gist.github.com/1379063 Any pointer on how to approach this type of issue? I have not been able to bootstrap *any* prefix on recent Ubuntu distros (>11.04).
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!