summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2021-11-25 10:44:45 +0800
committerKhem Raj <raj.khem@gmail.com>2021-11-25 10:14:18 -0800
commit301e8045d2472fb93040c0dc0a44e534a08b182e (patch)
treee52543d1a4cdc1ab533d64124b00a7fbee1d6c96 /meta-networking
parent13187d3f014c50b011c3704a484c7e00e9c31de9 (diff)
downloadmeta-openembedded-301e8045d2472fb93040c0dc0a44e534a08b182e.tar.gz
libtdb: fix pyext_PATTERN for cross compilation
The pyext_PATTERN will add native arch as suffix when cross compiling. For example, on qemuarm64, it is expanded to: pyext_PATTERN ='%s.cpython-310-x86_64-linux-gnu.so' which will result in the incorrect library name. root@qemuarm64:~# find /usr/lib/python3.10/ -name tdb\* /usr/lib/python3.10/site-packages/tdb.so /usr/lib/python3.10/site-packages/tdb.cpython-310-x86_64-linux-gnu.so Set pyext_PATTERN to '%s.so' to remove the suffix. After the patch: root@qemuarm64:~# find /usr/lib/python3.10/ -name tdb\* /usr/lib/python3.10/site-packages/tdb.so Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/libtdb/libtdb/0001-Fix-pyext_PATTERN-for-cross-compilation.patch42
-rw-r--r--meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb7
2 files changed, 43 insertions, 6 deletions
diff --git a/meta-networking/recipes-support/libtdb/libtdb/0001-Fix-pyext_PATTERN-for-cross-compilation.patch b/meta-networking/recipes-support/libtdb/libtdb/0001-Fix-pyext_PATTERN-for-cross-compilation.patch
new file mode 100644
index 000000000..6f221989f
--- /dev/null
+++ b/meta-networking/recipes-support/libtdb/libtdb/0001-Fix-pyext_PATTERN-for-cross-compilation.patch
@@ -0,0 +1,42 @@
1From 00bd6680ad38c20c95a35c963d7077269f3a3aa2 Mon Sep 17 00:00:00 2001
2From: Yi Zhao <yi.zhao@windriver.com>
3Date: Wed, 24 Nov 2021 13:33:35 +0800
4Subject: [PATCH] Fix pyext_PATTERN for cross compilation
5
6The pyext_PATTERN will add native arch as suffix when cross compiling.
7For example, on qemuarm64, it is expanded to:
8pyext_PATTERN ='%s.cpython-310-x86_64-linux-gnu.so'
9which will result in the incorrect library name.
10
11root@qemuarm64:~# find /usr/lib/python3.10/ -name tdb\*
12/usr/lib/python3.10/site-packages/tdb.so
13/usr/lib/python3.10/site-packages/tdb.cpython-310-x86_64-linux-gnu.so
14
15Set pyext_PATTERN to '%s.so' to remove the suffix.
16After the patch:
17root@qemuarm64:~# find /usr/lib/python3.10/ -name tdb\*
18/usr/lib/python3.10/site-packages/tdb.so
19
20Upstream-Status: Inappropriate [embedded specific]
21
22Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
23---
24 third_party/waf/waflib/Tools/python.py | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py
28index 7c45a76..c9a90f7 100644
29--- a/third_party/waf/waflib/Tools/python.py
30+++ b/third_party/waf/waflib/Tools/python.py
31@@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'):
32 x = 'MACOSX_DEPLOYMENT_TARGET'
33 if dct[x]:
34 env[x] = conf.environ[x] = dct[x]
35- env.pyext_PATTERN = '%s' + dct['SO'] # not a mistake
36+ env.pyext_PATTERN = '%s.so'
37
38
39 # Try to get pythonX.Y-config
40--
412.17.1
42
diff --git a/meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb b/meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb
index ad8459389..e7f738402 100644
--- a/meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb
+++ b/meta-networking/recipes-support/libtdb/libtdb_1.4.3.bb
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://tools/tdbdump.c;endline=18;md5=b59cd45aa8624578126a8c
8 8
9SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \ 9SRC_URI = "https://samba.org/ftp/tdb/tdb-${PV}.tar.gz \
10 file://tdb-Add-configure-options-for-packages.patch \ 10 file://tdb-Add-configure-options-for-packages.patch \
11 file://0001-Fix-pyext_PATTERN-for-cross-compilation.patch \
11" 12"
12 13
13SRC_URI[md5sum] = "e638e8890f743624a754304b3f994f4d" 14SRC_URI[md5sum] = "e638e8890f743624a754304b3f994f4d"
@@ -39,12 +40,6 @@ EXTRA_OECONF += "--disable-rpath \
39 --with-libiconv=${STAGING_DIR_HOST}${prefix}\ 40 --with-libiconv=${STAGING_DIR_HOST}${prefix}\
40 " 41 "
41 42
42do_install:append() {
43 # add this link for cross check python module existence. eg: on x86-64 host, check python module
44 # under recipe-sysroot which is mips64.
45 cd ${D}${PYTHON_SITEPACKAGES_DIR}; ln -s tdb.*.so tdb.so
46}
47
48PACKAGES += "tdb-tools python3-tdb" 43PACKAGES += "tdb-tools python3-tdb"
49 44
50RPROVIDES:${PN}-dbg += "python3-tdb-dbg" 45RPROVIDES:${PN}-dbg += "python3-tdb-dbg"