[oe-commits] Robert Yang : perl-native: fixed bad interpreter error
git at git.openembedded.org
git at git.openembedded.org
Thu Aug 28 06:15:12 UTC 2014
Module: openembedded-core.git
Branch: master-next
Commit: a5eef1579436809747c8dd9d50be83788255bc27
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=a5eef1579436809747c8dd9d50be83788255bc27
Author: Robert Yang <liezhi.yang at windriver.com>
Date: Wed Aug 27 22:40:05 2014 -0700
perl-native: fixed bad interpreter error
We may get the error on some hosts when build in deeper dir:
/bin/sh: /path/to/tmp/sysroots/i686-linux/usr/bin/perl-native/pod2man: /path/to/tmp/sysroots/i686-li:
bad interpreter: No such file or directory
Note the "i686-li", it should be "i686-linux", but is truncated by the
host.
We can use "/usr/bin/env nativeperl" as we have done in cpan.bbclass for
other recipe's perl script to fix the problem.
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/recipes-devtools/perl/perl-native_5.20.0.bb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta/recipes-devtools/perl/perl-native_5.20.0.bb b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
index 4364d41..069696a 100644
--- a/meta/recipes-devtools/perl/perl-native_5.20.0.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.20.0.bb
@@ -105,6 +105,11 @@ do_install () {
create_wrapper ${D}${bindir}/perl PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
create_wrapper ${D}${bindir}/perl${PV} PERL5LIB='$PERL5LIB:${STAGING_LIBDIR}/perl/${PV}:${STAGING_LIBDIR}/perl/'
+
+ # Use /usr/bin/env nativeperl for the perl script.
+ for f in `grep -Il '#! *${bindir}/perl' ${D}/${bindir}/*`; do
+ sed -i -e 's|${bindir}/perl|/usr/bin/env nativeperl|' $f
+ done
}
SYSROOT_PREPROCESS_FUNCS += "perl_sysroot_create_wrapper"
More information about the Openembedded-commits
mailing list