Commit ede1ed24 authored by Killian Lufau's avatar Killian Lufau Committed by Thomas Gambier

perl: disable build-time probing

Building perl on chrome OS crashes because of probing,
during which LD_LIBRARY_PATH is overwritten.
Instead of fixing this bug we can just use this patch created for
another reason but that removes probing:
https://sources.debian.org/src/perl/5.28.1-6/debian/patches/fixes/storable-probing/

There is a test result for this, even if it fails for erp5 and seleniumserver, it feels like it's unrelated to this change: 
https://nexedijs.erp5.net/#/test_result_module/20190423-28D5C67E?uid=2020442141

/cc @tomo @kazuhiko @jm

/reviewed-on nexedi/slapos!551
parent 19dd166e
From b2cb17719c9233fbc9040ced04418be051c91c14 Mon Sep 17 00:00:00 2001
From: Sawyer X <xsawyerx@cpan.org>
Date: Fri, 27 Apr 2018 20:35:42 +0300
Subject: Storable: fix for strawberry build failures:
Provided by Graham @haarg Knop.
Origin: upstream, https://perl5.git.perl.org/perl.git/commit/3f4cad1bbe7c6238adba5abb2415775a74eded4d
Patch-Name: fixes/storable-probing/prereq1.diff
---
dist/Storable/Makefile.PL | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL
index 697750566..4f0213277 100644
--- a/dist/Storable/Makefile.PL
+++ b/dist/Storable/Makefile.PL
@@ -14,10 +14,12 @@ use File::Spec;
unlink "lib/Storable/Limit.pm";
+my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm');
+
my $pm = { 'Storable.pm' => '$(INST_ARCHLIB)/Storable.pm' };
unless ($ENV{PERL_CORE}) {
# the core Makefile takes care of this for core builds
- $pm->{"lib/Storable/Limit.pm"} = '$(INST_ARCHLIB)/Storable/Limit.pm';
+ $pm->{$limit_pm} = '$(INST_ARCHLIB)/Storable/Limit.pm';
}
WriteMakefile(
@@ -91,7 +93,6 @@ sub depend {
$extra_deps = ' Storable.pm';
}
my $linktype = uc($_[0]->{LINKTYPE});
- my $limit_pm = File::Spec->catfile('lib', 'Storable', 'Limit.pm');
"
$limit_pm : stacksize \$(INST_$linktype)$extra_deps
\$(MKPATH) \$(INST_LIB)
@@ -111,7 +112,7 @@ sub test {
my $out = $self->SUPER::test(%attr);
if ($ENV{PERL_CORE}) {
- $out =~ s!^(test(?:db)?_(?:static|dynamic)\b.*)!$1 lib/Storable/Limit.pm!gm;
+ $out =~ s!^(test(?:db)?_(?:static|dynamic)\b.*)!$1 $limit_pm!gm;
}
$out;
From cece912f1d5e5e80dc8d64364b0ddc4bf729bd85 Mon Sep 17 00:00:00 2001
From: Tony Cook <tony@develop-help.com>
Date: Mon, 30 Jul 2018 21:00:52 +1000
Subject: (perl #133411) don't try to load Storable with -Dusecrosscompile
Origin: https://perl5.git.perl.org/perl.git/commit/edf639fce3e8c8852ee4179ab902b357b1deba98
Bug: https://rt.perl.org/Public/Bug/Display.html?id=133411
Patch-Name: fixes/storable-probing/prereq2.diff
---
dist/Storable/Makefile.PL | 9 ++++++++-
dist/Storable/stacksize | 10 +++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/dist/Storable/Makefile.PL b/dist/Storable/Makefile.PL
index 4f0213277..69efc8294 100644
--- a/dist/Storable/Makefile.PL
+++ b/dist/Storable/Makefile.PL
@@ -92,11 +92,18 @@ sub depend {
# blib.pm needs arch/lib
$extra_deps = ' Storable.pm';
}
+ my $whichperl;
+ if ($Config::Config{usecrosscompile}) {
+ $whichperl = '$(PERLRUN)';
+ }
+ else {
+ $whichperl = '$(FULLPERLRUNINST)';
+ }
my $linktype = uc($_[0]->{LINKTYPE});
"
$limit_pm : stacksize \$(INST_$linktype)$extra_deps
\$(MKPATH) \$(INST_LIB)
- \$(FULLPERLRUNINST) stacksize $options
+ $whichperl stacksize $options
release : dist
git tag \$(VERSION)
diff --git a/dist/Storable/stacksize b/dist/Storable/stacksize
index 7abd3a84c..14e073973 100644
--- a/dist/Storable/stacksize
+++ b/dist/Storable/stacksize
@@ -7,6 +7,9 @@ use Cwd;
use File::Spec;
use strict;
+-d "lib" or mkdir "lib";
+-d "lib/Storable" or mkdir "lib/Storable";
+
my $fn = "lib/Storable/Limit.pm";
my $ptrsize = $Config{ptrsize};
my ($bad1, $bad2) = (65001, 25000);
@@ -29,6 +32,10 @@ sub is_miniperl {
}
if (is_miniperl()) {
+ if ($Config{usecrosscompile}) {
+ write_limits(500, 265);
+ exit;
+ }
die "Should not run during miniperl\n";
}
my $prefix = "";
@@ -68,9 +75,6 @@ if ($ENV{PERL_CORE}) {
}
}
--d "lib" or mkdir "lib";
--d "lib/Storable" or mkdir "lib/Storable";
-
if ($^O eq "MSWin32") {
require Win32;
my ($str, $major, $minor) = Win32::GetOSVersion();
This diff is collapsed.
......@@ -16,6 +16,9 @@ patch-options = -p1
patches =
${:_profile_base_location_}/perl-keep-linker-flags-in-ldflags.patch#4e8e0c59d7176eafb0c7402dea17bef1
${:_profile_base_location_}/0001-Fix-missing-build-dependency-for-pods.patch#85aff81f3bea34fcd6ce9a611ee1cdb2
${:_profile_base_location_}/0002-prereq1.patch#c9bf3b521a39134d044eaa2c2312174f
${:_profile_base_location_}/0003-prereq2.patch#5268ff6dd06718cff34e6fb758045996
${:_profile_base_location_}/0004-disable-probing.patch#e68446ccd155c2282639e495a5be612b
configure-command =
sh Configure -des \
-Dprefix=${buildout:parts-directory}/${:_buildout_section_name_} \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment