Fix perl re.so undefined symbol error
This commit is contained in:
parent
89d3c4771c
commit
1bb1877952
92
perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch
Normal file
92
perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
From fbdb9a76798ae34a7b53f664e77aaaf1f4040f2f Mon Sep 17 00:00:00 2001
|
||||||
|
From: zhangzikang <zhangzikang@kylinos.cn>
|
||||||
|
Date: Wed, 20 Mar 2024 17:44:51 +0800
|
||||||
|
Subject: [PATCH] perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM-on-Linux
|
||||||
|
|
||||||
|
---
|
||||||
|
MANIFEST | 1 +
|
||||||
|
.../lib/ExtUtils/MM_Unix.pm | 8 +++++-
|
||||||
|
.../lib/ExtUtils/CBuilder/Platform/linux.pm | 26 +++++++++++++++++++
|
||||||
|
3 files changed, 34 insertions(+), 1 deletion(-)
|
||||||
|
create mode 100644 dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
||||||
|
|
||||||
|
diff --git a/MANIFEST b/MANIFEST
|
||||||
|
index 6bc115b..0775b2f 100644
|
||||||
|
--- a/MANIFEST
|
||||||
|
+++ b/MANIFEST
|
||||||
|
@@ -3855,6 +3855,7 @@ dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/android.pm CBuilder method
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/cygwin.pm CBuilder methods for cygwin
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/darwin.pm CBuilder methods for darwin
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/dec_osf.pm CBuilder methods for OSF
|
||||||
|
+dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm CBuilder methods for Linux
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/os2.pm CBuilder methods for OS/2
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/Unix.pm CBuilder methods for Unix
|
||||||
|
dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/VMS.pm CBuilder methods for VMS
|
||||||
|
diff --git a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
|
index 1761380..4e82dda 100644
|
||||||
|
--- a/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
|
+++ b/cpan/ExtUtils-MakeMaker/lib/ExtUtils/MM_Unix.pm
|
||||||
|
@@ -32,6 +32,7 @@ BEGIN {
|
||||||
|
$Is{IRIX} = $^O eq 'irix';
|
||||||
|
$Is{NetBSD} = $^O eq 'netbsd';
|
||||||
|
$Is{Interix} = $^O eq 'interix';
|
||||||
|
+ $Is{Linux} = $^O eq 'linux';
|
||||||
|
$Is{SunOS4} = $^O eq 'sunos';
|
||||||
|
$Is{Solaris} = $^O eq 'solaris';
|
||||||
|
$Is{SunOS} = $Is{SunOS4} || $Is{Solaris};
|
||||||
|
@@ -1074,7 +1075,7 @@ sub xs_make_dynamic_lib {
|
||||||
|
push(@m," \$(RM_F) \$\@\n");
|
||||||
|
|
||||||
|
my $libs = '$(LDLOADLIBS)';
|
||||||
|
- if (($Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
||||||
|
+ if (($Is{Linux} || $Is{NetBSD} || $Is{Interix} || $Is{Android}) && $Config{'useshrplib'} eq 'true') {
|
||||||
|
# Use nothing on static perl platforms, and to the flags needed
|
||||||
|
# to link against the shared libperl library on shared perl
|
||||||
|
# platforms. We peek at lddlflags to see if we need -Wl,-R
|
||||||
|
@@ -1087,6 +1088,11 @@ sub xs_make_dynamic_lib {
|
||||||
|
# The Android linker will not recognize symbols from
|
||||||
|
# libperl unless the module explicitly depends on it.
|
||||||
|
$libs .= ' "-L$(PERL_INC)" -lperl';
|
||||||
|
+ } else {
|
||||||
|
+ if ($ENV{PERL_CORE}) {
|
||||||
|
+ $libs .= ' "-L$(PERL_INC)"';
|
||||||
|
+ }
|
||||||
|
+ $libs .= ' -lperl';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..582339b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Platform/linux.pm
|
||||||
|
@@ -0,0 +1,26 @@
|
||||||
|
+package ExtUtils::CBuilder::Platform::linux;
|
||||||
|
+
|
||||||
|
+use strict;
|
||||||
|
+use ExtUtils::CBuilder::Platform::Unix;
|
||||||
|
+use File::Spec;
|
||||||
|
+
|
||||||
|
+use vars qw($VERSION @ISA);
|
||||||
|
+$VERSION = '0.280230';
|
||||||
|
+our @ISA = qw(ExtUtils::CBuilder::Platform::Unix);
|
||||||
|
+
|
||||||
|
+sub link {
|
||||||
|
+ my ($self, %args) = @_;
|
||||||
|
+ my $cf = $self->{config};
|
||||||
|
+
|
||||||
|
+ # Link XS modules to libperl.so explicitly because multiple
|
||||||
|
+ # dlopen(, RTLD_LOCAL) hides libperl symbols from XS module.
|
||||||
|
+ local $cf->{lddlflags} = $cf->{lddlflags};
|
||||||
|
+ if ($ENV{PERL_CORE}) {
|
||||||
|
+ $cf->{lddlflags} .= ' -L' . $self->perl_inc();
|
||||||
|
+ }
|
||||||
|
+ $cf->{lddlflags} .= ' -lperl';
|
||||||
|
+
|
||||||
|
+ return $self->SUPER::link(%args);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+1;
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ Name: perl
|
|||||||
License: (GPL+ or Artistic) and (GPLv2+ or Artistic) and MIT and UCD and Public Domain and BSD
|
License: (GPL+ or Artistic) and (GPLv2+ or Artistic) and MIT and UCD and Public Domain and BSD
|
||||||
Epoch: 4
|
Epoch: 4
|
||||||
Version: %{perl_version}
|
Version: %{perl_version}
|
||||||
Release: 5
|
Release: 6
|
||||||
Summary: A highly capable, feature-rich programming language
|
Summary: A highly capable, feature-rich programming language
|
||||||
Url: https://www.perl.org/
|
Url: https://www.perl.org/
|
||||||
Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz
|
Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz
|
||||||
@ -37,6 +37,7 @@ Patch5: change-lib-to-lib64.patch
|
|||||||
Patch6: disable-rpath-by-default.patch
|
Patch6: disable-rpath-by-default.patch
|
||||||
Patch7: backport-CVE-2023-47100-CVE-2023-47038.patch
|
Patch7: backport-CVE-2023-47100-CVE-2023-47038.patch
|
||||||
Patch8: backport-CVE-2023-47039.patch
|
Patch8: backport-CVE-2023-47039.patch
|
||||||
|
Patch9: perl-5.38.0-Link-XS-modules-to-libperl.so-with-EU-MM.patch
|
||||||
|
|
||||||
BuildRequires: gcc bash findutils coreutils make tar procps bzip2-devel gdbm-devel perl-File-Compare perl-File-Find
|
BuildRequires: gcc bash findutils coreutils make tar procps bzip2-devel gdbm-devel perl-File-Compare perl-File-Find
|
||||||
BuildRequires: zlib-devel perl-interpreter perl-generators
|
BuildRequires: zlib-devel perl-interpreter perl-generators
|
||||||
@ -498,6 +499,9 @@ make test_harness
|
|||||||
%{_mandir}/man3/*
|
%{_mandir}/man3/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Mar 20 2024 zhangzikang <zhangzikang@kylinos.cn> - 4:5.38.0-6
|
||||||
|
- Fix perl re.so undefined symbol error
|
||||||
|
|
||||||
* Mon Dec 11 2023 huyubiao <huyubiao@huawei.com> - 4:5.38.0.5
|
* Mon Dec 11 2023 huyubiao <huyubiao@huawei.com> - 4:5.38.0.5
|
||||||
- Fix CVE-2023-47100
|
- Fix CVE-2023-47100
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user