From cf9a58b042feca2366107593904c14331ad5799a Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 22 Mar 2026 10:07:08 +0100 Subject: [PATCH] package/openblas: fix build Buildroot commit b08ac7636dc7b2753592989dc5fe73959e0f6507 bumped the package to version 0.3.31 and introduced a build error linktest.c:(.text.startup+0x6f4): undefined reference to `openblas_set_threads_callback_function' which according to https://github.com/OpenMathLib/OpenBLAS/issues/5607 was introduced by upstream commit https://github.com/OpenMathLib/OpenBLAS/commit/879497990f42e6dcfa370bcbf478cc5674158336 that was first included in version 0.3.31. This patch adds another upstream commit to fix the problem. Fixes: https://autobuild.buildroot.net/results/7d8/7d80a912ddda01acd109786641df02ad826399f6/ Signed-off-by: Bernd Kuhls Signed-off-by: Julien Olivain --- ...allback-replacement-hook-in-singleth.patch | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 package/openblas/0002-Include-thread-callback-replacement-hook-in-singleth.patch diff --git a/package/openblas/0002-Include-thread-callback-replacement-hook-in-singleth.patch b/package/openblas/0002-Include-thread-callback-replacement-hook-in-singleth.patch new file mode 100644 index 0000000000..7ea199fb2e --- /dev/null +++ b/package/openblas/0002-Include-thread-callback-replacement-hook-in-singleth.patch @@ -0,0 +1,53 @@ +From 874243421298866d116e1e8bdbd7e0ed4e31e4f6 Mon Sep 17 00:00:00 2001 +From: Martin Kroeker +Date: Sun, 18 Jan 2026 19:55:40 +0100 +Subject: [PATCH] Include thread callback replacement hook in singlethreaded + builds as well + +Upstream: https://github.com/OpenMathLib/OpenBLAS/commit/874243421298866d116e1e8bdbd7e0ed4e31e4f6 + +Signed-off-by: Bernd Kuhls +--- + driver/others/CMakeLists.txt | 2 +- + driver/others/Makefile | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/driver/others/CMakeLists.txt b/driver/others/CMakeLists.txt +index a07a0baf99..72abdc4ee4 100644 +--- a/driver/others/CMakeLists.txt ++++ b/driver/others/CMakeLists.txt +@@ -27,7 +27,6 @@ if (USE_THREAD) + ${BLAS_SERVER} + divtable.c # TODO: Makefile has -UDOUBLE + blas_l1_thread.c +- blas_server_callback.c + ) + + if (NOT NO_AFFINITY) +@@ -42,6 +41,7 @@ set(COMMON_SOURCES + openblas_env.c + openblas_get_num_procs.c + openblas_get_num_threads.c ++ blas_server_callback.c + ) + + # these need to have NAME/CNAME set, so use GenerateNamedObjects, but don't use standard name mangling +diff --git a/driver/others/Makefile b/driver/others/Makefile +index 719d617c45..fbd016e6b0 100644 +--- a/driver/others/Makefile ++++ b/driver/others/Makefile +@@ -1,12 +1,12 @@ + TOPDIR = ../.. + include ../../Makefile.system + +-COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX) openblas_get_num_threads.$(SUFFIX) openblas_get_num_procs.$(SUFFIX) openblas_get_config.$(SUFFIX) openblas_get_parallel.$(SUFFIX) openblas_error_handle.$(SUFFIX) openblas_env.$(SUFFIX) ++COMMONOBJS = memory.$(SUFFIX) xerbla.$(SUFFIX) c_abs.$(SUFFIX) z_abs.$(SUFFIX) openblas_set_num_threads.$(SUFFIX) openblas_get_num_threads.$(SUFFIX) openblas_get_num_procs.$(SUFFIX) openblas_get_config.$(SUFFIX) openblas_get_parallel.$(SUFFIX) openblas_error_handle.$(SUFFIX) openblas_env.$(SUFFIX) blas_server_callback.$(SUFFIX) + + #COMMONOBJS += slamch.$(SUFFIX) slamc3.$(SUFFIX) dlamch.$(SUFFIX) dlamc3.$(SUFFIX) + + ifdef SMP +-COMMONOBJS += blas_server.$(SUFFIX) divtable.$(SUFFIX) blasL1thread.$(SUFFIX) blas_server_callback.$(SUFFIX) ++COMMONOBJS += blas_server.$(SUFFIX) divtable.$(SUFFIX) blasL1thread.$(SUFFIX) + ifneq ($(NO_AFFINITY), 1) + COMMONOBJS += init.$(SUFFIX) + endif