Skip to contentSkip to conversation

python3-lief: Disable ccache

PATCH New Khem Raj 1 participant 3 messages Feb 6, 2025

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 python3-lief: Disable ccache

* ccache with OE does not work always

* Use RelWithDebInfo instead of Debug build type in cmake Some modules are built in /tmp and if /tmp is small < 2GB the build may run out of space especially with huge debug info files

---
 ...-api-python-config-default.toml-Debug.patch | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
meta-python/recipes-devtools/python/python3-lief/0002-api-python-config-default.toml-Debug.patch +10 -8
index bc38a63726..cb8d4e921d 100644
@@ -12,17 +12,19 @@ Signed-off-by: Leon Anavi <[email protected]>
  api/python/config-default.toml | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/api/python/config-default.toml b/api/python/config-default.toml
-index 519bc046..49477864 100644
 --- a/api/python/config-default.toml
 +++ b/api/python/config-default.toml
-@@ -1,5 +1,5 @@
+@@ -1,8 +1,11 @@
  [lief.build]
 -type          = "Release"
-+type          = "Debug"
- cache         = true
+-cache         = true
++type          = "RelWithDebInfo"
++cache         = false
  ninja         = true
  parallel-jobs = 0
--- 
-2.39.5
-
++extra-cmake-opt  = [
++  "-DCMAKE_MODULE_PATH=/cmake/linux/",
++]
+ 
+ [lief.formats]
+ elf     = true
author
#1 lore raw

PATCH 2/3 python3-lief: Disable build on 32bit x86

Asserts fail, need upstream to validate the right approach to fix it [1]

[1] https://github.com/lief-project/LIEF/commit/3def579f75965aa19c021d840a759bce2afc0a31#r152197203

---
 meta-python/recipes-devtools/python/python3-lief_0.16.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-lief_0.16.2.bb +2 -0
index 47216d4e0e..ff3010de14 100644
@@ -26,5 +26,7 @@ DEPENDS += "\
     ninja-native \
     ccache-native \
 "
+# https://github.com/lief-project/LIEF/commit/3def579f75965aa19c021d840a759bce2afc0a31#r152197203
+COMPATIBLE_HOST:x86 = "null"
 
 BBCLASSEXTEND = "native nativesdk"
author
#2 lore raw

PATCH 3/3 python3-lief: Define LIEF_BUILD_DIR as B

In reply to Khem Raj

It avoids building everything in systems /tmp dir

---
 meta-python/recipes-devtools/python/python3-lief_0.16.2.bb | 2 ++
 1 file changed, 2 insertions(+)
meta-python/recipes-devtools/python/python3-lief_0.16.2.bb +2 -0
index ff3010de14..07b54f7068 100644
@@ -16,6 +16,8 @@ PV .= "+git"
 S = "${WORKDIR}/git"
 PEP517_SOURCE_PATH = "${S}/api/python"
 
+export LIEF_BUILD_DIR = "${B}"
+
 inherit python_setuptools_build_meta
 
 DEPENDS += "\