Bug 829

Summary: perl @INC error when using sstate cache
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Kevin Tian <kevin.tian>
Component: devtools / tool chainAssignee: Wenzong.Fan <wenzong.fan>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: Medium CC: liang.li2, liangliang.wang, meta.mr.watcher, meta.watcher, sgw, yi.zhao
Version: 1.0   
Target Milestone: 1.1   
Hardware: x86   
OS: Multiple   
Whiteboard: Can't be reproduced, will check it again by Aug 12
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Kevin Tian 2011-03-09 00:06:45 UTC
at least observed when building sgmlspl and git:

| Can't locate ExtUtils/Command.pm in @INC (@INC contains: /media/builds/master/demo-qemux86-0223/tmp/sysroots/x86_64-linux/usr/lib/perl/5.12.2 /media/builds/master/demo-qemux86-0223/tmp/sysroots/x86_64-linux/usr/lib/perl/5.12.2 /media/builds/master/demo-qemux86-0223/tmp/sysroots/x86_64-linux/usr/lib/perl/5.12.2 .).

This happens to the packages which use MakeMaker.pm to generate their Makefiles, which then extract perl binary to perl.real instead of perl wrapper:

PERL = /media/builds-0/demo-0309/tmp/sysroots/x86_64-linux/usr/bin/perl.real
FULLPERL = /media/builds-0/demo-0309/tmp/sysroots/x86_64-linux/usr/bin/perl.real

I'm not familiar with perl, especially the MakeMaker.pm here. It's interesting how it extracts the perl.real instead of perl wrapper, which obviously breaks our sstate usage here.
Comment 1 Kevin Tian 2011-03-09 21:11:05 UTC
so does target perl itself.

btw, Nitin, when you look at this issue, make sure that the original build directory which generates sstate packages are removed or renamed. This is the way to expose this issue.
Comment 2 Nitin Kamble 2011-04-27 12:17:44 UTC
Kevin,
 Can you give me steps to reproduce this bug?
Thanks,
nitin
Comment 3 Kevin Tian 2011-04-28 17:48:12 UTC
a) make a full build in DIR1, and direct sstate output to SSTATE_DIR
b) remove or rename DIR1 to make sure old path not referenced any more
c) make a new build in DIR2, with sstate mirror pointing to earlier SSTATE_DIR

then you should be able to observe reported failures. the first thing you may want to figure out is why perl.real is used by MakeMaker.pm, when the wrapper perl script is expected which provides the necessary parameter to use @INC under DIR2. Because perl.real is used which is compiled from DIR1 and thus has inherit knowledge to set @INC to DIR1, the error occurs since DIR1 has been deleted.
Comment 4 Wenzong.Fan 2011-08-20 01:56:15 UTC
This bug duplicate with 1157 which has been fixed.

*** This bug has been marked as a duplicate of bug 1157 ***