Bug 2523

Summary: poky-tiny build fails due to perl build failure
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: coreAssignee: Bogdan Marinescu <bogdan.a.marinescu>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: High CC: bogdan.a.marinescu, dvhart, laurentiu.serban, meta.mr.watcher, meta.watcher, nitin.a.kamble, scott.a.garman, sgw, song.liu
Version: 1.3   
Target Milestone: 1.3 M2   
Hardware: x86   
OS: Multiple   
Whiteboard: (P1)(scheduled)
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Bug Depends on:    
Bug Blocks: 2374    

Description Paul Eggleton 2012-05-30 18:29:21 UTC
poky-tiny core-image-minimal fails due to perl do_compile failing:

http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/63/steps/shell_35/logs/stdio
Comment 1 Darren Hart 2012-06-08 16:16:29 UTC
The relevant bit from the log:

| make[1]: *** [miniperl] Error 1
| make[1]: Leaving directory `/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-tiny/build/build/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2'
| make[1]: Entering directory `/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-tiny/build/build/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2'
| /bin/ln -s perldelta.pod pod/perl5142delta.pod
| ./miniperl -Ilib autodoc.pl
| make[1]: ./miniperl: Command not found
| make[1]: *** [pod/perlintern.pod] Error 127
| make[1]: Leaving directory `/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-tiny/build/build/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2'
| make: *** [perl] Error 2
| ERRO
NOTE: package perl-5.14.2-r6: task do_compile: Failed

What is miniperl?

Can someone with more experience with the perl recipes have a look at this? Nitin?
Comment 2 Darren Hart 2012-06-08 19:24:32 UTC
The following patch from May 15th:

commit 76e1d4a7ac18478bb0cbb852f4a844b5e6793c0c
Author: Nitin A Kamble <nitin.a.kamble@intel.com>
Date:   Tue May 15 09:31:32 2012 -0700

    eglibc: package mtrace separately


introduced a new eglibc-mtrace package which depends on perl. For some reason this adds perl as a dependency for eglibc according to:

bitbake -u depexp -g core-image-minimal

Reverting this patch allows the poky-tiny core-image-minimal image to build as it no longer attempts to build perl. Perl should not be part of poky-tiny.

I'm not sure what the right fix is, I surprised to see the perl dependency pulled in as eglibc-mtrace is not being built.
Comment 3 Nitin Kamble 2012-06-08 20:56:27 UTC
The problem is gcvt function is not found in libc.


| i586-poky-linux-gcc  -m32   -march=i586 --sysroot=/srv/home/nitin/builds/build-poky-tiny/tmp/sysroots/qemux86 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -o miniperl \
|       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 numeric.o mathoms.o locale.o pp_pack.o pp_sort.o   \
|     miniperlmain.o opmini.o perlmini.o -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
| sv.o: In function `Perl_sv_2pv_flags':
| /srv/home/nitin/builds/build-poky-tiny/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2/sv.c:2951: undefined reference to `gcvt'
| /srv/home/nitin/builds/build-poky-tiny/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2/sv.c:2762: undefined reference to `gcvt'
| sv.o: In function `Perl_sv_vcatpvfn':
| /srv/home/nitin/builds/build-poky-tiny/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2/sv.c:10052: undefined reference to `gcvt'
| /srv/home/nitin/builds/build-poky-tiny/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2/sv.c:10890: undefined reference to `gcvt'
| locale.o: In function `Perl_set_numeric_radix':
| /srv/home/nitin/builds/build-poky-tiny/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2/locale.c:90: undefined reference to `localeconv'
| locale.o: In function `Perl_init_i18nl10n':
| /srv/home/nitin/builds/build-poky-tiny/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2/locale.c:526: undefined reference to `nl_langinfo'
| collect2: error: ld returned 1 exit status
| make[1]: *** [miniperl] Error 1
| make[1]: Leaving directory `/srv/home/nitin/builds/build-poky-tiny/tmp/work/i586-poky-linux/perl-5.14.2-r6/perl-5.14.2'
Comment 4 Darren Hart 2012-06-08 21:12:59 UTC
That is why it doesn't build, but that isn't the problem. The poky-tiny glibc didn't have that before either. We do not want perl to be included in core-image-minimal when building for poky-tiny.

So what we need to identify is what about commit 76e1d4a7ac18478bb0cbb852f4a844b5e6793c0c forces perl to get built when eglibc-mtrace is not being built. Is it just the fact that perl was added to the package dependency which is in turn brought into the dependencies for the recipe? If so, is the answer a separate the recipe for mtrace so it's dependencies don't taint eglibc?
Comment 6 Nitin Kamble 2012-06-13 14:46:16 UTC
Bogdan, 
Saul is aware of the context of this bug. So work with him to finish this bug.
Comment 7 Saul Wold 2012-06-13 16:51:42 UTC
RP's suggested fix of overriding the RDEPENDS for poky-tiny works

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=1a9ad7f4d72488c9aefe0c6521bac26eddbd4416