mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-04-02 02:49:12 +00:00
libtevent: 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 \*tevent\*.so /usr/lib/python3.10/site-packages/_tevent.cpython-310-x86_64-linux-gnu.so /usr/lib/python3.10/site-packages/_tevent.so Set pyext_PATTERN to '%s.so' to remove the suffix. After the patch: root@qemuarm64:~# find /usr/lib/python3.10/ -name \*tevent\*.so /usr/lib/python3.10/site-packages/_tevent.so Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
301e8045d2
commit
38864f10fa
@ -0,0 +1,42 @@
|
||||
From 96ddbe6653f87670e4a0bbff229276bbe0aa822a Mon Sep 17 00:00:00 2001
|
||||
From: Yi Zhao <yi.zhao@windriver.com>
|
||||
Date: Wed, 24 Nov 2021 13:33:35 +0800
|
||||
Subject: [PATCH] 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 \*tevent\*.so
|
||||
/usr/lib/python3.10/site-packages/_tevent.cpython-310-x86_64-linux-gnu.so
|
||||
/usr/lib/python3.10/site-packages/_tevent.so
|
||||
|
||||
Set pyext_PATTERN to '%s.so' to remove the suffix.
|
||||
After the patch:
|
||||
root@qemuarm64:~# find /usr/lib/python3.10/ -name \*tevent\*.so
|
||||
/usr/lib/python3.10/site-packages/_tevent.so
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
|
||||
---
|
||||
third_party/waf/waflib/Tools/python.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py
|
||||
index 7c45a76..c9a90f7 100644
|
||||
--- a/third_party/waf/waflib/Tools/python.py
|
||||
+++ b/third_party/waf/waflib/Tools/python.py
|
||||
@@ -328,7 +328,7 @@ def check_python_headers(conf, features='pyembed pyext'):
|
||||
x = 'MACOSX_DEPLOYMENT_TARGET'
|
||||
if dct[x]:
|
||||
env[x] = conf.environ[x] = dct[x]
|
||||
- env.pyext_PATTERN = '%s' + dct['SO'] # not a mistake
|
||||
+ env.pyext_PATTERN = '%s.so'
|
||||
|
||||
|
||||
# Try to get pythonX.Y-config
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@ -9,6 +9,7 @@ RDEPENDS:python3-tevent = "python3"
|
||||
SRC_URI = "https://samba.org/ftp/tevent/tevent-${PV}.tar.gz \
|
||||
file://options-0.10.0.patch \
|
||||
file://0001-libtevent-fix-musl-libc-compile-error.patch \
|
||||
file://0001-Fix-pyext_PATTERN-for-cross-compilation.patch \
|
||||
"
|
||||
LIC_FILES_CHKSUM = "file://tevent.h;endline=26;md5=4e458d658cb25e21efc16f720e78b85a"
|
||||
|
||||
@ -42,11 +43,6 @@ EXTRA_OECONF += "--disable-rpath \
|
||||
--with-libiconv=${STAGING_DIR_HOST}${prefix}\
|
||||
--without-gettext \
|
||||
"
|
||||
do_install:append() {
|
||||
# add this link for cross check python module existence. eg: on x86-64 host, check python module
|
||||
# under recipe-sysroot which is mips64.
|
||||
cd ${D}${PYTHON_SITEPACKAGES_DIR}; ln -s _tevent.*.so _tevent.so
|
||||
}
|
||||
|
||||
PACKAGES += "python3-tevent"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user