Skip to contentSkip to conversation

python3-matplotlib: add native RSS to -fmacro-prefix-map to fix buildpaths QA

PATCH In review Martin Jansa 2 participants 4 messages Sep 2, 2024 – Sep 8, 2024 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 python3-matplotlib: add native RSS to -fmacro-prefix-map to fix buildpaths QA

* fixes:
ERROR: lib32-python3-matplotlib-3.7.2-r0 do_package_qa: QA Issue: File /usr/lib/python3.12/site-packages/matplotlib/_tri.cpython-312-i386-linux-gnu.so in package lib32-python3-matplotlib contains reference to TMPDIR [buildpaths]

* there is native RSS already but only in -fdebug-prefix-map

* it fails only with multilib where target RSS isn't substring of native RSS

* comparing _tri.cpython-312-*-linux-gnu.so cmdline for regular x86-64 and lib32-python3-matplotlib i586 build shows:

--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \
--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot-native= \

+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \
+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native= \

* the buildpaths are header files from native pybind11 (Pybind11Extension)
https://github.com/pybind/pybind11/blob/master/pybind11/setup_helpers.py#L89

$ strings package/usr/lib/python3.12/site-packages/matplotlib/_tri.cpython-312-i386-linux-gnu.so | grep oemllib32
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/common.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/../pytypes.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/type_caster_base.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

* I'm not familiar enough with pybind11 to find a way how to configure it to
use correct include dir, the issue already exists in regular x86-64 dir, but
not caught by buildpaths, because, the:
-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= is enought to mangle the hardcoded paths (leaving only '-native') like this:

strings ../3.7.2-x86-64/package/usr/lib64/python3.12/site-packages/matplotlib/_tri.cpython-312-x86_64-linux-gnu.so | grep pybind11/include/pybind11 -native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/common.h -native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pytypes.h -native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h -native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/type_caster_base.h -native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h -native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h -native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

* there is also:
WARNING: lib32-python3-matplotlib-3.7.2-r0 do_check_backend: QA Issue: inherits setuptools3 but has pyproject.toml with setuptools.build_meta, use the correct class [pep517-backend] but just changing the inherit doesn't work in this case, I'll leave that
to someone actually using python3-matplotlib

---
 .../recipes-devtools/python/python3-matplotlib_3.7.2.bb      | 5 +++++
 1 file changed, 5 insertions(+)
meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb +5 -0
index 72c369100a..2886060a9e 100644
@@ -68,3 +68,8 @@ do_compile:prepend() {
 }
 
 BBCLASSEXTEND = "native"
+
+# otherwise pybind11 paths from STAGING_DIR_NATIVE end in _tri.cpython-312-i386-linux-gnu.so
+# when STAGING_DIR_NATIVE doesn't start with STAGING_DIR_HOST (e.g. for lib32-python3-matplotlib)
+# http://errors.yoctoproject.org/Errors/Details/801217/
+DEBUG_PREFIX_MAP:append = " -fmacro-prefix-map=${STAGING_DIR_NATIVE}="
Signature · 1 line
2.46.0
#1 lore raw

This is related RFC patch just sent to oe-core ML:
https://lists.openembedded.org/g/openembedded-core/message/204110

Quoted 78 lines · Martin Jansa

* fixes:
ERROR: lib32-python3-matplotlib-3.7.2-r0 do_package_qa: QA Issue: File /usr/lib/python3.12/site-packages/matplotlib/_tri.cpython-312-i386-linux-gnu.so in package lib32-python3-matplotlib contains reference to TMPDIR [buildpaths]

* there is native RSS already but only in -fdebug-prefix-map

* it fails only with multilib where target RSS isn't substring of native RSS

* comparing _tri.cpython-312-*-linux-gnu.so cmdline for regular x86-64 and lib32-python3-matplotlib i586 build shows:

--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \
--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot-native= \

+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \
+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native= \

* the buildpaths are header files from native pybind11 (Pybind11Extension)
https://github.com/pybind/pybind11/blob/master/pybind11/setup_helpers.py#L89

$ strings package/usr/lib/python3.12/site-packages/matplotlib/_tri.cpython-312-i386-linux-gnu.so | grep oemllib32
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/common.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/../pytypes.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/type_caster_base.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

* I'm not familiar enough with pybind11 to find a way how to configure it to
use correct include dir, the issue already exists in regular x86-64 dir, but
not caught by buildpaths, because, the:
-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= is enought to mangle the hardcoded paths (leaving only '-native') like this:

strings ../3.7.2-x86-64/package/usr/lib64/python3.12/site-packages/matplotlib/_tri.cpython-312-x86_64-linux-gnu.so | grep pybind11/include/pybind11

(quoted diff) +0 -7
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/common.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pytypes.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/type_caster_base.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

* there is also:
WARNING: lib32-python3-matplotlib-3.7.2-r0 do_check_backend: QA Issue: inherits setuptools3 but has pyproject.toml with setuptools.build_meta, use the correct class [pep517-backend] but just changing the inherit doesn't work in this case, I'll leave that
to someone actually using python3-matplotlib

---
 .../recipes-devtools/python/python3-matplotlib_3.7.2.bb      | 5 +++++
 1 file changed, 5 insertions(+)
meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb +5 -1
index 72c369100a..2886060a9e 100644
@@ -68,3 +68,8 @@ do_compile:prepend() {
 }
 
 BBCLASSEXTEND = "native"
+
+# otherwise pybind11 paths from STAGING_DIR_NATIVE end in _tri.cpython-312-i386-linux-gnu.so
+# when STAGING_DIR_NATIVE doesn't start with STAGING_DIR_HOST (e.g. for lib32-python3-matplotlib)
+# http://errors.yoctoproject.org/Errors/Details/801217/
+DEBUG_PREFIX_MAP:append = " -fmacro-prefix-map=${STAGING_DIR_NATIVE}="
--

2.46.0

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Khem: please drop this one from master-next

It was added in the default DEBUG_PREFIX_MAP in oe-core now.

Quoted 92 lines · Martin Jansa via lists.openembedded.org

This is related RFC patch just sent to oe-core ML:
https://lists.openembedded.org/g/openembedded-core/message/204110

Quoted 76 lines · Martin Jansa

* fixes:
ERROR: lib32-python3-matplotlib-3.7.2-r0 do_package_qa: QA Issue: File /usr/lib/python3.12/site-packages/matplotlib/_tri.cpython-312-i386-linux-gnu.so in package lib32-python3-matplotlib contains reference to TMPDIR [buildpaths]

* there is native RSS already but only in -fdebug-prefix-map

* it fails only with multilib where target RSS isn't substring of native RSS

* comparing _tri.cpython-312-*-linux-gnu.so cmdline for regular x86-64 and lib32-python3-matplotlib i586 build shows:

--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \
--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \
--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot-native= \

+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \
+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \
+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native= \

* the buildpaths are header files from native pybind11 (Pybind11Extension)
https://github.com/pybind/pybind11/blob/master/pybind11/setup_helpers.py#L89

$ strings package/usr/lib/python3.12/site-packages/matplotlib/_tri.cpython-312-i386-linux-gnu.so | grep oemllib32
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/common.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/../pytypes.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/type_caster_base.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h
/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

* I'm not familiar enough with pybind11 to find a way how to configure it to
use correct include dir, the issue already exists in regular x86-64 dir, but
not caught by buildpaths, because, the:
-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= is enought to mangle the hardcoded paths (leaving only '-native') like this:

strings ../3.7.2-x86-64/package/usr/lib64/python3.12/site-packages/matplotlib/_tri.cpython-312-x86_64-linux-gnu.so | grep pybind11/include/pybind11

(quoted diff) +0 -7
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/common.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pytypes.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/type_caster_base.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h
-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

* there is also:
WARNING: lib32-python3-matplotlib-3.7.2-r0 do_check_backend: QA Issue: inherits setuptools3 but has pyproject.toml with setuptools.build_meta, use the correct class [pep517-backend] but just changing the inherit doesn't work in this case, I'll leave that
to someone actually using python3-matplotlib

---
 .../recipes-devtools/python/python3-matplotlib_3.7.2.bb      | 5 +++++
 1 file changed, 5 insertions(+)
meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb +5 -1
index 72c369100a..2886060a9e 100644
@@ -68,3 +68,8 @@ do_compile:prepend() {
 }
 
 BBCLASSEXTEND = "native"
+
+# otherwise pybind11 paths from STAGING_DIR_NATIVE end in _tri.cpython-312-i386-linux-gnu.so
+# when STAGING_DIR_NATIVE doesn't start with STAGING_DIR_HOST (e.g. for lib32-python3-matplotlib)
+# http://errors.yoctoproject.org/Errors/Details/801217/
+DEBUG_PREFIX_MAP:append = " -fmacro-prefix-map=${STAGING_DIR_NATIVE}="
--
Quoted 2 lines

2.46.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#112075): https://lists.openembedded.org/g/openembedded-devel/message/112075
Mute This Topic: https://lists.openembedded.org/mt/108229723/3617156
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
Quoted 3 lines · Martin Jansa via lists.openembedded.org

Khem: please drop this one from master-next

It was added in the default DEBUG_PREFIX_MAP in oe-core now.

Yes thanks I was adding it for testing a local issue I was seeing with clang. Thanks for letting me know regardless

Quoted 166 lines
Quoted 5 lines · Martin Jansa via lists.openembedded.org

This is related RFC patch just sent to oe-core ML:
https://lists.openembedded.org/g/openembedded-core/message/204110

On Mon, Sep 2, 2024 at 6:27 PM Martin Jansa <[email protected]>

Quoted 3 lines · wrote:
Quoted 3 lines

* fixes:
ERROR: lib32-python3-matplotlib-3.7.2-r0 do_package_qa: QA Issue:

File /usr/lib/python3.12/site-packages/matplotlib/_ tri.cpython-312-i386-linux-gnu.so in package lib32-python3-matplotlib contains reference to TMPDIR [buildpaths]

Quoted 4 lines
Quoted 4 lines

* there is native RSS already but only in -fdebug-prefix-map

* it fails only with multilib where target RSS isn't substring of

native RSS

Quoted 2 lines
Quoted 2 lines

* comparing _tri.cpython-312-*-linux-gnu.so cmdline for regular x86-64

and lib32-python3-matplotlib i586 build shows:

Quoted 2 lines
Quoted 2 lines

--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \

Quoted 1 line
Quoted 1 line

--fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot= \

Quoted 1 line
Quoted 1 line

--fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot-native= \

Quoted 1 line
Quoted 1 line

+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/matplotlib-3.7.2=/usr/src/debug/lib32-python3-matplotlib/3.7.2 \

Quoted 1 line
Quoted 1 line

+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \

Quoted 1 line
Quoted 1 line

+-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/lib32-recipe-sysroot= \

Quoted 1 line
Quoted 1 line

+-fdebug-prefix-map=/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native= \

Quoted 2 lines
Quoted 2 lines

* the buildpaths are header files from native pybind11

(Pybind11Extension)

Quoted 1 line
Quoted 1 line

https://github.com/pybind/pybind11/blob/master/pybind11/setup_helpers.py#L89

Quoted 2 lines
Quoted 2 lines
$ strings package/usr/lib/python3.12/site-packages/matplotlib/_

tri.cpython-312-i386-linux-gnu.so | grep oemllib32

Quoted 1 line
Quoted 1 line

/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/common.h

Quoted 1 line
Quoted 1 line

/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/../pytypes.h

Quoted 1 line
Quoted 1 line

/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h

Quoted 1 line
Quoted 1 line

/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/../detail/type_caster_base.h

Quoted 1 line
Quoted 1 line

/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h

Quoted 1 line
Quoted 1 line

/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h

Quoted 1 line
Quoted 1 line

/OE/build/oe-core/tmp-glibc/work/i586-oemllib32-linux/lib32-python3-matplotlib/3.7.2/recipe-sysroot-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

Quoted 2 lines
Quoted 2 lines

* I'm not familiar enough with pybind11 to find a way how to configure

it to

Quoted 1 line
Quoted 1 line

use correct include dir, the issue already exists in regular x86-64

dir, but

Quoted 2 lines
Quoted 2 lines

not caught by buildpaths, because, the:

-fmacro-prefix-map=/OE/build/oe-core/tmp-glibc/work/core2-64-oe-linux/python3-matplotlib/3.7.2/recipe-sysroot=

Quoted 1 line
Quoted 1 line

is enought to mangle the hardcoded paths (leaving only '-native')

like this:

Quoted 2 lines
Quoted 2 lines

strings

../3.7.2-x86-64/package/usr/lib64/python3.12/site-packages/matplotlib/_ tri.cpython-312-x86_64-linux-gnu.so | grep pybind11/include/pybind11

Quoted 1 line
Quoted 1 line

-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/common.h

Quoted 1 line
Quoted 1 line

-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pytypes.h

Quoted 1 line
Quoted 1 line

-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/class.h

Quoted 1 line
Quoted 1 line

-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/detail/type_caster_base.h

Quoted 1 line
Quoted 1 line

-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/pybind11.h

Quoted 1 line
Quoted 1 line

-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil.h

Quoted 1 line
Quoted 1 line

-native/usr/lib/python3.12/site-packages/pybind11/include/pybind11/gil_safe_call_once.h

Quoted 3 lines
Quoted 3 lines

* there is also:
WARNING: lib32-python3-matplotlib-3.7.2-r0 do_check_backend: QA

Issue: inherits setuptools3 but has pyproject.toml with setuptools.build_meta, use the correct class [pep517-backend]

Quoted 1 line
Quoted 1 line

but just changing the inherit doesn't work in this case, I'll leave

that

Quoted 5 lines
Quoted 5 lines

to someone actually using python3-matplotlib

---
 .../recipes-devtools/python/python3-matplotlib_3.7.2.bb      | 5

+++++

Quoted 3 lines

Review

Quoted 3 lines
 1 file changed, 5 insertions(+)
(quoted diff) +0 -0

python3-matplotlib_3.7.2.bb b/meta-python/recipes-devtools/python/ python3-matplotlib_3.7.2.bb

Quoted 9 lines

meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb do_compile:prepend() { · line 72

Quoted 9 lines

index 72c369100a..2886060a9e 100644

meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb +2 -0
@@ -68,3 +68,8 @@ do_compile:prepend() {
 }
 
 BBCLASSEXTEND = "native"
+
+# otherwise pybind11 paths from STAGING_DIR_NATIVE end in _

tri.cpython-312-i386-linux-gnu.so

Quoted 1 line

meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb do_compile:prepend() { · line 73

Quoted 1 line
meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb +1 -0
+# when STAGING_DIR_NATIVE doesn't start with STAGING_DIR_HOST (e.g.

for lib32-python3-matplotlib)

Quoted 8 lines
Quoted 5 lines
meta-python/recipes-devtools/python/python3-matplotlib_3.7.2.bb +2 -1
+# http://errors.yoctoproject.org/Errors/Details/801217/
+DEBUG_PREFIX_MAP:append = " -fmacro-prefix-map=${STAGING_DIR_NATIVE}="
--

2.46.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#112124):
https://lists.openembedded.org/g/openembedded-devel/message/112124
Mute This Topic: https://lists.openembedded.org/mt/108229723/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-