From: Chen Qi <qi.c...@windriver.com>

The assert_lib from perl package will execute the generated binary.
This is not suitable for cross compilation environment such as OE.

In OE, if the libs are not available, the following do_compile task
will just fail.

So we should avoid invoking assert_lib at do_configure stage to avoid
error message like below in log.do_configure:

  /usr/lib64/ld-linux-aarch64.so.1: No such file or directory

Signed-off-by: Chen Qi <qi.c...@windriver.com>
---
 ...void-running-assert_lib-at-configure.patch | 40 +++++++++++++++++++
 .../perl/libdbd-mysql-perl_4.050.bb           |  4 +-
 2 files changed, 43 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch

diff --git 
a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch
 
b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch
new file mode 100644
index 0000000000..2e010931d6
--- /dev/null
+++ 
b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl/0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch
@@ -0,0 +1,40 @@
+From 577cdd6a571cfed506ec902b9021e60a2b854e4a Mon Sep 17 00:00:00 2001
+From: Chen Qi <qi.c...@windriver.com>
+Date: Sun, 7 Jul 2024 22:32:30 -0700
+Subject: [PATCH] Makefile.PL: avoid running assert_lib at configure
+
+The assert_lib will run the generated binary. When cross compiling,
+e.g., for qemuarm64, we'll see error like below:
+
+  /usr/lib64/ld-linux-aarch64.so.1: No such file or directory
+
+We should just skip library checking, because in OE, if these libs are
+not available, the do_compile process will fail anyway.
+
+Upstream-Status: Inappropriate [OE Specific]
+
+Signed-off-by: Chen Qi <qi.c...@windriver.com>
+---
+ Makefile.PL | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index a1b38f6..939cadc 100644
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -206,11 +206,7 @@ To change these settings, see 'perl Makefile.PL --help' 
and
+ MSG
+ 
+ print "Checking if libs are available for compiling...\n";
+-
+-assert_lib(
+-  LIBS => ($opt->{'embedded'} ? $opt->{'embedded'} : $opt->{libs}),
+-);
+-
++print "Skip checking libs at configure stage as we are cross compiling.\n";
+ print "Looks good.\n\n";
+ 
+ sleep 1;
+-- 
+2.25.1
+
diff --git a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb 
b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb
index fc505fe1e8..99a9fcf628 100644
--- a/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb
+++ b/meta-oe/recipes-devtools/perl/libdbd-mysql-perl_4.050.bb
@@ -15,7 +15,9 @@ DEPENDS += "libdev-checklib-perl-native libdbi-perl-native 
libmysqlclient"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d0a06964340e5c0cde88b7af611f755c"
 
 SRCREV = "9b5b70ea372f49fe9bc9e592dae3870596d1e3d6"
-SRC_URI = 
"git://github.com/perl5-dbi/DBD-mysql.git;protocol=https;branch=master"
+SRC_URI = 
"git://github.com/perl5-dbi/DBD-mysql.git;protocol=https;branch=master \
+           file://0001-Makefile.PL-avoid-running-assert_lib-at-configure.patch 
\
+           "
 
 S = "${WORKDIR}/git"
 
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#111281): 
https://lists.openembedded.org/g/openembedded-devel/message/111281
Mute This Topic: https://lists.openembedded.org/mt/107119065/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to