libdbd-mysql-perl: avoid invoking assert_lib at do_configure stage

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.Chen@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Chen Qi
2024-07-09 01:16:31 -07:00
committed by Armin Kuster
parent 4f9606591a
commit 18f939a5fb
2 changed files with 43 additions and 1 deletions
@@ -0,0 +1,40 @@
From 577cdd6a571cfed506ec902b9021e60a2b854e4a Mon Sep 17 00:00:00 2001
From: Chen Qi <Qi.Chen@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.Chen@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
@@ -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"