From 098e81781e04299d86c037833941393cc7749b66 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Wed, 11 Sep 2024 13:24:21 +0100 Subject: [PATCH] HPCC-31503 OpenBLAS ELF alignment issue This is not a fix rather working around the issue by disabling the "dynamic-arch" feature. The issue can occur with binutils version 2.38 More info can be found @ https://github.com/OpenMathLib/OpenBLAS/wiki/Faq#ELFoffset and https://github.com/OpenMathLib/OpenBLAS/issues/3708 Signed-off-by: Gordon Smith --- cmake_modules/options.cmake | 1 + cmake_modules/plugins.cmake | 6 ++++++ vcpkg.json.in | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/cmake_modules/options.cmake b/cmake_modules/options.cmake index 6a39ffd369e..e39fafd123a 100644 --- a/cmake_modules/options.cmake +++ b/cmake_modules/options.cmake @@ -71,6 +71,7 @@ option(INSTALL_VCPKG_CATALOG "Install vcpkg-catalog.txt" ON) option(PORTALURL "Set url to hpccsystems portal download page") option(PROFILING "Set to true if planning to profile so stacks are informative" OFF) option(COLLECT_SERVICE_METRICS "Set to true to gather metrics for HIDL services by default" OFF) +option(VCPKG_ECLBLAS_DYNAMIC_ARCH "Set to ON to build eclblas with dynamic architecture" ON) set(CUSTOM_LABEL "" CACHE STRING "Appends a custom label to the final package name") diff --git a/cmake_modules/plugins.cmake b/cmake_modules/plugins.cmake index 228e43a7760..9d52894ac0c 100644 --- a/cmake_modules/plugins.cmake +++ b/cmake_modules/plugins.cmake @@ -155,6 +155,12 @@ if (USE_ZLIB) set(VCPKG_ZLIB "${VCPKG_INCLUDE}") endif() +if (VCPKG_ECLBLAS_DYNAMIC_ARCH) + set(VCPKG_ECLBLAS_DYNAMIC_ARCH_FEATURE "\"dynamic-arch\",") +else () + set(VCPKG_ECLBLAS_DYNAMIC_ARCH_FEATURE "") +endif() + configure_file("${HPCC_SOURCE_DIR}/vcpkg.json.in" "${HPCC_SOURCE_DIR}/vcpkg.json") endif() diff --git a/vcpkg.json.in b/vcpkg.json.in index 310ac2cb38c..23ac74fa381 100644 --- a/vcpkg.json.in +++ b/vcpkg.json.in @@ -150,7 +150,7 @@ { "name": "openblas", "features": [ - "dynamic-arch", + @VCPKG_ECLBLAS_DYNAMIC_ARCH_FEATURE@ "threads" ], "platform": "@VCPKG_ECLBLAS@ & !windows"