Patchwork [v2] perl: Allow perl to cross build and native build in a directory named "t"

login
register
mail settings
Submitter Jason Wessel
Date June 4, 2012, 6:47 p.m.
Message ID <1338835664-27699-1-git-send-email-jason.wessel@windriver.com>
Download mbox | patch
Permalink /patch/29203/
State Accepted
Commit f8a054aca9962ebfd4c74fc1d34cd684de6b3568
Headers show

Comments

Jason Wessel - June 4, 2012, 6:47 p.m.
If any directory in leading up to your tmp directory has the name "t"
perl will fail to build with a very cryptic error shown below:

pod/buildtoc: no pods at pod/buildtoc line 305.
make[1]: *** [pod/perltoc.pod] Error 255

This is a result of the perl file checking making an assumption
that it is only looking at files and directories with in the perl
source directory.  This assumption fails with the way bitbake
sets up perl to properly cross compile.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 .../perl/perl-5.14.2/perl-build-in-t-dir.patch     |   42 ++++++++++++++++++++
 meta/recipes-devtools/perl/perl-native_5.14.2.bb   |    5 ++-
 meta/recipes-devtools/perl/perl_5.14.2.bb          |    3 +-
 3 files changed, 47 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
Elizabeth Flanagan - June 5, 2012, 8:25 p.m.
On Mon, Jun 4, 2012 at 11:47 AM, Jason Wessel
<jason.wessel@windriver.com> wrote:
> If any directory in leading up to your tmp directory has the name "t"
> perl will fail to build with a very cryptic error shown below:


Jason,

I'm currently testing this patch and it seems to be causing failures
during do_compile for poky-tiny

http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/71/steps/shell_35/logs/stdio

| /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-r7/perl-5.14.2'
| make: *** [perl] Error 2
| ERROR: oe_runmake failed

-b

>
> pod/buildtoc: no pods at pod/buildtoc line 305.
> make[1]: *** [pod/perltoc.pod] Error 255
>
> This is a result of the perl file checking making an assumption
> that it is only looking at files and directories with in the perl
> source directory.  This assumption fails with the way bitbake
> sets up perl to properly cross compile.
>
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
>  .../perl/perl-5.14.2/perl-build-in-t-dir.patch     |   42 ++++++++++++++++++++
>  meta/recipes-devtools/perl/perl-native_5.14.2.bb   |    5 ++-
>  meta/recipes-devtools/perl/perl_5.14.2.bb          |    3 +-
>  3 files changed, 47 insertions(+), 3 deletions(-)
>  create mode 100644 meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
>
> diff --git a/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
> new file mode 100644
> index 0000000..16064ed
> --- /dev/null
> +++ b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
> @@ -0,0 +1,42 @@
> +Upstream-Status:Pending
> +
> +Perl cannot cross build in a path containing a directory that has the
> +name of "t".  As an example, you can make the perl build fail with
> +"mkdir -p /tmp/build/t", go to the directory, unpack the sources,
> +configure and cross build.
> +
> +You get an error like the following:
> +    pod/buildtoc: no pods at pod/buildtoc line 305.
> +    make[1]: *** [pod/perltoc.pod] Error 255
> +
> +The fix is to strip off the top directory that you are building in and
> +then execute all the same logic as before against the path relative to
> +the build directory.
> +
> +Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> +---
> + pod/buildtoc |    4 +++-
> + 1 file changed, 3 insertions(+), 1 deletion(-)
> +
> +--- a/pod/buildtoc
> ++++ b/pod/buildtoc
> +@@ -274,8 +274,10 @@ if ($Build{toc}) {
> +   find \&getpods => abs_from_top('lib/');
> +
> +   sub getpods {
> ++    my $Top = $FindBin::Bin;
> +     if (/\.p(od|m)$/) {
> +       my $file = $File::Find::name;
> ++      $file =~ s!^$Top!!;
> +       return if $file =~ qr!/lib/Pod/Functions.pm\z!; # Used only by pod itself
> +       return if $file =~ m!(?:^|/)t/!;
> +       return if $file =~ m!lib/Attribute/Handlers/demo/!;
> +@@ -283,7 +285,7 @@ if ($Build{toc}) {
> +       return if $file =~ m!lib/Math/BigInt/t/!;
> +       return if $file =~ m!/Devel/PPPort/[Hh]arness|lib/Devel/Harness!i;
> +       return if $file =~ m!XS/(?:APItest|Typemap)!;
> +-      my $pod = $file;
> ++      my $pod = $file = $File::Find::name;
> +       return if $pod =~ s/pm$/pod/ && -e $pod;
> +       unless (open my $f, '<', $_) {
> +       warn "$0: bogus <$file>: $!";
> diff --git a/meta/recipes-devtools/perl/perl-native_5.14.2.bb b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
> index c904c37..df8f058 100644
> --- a/meta/recipes-devtools/perl/perl-native_5.14.2.bb
> +++ b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
> @@ -4,7 +4,7 @@ SECTION = "libs"
>  LICENSE = "Artistic-1.0 | GPL-1.0"
>  LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
>                    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
> -PR = "r0"
> +PR = "r1"
>
>  LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
>                     file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
> @@ -14,7 +14,8 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
>            file://perl-configpm-switch.patch \
>            file://native-nopacklist.patch \
>            file://native-perlinc.patch \
> -           file://MM_Unix.pm.patch"
> +           file://MM_Unix.pm.patch \
> +           file://perl-build-in-t-dir.patch"
>
>  SRC_URI[md5sum] = "3306fbaf976dcebdcd49b2ac0be00eb9"
>  SRC_URI[sha256sum] = "6488359573bd7d41761bf935f66f827dc220fb3df961ef9b775d51fbd66548d3"
> diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
> index 809fc72..2452a44 100644
> --- a/meta/recipes-devtools/perl/perl_5.14.2.bb
> +++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
> @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
>  # We need gnugrep (for -I)
>  DEPENDS = "virtual/db grep-native"
>  DEPENDS += "gdbm zlib"
> -PR = "r6"
> +PR = "r7"
>
>  # 5.10.1 has Module::Build built-in
>  PROVIDES += "libmodule-build-perl"
> @@ -65,6 +65,7 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
>         file://perl-enable-gdbm.patch \
>         file://cross-generate_uudmap.patch \
>        file://fix_bad_rpath.patch \
> +       file://perl-build-in-t-dir.patch \
>        \
>         file://config.sh \
>         file://config.sh-32 \
> --
> 1.7.10
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Darren Hart - June 5, 2012, 8:51 p.m.
On 06/05/2012 01:25 PM, Flanagan, Elizabeth wrote:
> On Mon, Jun 4, 2012 at 11:47 AM, Jason Wessel
> <jason.wessel@windriver.com> wrote:
>> If any directory in leading up to your tmp directory has the name "t"
>> perl will fail to build with a very cryptic error shown below:
> 
> 
> Jason,
> 
> I'm currently testing this patch and it seems to be causing failures
> during do_compile for poky-tiny

Which image are you trying to build with DISTRO="poky-tiny" ?

> 
> http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/71/steps/shell_35/logs/stdio
> 
> | /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-r7/perl-5.14.2'
> | make: *** [perl] Error 2
> | ERROR: oe_runmake failed
> 
> -b
> 
>>
>> pod/buildtoc: no pods at pod/buildtoc line 305.
>> make[1]: *** [pod/perltoc.pod] Error 255
>>
>> This is a result of the perl file checking making an assumption
>> that it is only looking at files and directories with in the perl
>> source directory.  This assumption fails with the way bitbake
>> sets up perl to properly cross compile.
>>
>> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
>> ---
>>  .../perl/perl-5.14.2/perl-build-in-t-dir.patch     |   42 ++++++++++++++++++++
>>  meta/recipes-devtools/perl/perl-native_5.14.2.bb   |    5 ++-
>>  meta/recipes-devtools/perl/perl_5.14.2.bb          |    3 +-
>>  3 files changed, 47 insertions(+), 3 deletions(-)
>>  create mode 100644 meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
>>
>> diff --git a/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
>> new file mode 100644
>> index 0000000..16064ed
>> --- /dev/null
>> +++ b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
>> @@ -0,0 +1,42 @@
>> +Upstream-Status:Pending
>> +
>> +Perl cannot cross build in a path containing a directory that has the
>> +name of "t".  As an example, you can make the perl build fail with
>> +"mkdir -p /tmp/build/t", go to the directory, unpack the sources,
>> +configure and cross build.
>> +
>> +You get an error like the following:
>> +    pod/buildtoc: no pods at pod/buildtoc line 305.
>> +    make[1]: *** [pod/perltoc.pod] Error 255
>> +
>> +The fix is to strip off the top directory that you are building in and
>> +then execute all the same logic as before against the path relative to
>> +the build directory.
>> +
>> +Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
>> +---
>> + pod/buildtoc |    4 +++-
>> + 1 file changed, 3 insertions(+), 1 deletion(-)
>> +
>> +--- a/pod/buildtoc
>> ++++ b/pod/buildtoc
>> +@@ -274,8 +274,10 @@ if ($Build{toc}) {
>> +   find \&getpods => abs_from_top('lib/');
>> +
>> +   sub getpods {
>> ++    my $Top = $FindBin::Bin;
>> +     if (/\.p(od|m)$/) {
>> +       my $file = $File::Find::name;
>> ++      $file =~ s!^$Top!!;
>> +       return if $file =~ qr!/lib/Pod/Functions.pm\z!; # Used only by pod itself
>> +       return if $file =~ m!(?:^|/)t/!;
>> +       return if $file =~ m!lib/Attribute/Handlers/demo/!;
>> +@@ -283,7 +285,7 @@ if ($Build{toc}) {
>> +       return if $file =~ m!lib/Math/BigInt/t/!;
>> +       return if $file =~ m!/Devel/PPPort/[Hh]arness|lib/Devel/Harness!i;
>> +       return if $file =~ m!XS/(?:APItest|Typemap)!;
>> +-      my $pod = $file;
>> ++      my $pod = $file = $File::Find::name;
>> +       return if $pod =~ s/pm$/pod/ && -e $pod;
>> +       unless (open my $f, '<', $_) {
>> +       warn "$0: bogus <$file>: $!";
>> diff --git a/meta/recipes-devtools/perl/perl-native_5.14.2.bb b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
>> index c904c37..df8f058 100644
>> --- a/meta/recipes-devtools/perl/perl-native_5.14.2.bb
>> +++ b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
>> @@ -4,7 +4,7 @@ SECTION = "libs"
>>  LICENSE = "Artistic-1.0 | GPL-1.0"
>>  LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
>>                    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
>> -PR = "r0"
>> +PR = "r1"
>>
>>  LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
>>                     file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
>> @@ -14,7 +14,8 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
>>            file://perl-configpm-switch.patch \
>>            file://native-nopacklist.patch \
>>            file://native-perlinc.patch \
>> -           file://MM_Unix.pm.patch"
>> +           file://MM_Unix.pm.patch \
>> +           file://perl-build-in-t-dir.patch"
>>
>>  SRC_URI[md5sum] = "3306fbaf976dcebdcd49b2ac0be00eb9"
>>  SRC_URI[sha256sum] = "6488359573bd7d41761bf935f66f827dc220fb3df961ef9b775d51fbd66548d3"
>> diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
>> index 809fc72..2452a44 100644
>> --- a/meta/recipes-devtools/perl/perl_5.14.2.bb
>> +++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
>> @@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
>>  # We need gnugrep (for -I)
>>  DEPENDS = "virtual/db grep-native"
>>  DEPENDS += "gdbm zlib"
>> -PR = "r6"
>> +PR = "r7"
>>
>>  # 5.10.1 has Module::Build built-in
>>  PROVIDES += "libmodule-build-perl"
>> @@ -65,6 +65,7 @@ SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
>>         file://perl-enable-gdbm.patch \
>>         file://cross-generate_uudmap.patch \
>>        file://fix_bad_rpath.patch \
>> +       file://perl-build-in-t-dir.patch \
>>        \
>>         file://config.sh \
>>         file://config.sh-32 \
>> --
>> 1.7.10
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> 
>
Jason Wessel - June 5, 2012, 8:58 p.m.
On 06/05/2012 03:25 PM, Flanagan, Elizabeth wrote:
> On Mon, Jun 4, 2012 at 11:47 AM, Jason Wessel
> <jason.wessel@windriver.com> wrote:
>> If any directory in leading up to your tmp directory has the name "t"
>> perl will fail to build with a very cryptic error shown below:
> 
> 
> Jason,
> 
> I'm currently testing this patch and it seems to be causing failures
> during do_compile for poky-tiny
> 
> http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/71/steps/shell_35/logs/stdio
> 
> | /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-r7/perl-5.14.2'
> | make: *** [perl] Error 2
> | ERROR: oe_runmake failed


Did this work before the patch was applied?

If miniperl cannot be found it usually indicates some other kind of other perl configuration problem.

How do you setup poky-tiny?  The http URL you pointed me to doesn't have the local.conf in it.  Or is it the case you set those environment variables and then try to execute a build?

Thanks,
Jason.
Darren Hart - June 5, 2012, 9:03 p.m.
On 06/05/2012 01:58 PM, Jason Wessel wrote:
> On 06/05/2012 03:25 PM, Flanagan, Elizabeth wrote:
>> On Mon, Jun 4, 2012 at 11:47 AM, Jason Wessel 
>> <jason.wessel@windriver.com> wrote:
>>> If any directory in leading up to your tmp directory has the name
>>> "t" perl will fail to build with a very cryptic error shown
>>> below:
>> 
>> 
>> Jason,
>> 
>> I'm currently testing this patch and it seems to be causing
>> failures during do_compile for poky-tiny
>> 
>> http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/71/steps/shell_35/logs/stdio
>>
>>
>> 
| /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-r7/perl-5.14.2'
>>
>> 
| make: *** [perl] Error 2
>> | ERROR: oe_runmake failed
> 
> 
> Did this work before the patch was applied?
> 
> If miniperl cannot be found it usually indicates some other kind of
> other perl configuration problem.
> 
> How do you setup poky-tiny?  The http URL you pointed me to doesn't
> have the local.conf in it.  Or is it the case you set those
> environment variables and then try to execute a build?


Just set DISTRO="poky-tiny" and run "bitbake core-image-minimal". Be
sure to run with a new tmp directory from other builds.
Elizabeth Flanagan - June 5, 2012, 9:13 p.m.
On Tue, Jun 5, 2012 at 1:58 PM, Jason Wessel <jason.wessel@windriver.com> wrote:
> On 06/05/2012 03:25 PM, Flanagan, Elizabeth wrote:
>> On Mon, Jun 4, 2012 at 11:47 AM, Jason Wessel
>> <jason.wessel@windriver.com> wrote:
>>> If any directory in leading up to your tmp directory has the name "t"
>>> perl will fail to build with a very cryptic error shown below:
>>
>>
>> Jason,
>>
>> I'm currently testing this patch and it seems to be causing failures
>> during do_compile for poky-tiny
>>
>> http://autobuilder.yoctoproject.org:8010/builders/nightly-tiny/builds/71/steps/shell_35/logs/stdio
>>
>> | /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-r7/perl-5.14.2'
>> | make: *** [perl] Error 2
>> | ERROR: oe_runmake failed
>
>
> Did this work before the patch was applied?
>

Ah, my mistake. This is actually an issue in master.

> If miniperl cannot be found it usually indicates some other kind of other perl configuration problem.
>
> How do you setup poky-tiny?  The http URL you pointed me to doesn't have the local.conf in it.  Or is it the case you set those environment variables and then try to execute a build?
>
> Thanks,
> Jason.
Richard Purdie - June 5, 2012, 10:05 p.m.
On Mon, 2012-06-04 at 13:47 -0500, Jason Wessel wrote:
> If any directory in leading up to your tmp directory has the name "t"
> perl will fail to build with a very cryptic error shown below:
> 
> pod/buildtoc: no pods at pod/buildtoc line 305.
> make[1]: *** [pod/perltoc.pod] Error 255
> 
> This is a result of the perl file checking making an assumption
> that it is only looking at files and directories with in the perl
> source directory.  This assumption fails with the way bitbake
> sets up perl to properly cross compile.
> 
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
>  .../perl/perl-5.14.2/perl-build-in-t-dir.patch     |   42 ++++++++++++++++++++
>  meta/recipes-devtools/perl/perl-native_5.14.2.bb   |    5 ++-
>  meta/recipes-devtools/perl/perl_5.14.2.bb          |    3 +-
>  3 files changed, 47 insertions(+), 3 deletions(-)
>  create mode 100644 meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch

Merged to master, thanks.

Richard

Patch

diff --git a/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
new file mode 100644
index 0000000..16064ed
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.14.2/perl-build-in-t-dir.patch
@@ -0,0 +1,42 @@ 
+Upstream-Status:Pending
+
+Perl cannot cross build in a path containing a directory that has the
+name of "t".  As an example, you can make the perl build fail with
+"mkdir -p /tmp/build/t", go to the directory, unpack the sources,
+configure and cross build.
+
+You get an error like the following:
+    pod/buildtoc: no pods at pod/buildtoc line 305.
+    make[1]: *** [pod/perltoc.pod] Error 255
+
+The fix is to strip off the top directory that you are building in and
+then execute all the same logic as before against the path relative to
+the build directory.
+
+Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
+---
+ pod/buildtoc |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/pod/buildtoc
++++ b/pod/buildtoc
+@@ -274,8 +274,10 @@ if ($Build{toc}) {
+   find \&getpods => abs_from_top('lib/');
+ 
+   sub getpods {
++    my $Top = $FindBin::Bin;
+     if (/\.p(od|m)$/) {
+       my $file = $File::Find::name;
++      $file =~ s!^$Top!!;
+       return if $file =~ qr!/lib/Pod/Functions.pm\z!; # Used only by pod itself
+       return if $file =~ m!(?:^|/)t/!;
+       return if $file =~ m!lib/Attribute/Handlers/demo/!;
+@@ -283,7 +285,7 @@ if ($Build{toc}) {
+       return if $file =~ m!lib/Math/BigInt/t/!;
+       return if $file =~ m!/Devel/PPPort/[Hh]arness|lib/Devel/Harness!i;
+       return if $file =~ m!XS/(?:APItest|Typemap)!;
+-      my $pod = $file;
++      my $pod = $file = $File::Find::name;
+       return if $pod =~ s/pm$/pod/ && -e $pod;
+       unless (open my $f, '<', $_) {
+ 	warn "$0: bogus <$file>: $!";
diff --git a/meta/recipes-devtools/perl/perl-native_5.14.2.bb b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
index c904c37..df8f058 100644
--- a/meta/recipes-devtools/perl/perl-native_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl-native_5.14.2.bb
@@ -4,7 +4,7 @@  SECTION = "libs"
 LICENSE = "Artistic-1.0 | GPL-1.0"
 LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
 		    file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
-PR = "r0"
+PR = "r1"
 
 LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
                     file://Artistic;md5=f921793d03cc6d63ec4b15e9be8fd3f8"
@@ -14,7 +14,8 @@  SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
            file://perl-configpm-switch.patch \
            file://native-nopacklist.patch \
            file://native-perlinc.patch \
-           file://MM_Unix.pm.patch"
+           file://MM_Unix.pm.patch \
+           file://perl-build-in-t-dir.patch"
 
 SRC_URI[md5sum] = "3306fbaf976dcebdcd49b2ac0be00eb9"
 SRC_URI[sha256sum] = "6488359573bd7d41761bf935f66f827dc220fb3df961ef9b775d51fbd66548d3"
diff --git a/meta/recipes-devtools/perl/perl_5.14.2.bb b/meta/recipes-devtools/perl/perl_5.14.2.bb
index 809fc72..2452a44 100644
--- a/meta/recipes-devtools/perl/perl_5.14.2.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.2.bb
@@ -7,7 +7,7 @@  LIC_FILES_CHKSUM = "file://Copying;md5=2b4c6ffbcfcbdee469f02565f253d81a \
 # We need gnugrep (for -I)
 DEPENDS = "virtual/db grep-native"
 DEPENDS += "gdbm zlib"
-PR = "r6"
+PR = "r7"
 
 # 5.10.1 has Module::Build built-in
 PROVIDES += "libmodule-build-perl"
@@ -65,6 +65,7 @@  SRC_URI = "http://www.cpan.org/src/5.0/perl-${PV}.tar.gz \
         file://perl-enable-gdbm.patch \
         file://cross-generate_uudmap.patch \
 	file://fix_bad_rpath.patch \
+	file://perl-build-in-t-dir.patch \
 	\
         file://config.sh \
         file://config.sh-32 \