* [Buildroot] [PATCH] package/libabseil-cpp: fix build on x86 32-bit with AES
@ 2026-09-25 13:35 Yegor Yefremov via buildroot
2026-09-28 21:43 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-09-25 13:35 UTC (permalink / raw)
To: buildroot
From: Yegor Yefremov <yegorslists@googlemail.com>
Since the bump to version 20260817.0, the AES-based hash for long
strings is used whenever __SSE4_2__ and __AES__ are defined. It relies
on _mm_cvtsi128_si64() and _mm_extract_epi64(), which are only
available on x86_64, so the build fails on 32-bit x86 for CPUs that
support SSE4.2 and AES:
hash.cc:115:32: error: '_mm_cvtsi128_si64' was not declared in this scope
Add a patch from a pending upstream pull request restricting this code
path to x86_64.
Fixes:
https://autobuild.buildroot.org/results/48198506ef76c6ebad0a802cb1fdd5270494eae1
Assisted-by: Claude:claude-opus-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
...0002-Fix-32-bit-x86-build-of-hash.cc.patch | 33 +++++++++++++++++++
1 file changed, 33 insertions(+)
create mode 100644 package/libabseil-cpp/0002-Fix-32-bit-x86-build-of-hash.cc.patch
diff --git a/package/libabseil-cpp/0002-Fix-32-bit-x86-build-of-hash.cc.patch b/package/libabseil-cpp/0002-Fix-32-bit-x86-build-of-hash.cc.patch
new file mode 100644
index 0000000000..1a289fe115
--- /dev/null
+++ b/package/libabseil-cpp/0002-Fix-32-bit-x86-build-of-hash.cc.patch
@@ -0,0 +1,33 @@
+From 66cd3bf8a9c19f03c5b0bf58031ab8176fb5608a Mon Sep 17 00:00:00 2001
+From: Jaipaul Cheernam <jaipaul.cheernam@est.tech>
+Date: Thu, 24 Sep 2026 14:59:26 +0000
+Subject: [PATCH] Fix 32-bit x86 build of hash.cc
+
+The x86 AES SIMD path in absl/hash/internal/hash.cc uses the 64-bit-only
+_mm_cvtsi128_si64 and _mm_extract_epi64 intrinsics but is gated only on
+__SSE4_2__ && __AES__, so 32-bit x86 builds fail to compile.
+
+Require __x86_64__/_M_X64 for that path, matching the existing guard in
+absl/crc/internal/crc32_x86_arm_combined_simd.h.
+
+Fixes: https://github.com/abseil/abseil-cpp/issues/2176
+Upstream: https://github.com/abseil/abseil-cpp/pull/2177
+Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
+---
+ absl/hash/internal/hash.cc | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/absl/hash/internal/hash.cc b/absl/hash/internal/hash.cc
+index 43cb561..ef85625 100644
+--- a/absl/hash/internal/hash.cc
++++ b/absl/hash/internal/hash.cc
+@@ -28,7 +28,8 @@
+
+ #ifdef ABSL_AES_INTERNAL_HAVE_X86_SIMD
+ #error ABSL_AES_INTERNAL_HAVE_X86_SIMD cannot be directly set
+-#elif defined(__SSE4_2__) && defined(__AES__)
++#elif defined(__SSE4_2__) && defined(__AES__) && \
++ (defined(__x86_64__) || defined(_M_X64))
+ #define ABSL_AES_INTERNAL_HAVE_X86_SIMD
+ #endif
+
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/libabseil-cpp: fix build on x86 32-bit with AES
2026-09-25 13:35 [Buildroot] [PATCH] package/libabseil-cpp: fix build on x86 32-bit with AES Yegor Yefremov via buildroot
@ 2026-09-28 21:43 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-28 21:43 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: buildroot
On Fri, Sep 25, 2026 at 03:35:36PM +0200, Yegor Yefremov via buildroot wrote:
> From: Yegor Yefremov <yegorslists@googlemail.com>
>
> Since the bump to version 20260817.0, the AES-based hash for long
> strings is used whenever __SSE4_2__ and __AES__ are defined. It relies
> on _mm_cvtsi128_si64() and _mm_extract_epi64(), which are only
> available on x86_64, so the build fails on 32-bit x86 for CPUs that
> support SSE4.2 and AES:
>
> hash.cc:115:32: error: '_mm_cvtsi128_si64' was not declared in this scope
>
> Add a patch from a pending upstream pull request restricting this code
> path to x86_64.
>
> Fixes:
> https://autobuild.buildroot.org/results/48198506ef76c6ebad0a802cb1fdd5270494eae1
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-28 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-25 13:35 [Buildroot] [PATCH] package/libabseil-cpp: fix build on x86 32-bit with AES Yegor Yefremov via buildroot
2026-09-28 21:43 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox