Skip to contentSkip to conversation

assimp: Do not treat warnings as errors

PATCH New Khem Raj 1 participant 2 messages Sep 7

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 assimp: Do not treat warnings as errors

ASSIMP_WARNINGS_AS_ERRORS defaults to ON, which builds the library with -Wall -Werror. That leaves the build at the mercy of whatever a new compiler adds to -Wall: clang 23 enables -Wunused-template there, and the bundled openddlparser copy carries a template that is never called, so the build fails with

contrib/openddlparser/code/DDLNode.cpp:34:20: error: unused function template 'releaseDataType' [-Werror,-Wunused-template]

Neither assimp master nor openddl-parser upstream has removed that dead template, and there is no pending pull request for it, so there is nothing to backport. Debian, Fedora, Arch and Alpine all turn this option off rather than patch individual warnings; do the same, which also keeps the next addition to -Wall from breaking the build again.

AI-Generated: Uses Claude Code

---
 meta-oe/recipes-graphics/assimp/assimp_git.bb | 1 +
 1 file changed, 1 insertion(+)
meta-oe/recipes-graphics/assimp/assimp_git.bb +1 -0
index b2d7a573de..561ef50508 100644
@@ -25,6 +25,7 @@ EXTRA_OECMAKE = "\
     -DCMAKE_INSTALL_LIBDIR=${baselib} \
     -DCMAKE_SKIP_RPATH=ON \
     -DCMAKE_BUILD_WITH_INSTALL_RPATH=OFF \
+    -DASSIMP_WARNINGS_AS_ERRORS=OFF \
 "
 
 do_install:append() {
author
#1 lore raw

PATCH 2/2 bpftrace: Upgrade to 0.26.1

Fix build with LLVM 23

---
 ....txt-allow-to-set-BISON_FLAGS-like-l.patch | 39 -------------------
 ...lderBPF-Fix-HasTerminator-on-LLVM-23.patch | 38 ++++++++++++++++++
 ...5-CMakeLists-Add-support-for-LLVM-23.patch | 36 +++++++++++++++++
 ...{bpftrace_0.25.1.bb => bpftrace_0.26.1.bb} | 14 +++----
 4 files changed, 80 insertions(+), 47 deletions(-)
 delete mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0004-IRBuilderBPF-Fix-HasTerminator-on-LLVM-23.patch
 create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0005-CMakeLists-Add-support-for-LLVM-23.patch
 rename meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/{bpftrace_0.25.1.bb => bpftrace_0.26.1.bb} (87%)
meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch deleted +0 -39
deleted file mode 100644
index c9e1749dd5..0000000000
@@ -1,39 +0,0 @@
-From ce5d908bb1256ede680fbfd521f087060a567dca Mon Sep 17 00:00:00 2001
-From: Martin Jansa <[email protected]>
-Date: Tue, 3 Sep 2024 14:17:51 +0200
-Subject: [PATCH] CMakeLists.txt: allow to set BISON_FLAGS like -l
-
-Signed-off-by: Martin Jansa <[email protected]>
-
-Upstream-Status: Pending
----
- CMakeLists.txt | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -108,16 +108,21 @@ include_directories(SYSTEM ${LIBCEREAL_I
-
- find_package(BISON REQUIRED)
- find_package(FLEX REQUIRED)
-+
-+# avoid buildpaths in generated #line statements and allow to pass --file-prefix-map=OLD=NEW
-+set(BISON_FLAGS "${BISON_FLAGS} -l")
-+set(FLEX_FLAGS "${FLEX_FLAGS} -L")
-+
- # `parser_class_name` is deprecated and generates warnings in bison >= 3.3.
- # But `api.parser.class` is not supported in bison < 3.3. So we must inject
- # the %define based on the bison version here.
- if(${BISON_VERSION} VERSION_GREATER_EQUAL 3.3)
--  set(BISON_FLAGS "-Dapi.parser.class={Parser} -Wcounterexamples")
-+  set(BISON_FLAGS "${BISON_FLAGS} -Dapi.parser.class={Parser} -Wcounterexamples")
- else()
--  set(BISON_FLAGS "-Dparser_class_name={Parser} -Wcounterexamples")
-+  set(BISON_FLAGS "${BISON_FLAGS} -Dparser_class_name={Parser} -Wcounterexamples")
- endif()
- bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc COMPILE_FLAGS ${BISON_FLAGS} VERBOSE)
--flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc)
-+flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc COMPILE_FLAGS ${FLEX_FLAGS})
- add_flex_bison_dependency(flex_lexer bison_parser)
- add_library(parser STATIC ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS})
- target_compile_options(parser PRIVATE "-w")
meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0004-IRBuilderBPF-Fix-HasTerminator-on-LLVM-23.patch new file +38 -0
new file mode 100644
index 0000000000..f224ca3d81
@@ -0,0 +1,38 @@
+From d09a791bb88c69c34dd2e294213ed2a47568267f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Viktor=20Mal=C3=ADk?= <[email protected]>
+Date: Tue, 18 Aug 2026 21:47:37 +0200
+Subject: [PATCH] IRBuilderBPF: Fix HasTerminator on LLVM 23 (#5298)
+
+LLVM 23 changed the implementation of BasicBlock::getTerminator(), which
+now doesn't check that a basic block actually has a terminator and
+should only be called after a successful BasicBlock::hasTerminator()
+check. Add the check to IRBuilderBPF::HasTerminator() for LLVM 23.
+
+Signed-off-by: Viktor Malik <[email protected]>
+
+Upstream-Status: Backport [https://github.com/bpftrace/bpftrace/commit/d09a791bb88c69c34dd2e294213ed2a47568267f]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/ast/irbuilderbpf.cpp | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/ast/irbuilderbpf.cpp b/src/ast/irbuilderbpf.cpp
+index fb94f9bdde6b..2a2ac6209c19 100644
+--- a/src/ast/irbuilderbpf.cpp
++++ b/src/ast/irbuilderbpf.cpp
+@@ -2512,7 +2512,13 @@ llvm::Value *IRBuilderBPF::CreateCheckedBinop(Binop &binop,
+ bool IRBuilderBPF::HasTerminator()
+ {
+   BasicBlock *current_block = GetInsertBlock();
+-  return current_block && current_block->getTerminator();
++  if (!current_block)
++    return false;
++#if LLVM_VERSION_MAJOR >= 23
++  if (!current_block->hasTerminator())
++    return false;
++#endif
++  return current_block->getTerminator();
+ }
+
+ } // namespace bpftrace::ast
meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0005-CMakeLists-Add-support-for-LLVM-23.patch new file +36 -0
new file mode 100644
index 0000000000..b5f7f0e3dc
@@ -0,0 +1,36 @@
+From f0768d0a3d08b4ba7fbc85f874fbe905cd4a6880 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Viktor=20Mal=C3=ADk?= <[email protected]>
+Date: Wed, 19 Aug 2026 09:25:25 +0200
+Subject: [PATCH] Add support for LLVM 23 (#5299)
+
+- Bump MAX_LLVM_MAJOR
+- Add new Nix targets
+- Bump BCC version to the commit fixing LLVM 23 build
+- Adjust CI jobs
+
+Also drop support for LLVM 18. Since the Nix fuzz shell depended on LLVM
+18, move that to 22.
+
+Signed-off-by: Viktor Malik <[email protected]>
+
+Only the CMakeLists.txt hunk is backported here; the Nix and CI changes of
+the original commit do not apply to an OE build, and the BCC bump is
+handled by the bcc recipe.
+
+Upstream-Status: Backport [https://github.com/bpftrace/bpftrace/commit/f0768d0a3d08b4ba7fbc85f874fbe905cd4a6880]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index baea14e65c60..a781bf347d61 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -156,7 +156,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
+   # releases.
+   set(MAX_LLVM_MAJOR 999)
+ else()
+-  set(MAX_LLVM_MAJOR 22)
++  set(MAX_LLVM_MAJOR 23)
+ endif()
+
+ if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR}))
meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.26.1.bb renamed from meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.25.1.bb +6 -8
similarity index 87%
rename from meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.25.1.bb
rename to meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.26.1.bb
index 7daf02ba1c..44e32cb9a4 100644
@@ -3,9 +3,7 @@ HOMEPAGE = "https://github.com/iovisor/bpftrace"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-DEPENDS += "bison-native \
-            flex-native \
-            gzip-native \
+DEPENDS += "gzip-native \
             elfutils \
             bpftool-native \
             bcc \
@@ -13,15 +11,16 @@ DEPENDS += "bison-native \
             libbpf \
             xxd-native \
             "
-DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-native', '', d)}"
+DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-native zip-native', '', d)}"
 
-SRC_URI = "git://github.com/iovisor/bpftrace;branch=release/0.25.x;protocol=https;tag=v${PV} \
+SRC_URI = "git://github.com/iovisor/bpftrace;branch=release/0.26.x;protocol=https;tag=v${PV} \
            file://run-ptest \
-           file://0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \
            file://0001-cmake-BuildBPF.cmake-introduce-DEBUG_PREFIX_MAP.patch \
            file://0003-cmake-BuildBPF.cmake-link-data-source-binary-without.patch \
+           file://0004-IRBuilderBPF-Fix-HasTerminator-on-LLVM-23.patch \
+           file://0005-CMakeLists-Add-support-for-LLVM-23.patch \
 "
-SRCREV = "e491811e5d648288c01f42ce087967b271f504a0"
+SRCREV = "1bac8a8daad6e0aa579980e877d0c9d5fc296593"
 
 inherit bash-completion cmake ptest pkgconfig
 
@@ -64,7 +63,6 @@ EXTRA_OECMAKE = " \
     -DUSE_SYSTEM_BPF_BCC=ON \
     -DUSE_SYSTEM_LIBBPF=ON \
     -DENABLE_MAN=OFF \
-    -DBISON_FLAGS='--file-prefix-map=${WORKDIR}=' \
 "
 
 PACKAGES:remove:powerpc64 = "${PN}-ptest"