Skip to contentSkip to conversation

pahole: respect libdir

PATCH In review Martin Jansa 2 participants 5 messages Apr 7, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 pahole: respect libdir

* use the same expression as cmake.bbclass is using:
CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} but ${baselib} should work here as well

---
 meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +1 -1
index b7f1f8bb28..2bb73c3eb7 100644
@@ -20,7 +20,7 @@ inherit cmake pkgconfig
 
 PACKAGECONFIG[python3] = ",,python3-core,python3-core"
 
-EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
+EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
 
 FILES:${PN} =  "${bindir}/pahole \
 		${libdir}/libdwarves.so* \
Signature · 1 line
2.40.0
#1 lore raw

PATCH 2/2 lvgl,lv-lib-png,lv-drivers: fix installed-vs-shipped QA issue with multilib

* with multilib BASELIB is just "lib" while baselib is "lib64"
and libdir is "/usr/lib64".
* fixes:
ERROR: QA Issue: lvgl: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/liblvgl.a
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
lvgl: 2 installed and not shipped files. [installed-vs-shipped]

* lowercase baselib should work for ppc64 as well (I hope) # $baselib [3 operations]
# set oe-core/meta/conf/bitbake.conf:10
# "${BASELIB}"
# set oe-core/meta/conf/bitbake.conf:11
# [vardepvalue] "${baselib}"
# set oe-core/meta/conf/multilib.conf:2
# "${@d.getVar('BASE_LIB:tune-' + (d.getVar('DEFAULTTUNE') or 'INVALID')) or d.getVar('BASELIB')}"

  # pre-expansion value:
  #   "${@d.getVar('BASE_LIB:tune-' + (d.getVar('DEFAULTTUNE') or 'INVALID')) or d.getVar('BASELIB')}"
  baselib="lib64"

* simplify destsuffix/S setting
* I was surprised that ${WORKDIR}/${PN}-${PV} works in multilib build but then I've noticed that it's because destsuffix is set to S which is a bit uncommon, so drop that and use default "git"

* use ${STAGING_INCDIR} instead of ${RECIPE_SYSROOT}/${includedir}

---
 meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb | 8 ++++----
 meta-oe/recipes-graphics/lvgl/lv-lib-png_8.0.2.bb  | 8 +++++---
 meta-oe/recipes-graphics/lvgl/lvgl_8.1.0.bb        | 6 +++---
 3 files changed, 12 insertions(+), 10 deletions(-)
meta-oe/recipes-graphics/lvgl/lv-drivers_7.11.0.bb +4 -4
index 1a94215839..cf33c69048 100644
@@ -9,7 +9,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2"
 
 # TODO: Pin upstream release (current v7.11.0-80-g419a757)
-SRC_URI = "git://github.com/lvgl/lv_drivers;destsuffix=${S};protocol=https;nobranch=1"
+SRC_URI = "git://github.com/lvgl/lv_drivers;protocol=https;nobranch=1"
 SRCREV = "419a757c23aaa67c676fe3a2196d64808fcf2254"
 
 DEPENDS = "libxkbcommon lvgl wayland"
@@ -19,15 +19,15 @@ REQUIRED_DISTRO_FEATURES = "wayland"
 inherit cmake
 inherit features_check
 
-S = "${WORKDIR}/${PN}-${PV}"
+S = "${WORKDIR}/git"
 
 LVGL_CONFIG_WAYLAND_HOR_RES ?= "480"
 LVGL_CONFIG_WAYLAND_VER_RES ?= "320"
 
-EXTRA_OECMAKE += "-Dinstall:BOOL=ON -DLIB_INSTALL_DIR=${BASELIB}"
+EXTRA_OECMAKE += "-Dinstall:BOOL=ON -DLIB_INSTALL_DIR=${baselib}"
 
 TARGET_CFLAGS += "-DLV_CONF_INCLUDE_SIMPLE=1"
-TARGET_CFLAGS += "-I${RECIPE_SYSROOT}/${includedir}/lvgl"
+TARGET_CFLAGS += "-I${STAGING_INCDIR}/lvgl"
 
 # Upstream does not support a default configuration
 # but propose a default "disabled" template, which is used as reference
meta-oe/recipes-graphics/lvgl/lv-lib-png_8.0.2.bb +5 -3
index 032e85f522..22b4826403 100644
@@ -8,21 +8,23 @@ DESCRIPTION = "Allow the use of PNG images in LVGL. This implementation uses lod
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=d6fc0df890c5270ef045981b516bb8f2"
 
-SRC_URI = "git://github.com/lvgl/lv_lib_png;destsuffix=${S};protocol=https;nobranch=1"
+SRC_URI = "git://github.com/lvgl/lv_lib_png;;protocol=https;nobranch=1"
 SRCREV = "bf1531afe07c9f861107559e29ab8a2d83e4715a"
 
+S = "${WORKDIR}/git"
+
 # because of lvgl dependency
 REQUIRED_DISTRO_FEATURES = "wayland"
 
 DEPENDS += "lvgl"
 
-EXTRA_OECMAKE += "-DLIB_INSTALL_DIR=${BASELIB}"
+EXTRA_OECMAKE += "-DLIB_INSTALL_DIR=${baselib}"
 
 inherit cmake
 inherit features_check
 
 TARGET_CFLAGS += "-DLV_CONF_INCLUDE_SIMPLE=1"
-TARGET_CFLAGS += "-I${RECIPE_SYSROOT}/${includedir}/lvgl"
+TARGET_CFLAGS += "-I${STAGING_INCDIR}/lvgl"
 
 FILES:${PN}-dev = "\
     ${includedir}/lvgl/lv_lib_png/ \
meta-oe/recipes-graphics/lvgl/lvgl_8.1.0.bb +3 -3
index 2005afa2fd..ea74c59185 100644
@@ -8,7 +8,7 @@ SUMMARY = "Light and Versatile Graphics Library"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENCE.txt;md5=bf1198c89ae87f043108cea62460b03a"
 
-SRC_URI = "gitsm://github.com/lvgl/lvgl;destsuffix=${S};protocol=https;nobranch=1"
+SRC_URI = "gitsm://github.com/lvgl/lvgl;protocol=https;nobranch=1"
 SRCREV = "d38eb1e689fa5a64c25e677275172d9c8a4ab2f0"
 
 REQUIRED_DISTRO_FEATURES = "wayland"
@@ -16,8 +16,8 @@ REQUIRED_DISTRO_FEATURES = "wayland"
 inherit cmake
 inherit features_check
 
-EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${BASELIB}"
-S = "${WORKDIR}/${PN}-${PV}"
+EXTRA_OECMAKE = "-DLIB_INSTALL_DIR=${baselib}"
+S = "${WORKDIR}/git"
 
 LVGL_CONFIG_LV_MEM_CUSTOM ?= "0"
 
Signature · 1 line
2.40.0
#2 lore raw
In reply to Martin Jansa
Quoted 15 lines · Martin Jansa

* use the same expression as cmake.bbclass is using:
CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} but ${baselib} should work here as well

---
 meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +0 -0
index b7f1f8bb28..2bb73c3eb7 100644

meta-oe/recipes-devtools/pahole/pahole_1.24.bb inherit cmake pkgconfig · line 23

Quoted 5 lines
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +1 -1
@@ -20,7 +20,7 @@ inherit cmake pkgconfig
 
 PACKAGECONFIG[python3] = ",,python3-core,python3-core"
 
-EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
+EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"

Can we use ${baselib} instead ?

Quoted 15 lines
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +0 -1
 FILES:${PN} =  "${bindir}/pahole \
                ${libdir}/libdwarves.so* \
--

2.40.0

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

#3 lore raw

Yes, we can I think as commit message says, but we should probably use baselib in cmake.bbclass as well for consistency.

Quoted 47 lines · Khem Raj
Quoted 3 lines · Martin Jansa

* use the same expression as cmake.bbclass is using:
CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'),

d.getVar('prefix') + '/')}

Review

Quoted 8 lines
  but ${baselib} should work here as well
---
 meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta-oe/recipes-devtools/pahole/pahole_1.24.bb

meta-oe/recipes-devtools/pahole/pahole_1.24.bb inherit cmake pkgconfig · line 23

Quoted 8 lines

index b7f1f8bb28..2bb73c3eb7 100644

meta-oe/recipes-devtools/pahole/pahole_1.24.bb +0 -1
@@ -20,7 +20,7 @@ inherit cmake pkgconfig
 
 PACKAGECONFIG[python3] = ",,python3-core,python3-core"
 
-EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release

-DLIBBPF_EMBEDDED=OFF"

meta-oe/recipes-devtools/pahole/pahole_1.24.bb inherit cmake pkgconfig · line 23

Quoted 1 line
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +1 -0
+EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'),

d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"

Can we use ${baselib} instead ?

Quoted 10 lines
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +0 -1
 FILES:${PN} =  "${bindir}/pahole \
                ${libdir}/libdwarves.so* \
--

2.40.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#101990):

https://lists.openembedded.org/g/openembedded-devel/message/101990

Quoted 3 lines

Mute This Topic: https://lists.openembedded.org/mt/98134284/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [

[email protected]]

Quoted 2 lines

-=-=-=-=-=-=-=-=-=-=-=-

#4 lore raw
Quoted 2 lines · Martin Jansa

Yes, we can I think as commit message says, but we should probably use baselib in cmake.bbclass as well for consistency.

thats fine. Just send a patch to cmake bbclass as well. I would not like to hold a better fix on that condition.

Quoted 42 lines · Khem Raj
Quoted 40 lines · Martin Jansa
Quoted 15 lines

* use the same expression as cmake.bbclass is using:
CMAKE_INSTALL_LIBDIR:PATH=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} but ${baselib} should work here as well

---
 meta-oe/recipes-devtools/pahole/pahole_1.24.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +0 -0
index b7f1f8bb28..2bb73c3eb7 100644

meta-oe/recipes-devtools/pahole/pahole_1.24.bb inherit cmake pkgconfig · line 23

Quoted 5 lines
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +1 -1
@@ -20,7 +20,7 @@ inherit cmake pkgconfig
 
 PACKAGECONFIG[python3] = ",,python3-core,python3-core"
 
-EXTRA_OECMAKE = "-D__LIB=lib -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"
+EXTRA_OECMAKE = "-D__LIB=${@os.path.relpath(d.getVar('libdir'), d.getVar('prefix') + '/')} -DCMAKE_BUILD_TYPE=Release -DLIBBPF_EMBEDDED=OFF"

Can we use ${baselib} instead ?

Quoted 15 lines
meta-oe/recipes-devtools/pahole/pahole_1.24.bb +0 -1
 FILES:${PN} =  "${bindir}/pahole \
                ${libdir}/libdwarves.so* \
--

2.40.0

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