From ac1ca473b5ed87e996dabd214dc1334ea07bd5f3 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 17 Sep 2026 13:37:19 +0200 Subject: [PATCH] package/libabseil-cpp: disable for the MIPS n32 ABI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit absl::base_internal::DirectMmap() only implements mmap() via mmap2 for the o32 ABI on MIPS: #if ... (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI32) || ... With the n32 ABI, the "remaining 64-bit architectures" fallback is selected instead, which fails to build because long is 32-bit there: absl/base/internal/direct_mmap.h: In function 'void* absl::lts_20260107::base_internal::DirectMmap(void*, size_t, int, int, int, off_t)': absl/base/internal/direct_mmap.h:130:39: error: static assertion failed: Platform is not 64-bit 130 | static_assert(sizeof(unsigned long) == 8, "Platform is not 64-bit"); | ~~~~~~~~~~~~~~~~~~~~~~^~~~ absl/base/internal/direct_mmap.h:130:39: note: the comparison reduces to '(4 == 8)' direct_mmap.h is included by absl/base/internal/low_level_alloc.cc and absl/base/internal/poison.cc, which are always built, so the failure is unconditional. Upstream abseil has no support for the n32 ABI, so disable the package for that ABI. Since n32 is the default ABI for BR2_mips64/BR2_mips64el, this affects every mips64 build that does not explicitly select n64. The o32 (BR2_MIPS_OABI32) and n64 (BR2_MIPS_NABI64) ABIs are unaffected, and all in-tree mips64 defconfigs use n64. For the LTS maintainers: the ABI list in direct_mmap.h is identical in abseil 20200225 (the version in tree when the arch dependencies were introduced) and in the current 20260817.0, so the failure has existed ever since mips64 was allowed. It is still reproduced on all maintained branches, e.g.: 2026.02.x https://autobuild.buildroot.net/results/5818407a73cfd3371cd1f726a24df6ceb9afa42d/ 2025.02.x https://autobuild.buildroot.net/results/5065bda3b91bdbee53559dd97af8ab5a63a1e112/ so a backport is needed there. Fixes: ae0557403a3a4cbf5354f0ab1784a08623382e5e ("package/libabseil-cpp: add BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS") Fixes: https://autobuild.buildroot.net/results/f375584f3721d61238b9e43d9926e037802f6141/ Assisted-by: Claude:claude-opus-5 Signed-off-by: Yegor Yefremov Signed-off-by: Thomas Petazzoni (cherry picked from commit 263cfb165e7e3c95ebbac7def2a8729ff0271bcd) Signed-off-by: Raphaël Mélotte --- package/libabseil-cpp/Config.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/libabseil-cpp/Config.in b/package/libabseil-cpp/Config.in index 7b65ec40d0..0750dc5495 100644 --- a/package/libabseil-cpp/Config.in +++ b/package/libabseil-cpp/Config.in @@ -14,6 +14,10 @@ config BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS default y if BR2_sparc || BR2_sparc64 default y if BR2_x86_64 depends on BR2_TOOLCHAIN_HAS_UCONTEXT + # absl/base/internal/direct_mmap.h only implements DirectMmap() + # with mmap2 for the o32 ABI on MIPS, and its 64-bit fallback + # fails to build with the n32 ABI, where long is 32-bit + depends on !BR2_MIPS_NABI32 config BR2_PACKAGE_LIBABSEIL_CPP bool "libabseil-cpp"