* [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: disable for the MIPS n32 ABI
@ 2026-09-17 11:37 Yegor Yefremov via buildroot
2026-09-17 11:37 ` [Buildroot] [PATCH v2 1/2] package/libabseil-cpp: " Yegor Yefremov via buildroot
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-09-17 11:37 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard
From: Yegor Yefremov <yegorslists@googlemail.com>
This is a v2 of "package/python-grpcio: disable for the MIPS n32 ABI":
https://patchwork.buildroot.org/project/buildroot/patch/20260908093538.2715153-1-yegorslists@gmail.com/
Changes v1 -> v2 (after Thomas' review):
- Added PATCH 1/2 fixing libabseil-cpp itself, which has exactly the
same problem. This automatically propagates to grpc, protobuf, re2,
webrtc-audio-processing, sysdig, falcosecurity-libs, collectd and
gst1-plugins-bad, which all already depend on
BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS.
- Added the Fixes: tags (commit + autobuild result) to both patches.
- Documented since when the problem exists, with autobuild links on the
maintained branches, so that the LTS maintainers can decide about
backports. Short version: both are broken since mips64 was first
allowed, and both still need a backport to 2025.02.x; libabseil-cpp
also to 2026.02.x.
- Answered in the python-grpcio commit log why the Buildroot-provided
abseil cannot be used instead of the bundled one: grpcio's
GRPC_PYTHON_BUILD_SYSTEM_ABSL hardcodes /usr/include and globs
/usr/lib*/libabsl_*.so, so it is unusable when cross-compiling, and
it would not help here anyway since Buildroot's abseil has the same
limitation.
Note that n32 is the default ABI for BR2_mips64/BR2_mips64el, so this
covers the default mips64 autobuilder configurations. All in-tree mips64
defconfigs use n64 and are unaffected.
Tested with olddefconfig on mips64el n32 (both packages and their reverse
dependencies disappear), mips64el n64 and x86_64 (both still selectable).
Yegor Yefremov (2):
package/libabseil-cpp: disable for the MIPS n32 ABI
package/python-grpcio: disable for the MIPS n32 ABI
package/libabseil-cpp/Config.in | 4 ++++
package/python-grpcio/Config.in | 5 +++++
2 files changed, 9 insertions(+)
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 1/2] package/libabseil-cpp: disable for the MIPS n32 ABI
2026-09-17 11:37 [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: disable for the MIPS n32 ABI Yegor Yefremov via buildroot
@ 2026-09-17 11:37 ` Yegor Yefremov via buildroot
2026-09-25 14:46 ` Raphaël Mélotte via buildroot
2026-09-17 11:37 ` [Buildroot] [PATCH v2 2/2] package/python-grpcio: " Yegor Yefremov via buildroot
2026-09-18 7:37 ` [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: " Thomas Petazzoni via buildroot
2 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-09-17 11:37 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard
From: Yegor Yefremov <yegorslists@googlemail.com>
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 <yegorslists@googlemail.com>
---
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 d13bf6e663..feb4963042 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"
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH v2 2/2] package/python-grpcio: disable for the MIPS n32 ABI
2026-09-17 11:37 [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: disable for the MIPS n32 ABI Yegor Yefremov via buildroot
2026-09-17 11:37 ` [Buildroot] [PATCH v2 1/2] package/libabseil-cpp: " Yegor Yefremov via buildroot
@ 2026-09-17 11:37 ` Yegor Yefremov via buildroot
2026-09-25 14:46 ` Raphaël Mélotte via buildroot
2026-09-18 7:37 ` [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: " Thomas Petazzoni via buildroot
2 siblings, 1 reply; 6+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-09-17 11:37 UTC (permalink / raw)
To: buildroot; +Cc: James Hilliard
From: Yegor Yefremov <yegorslists@googlemail.com>
python-grpcio builds its own bundled copy of abseil-cpp, which only
implements DirectMmap() with 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:
third_party/abseil-cpp/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");
| ~~~~~~~~~~~~~~~~~~~~~~^~~~
third_party/abseil-cpp/absl/base/internal/direct_mmap.h:130:39:
note: the comparison reduces to '(4 == 8)'
This is the same defect fixed for libabseil-cpp in the previous patch,
but the dependency added there does not help here: python-grpcio does
not use the Buildroot abseil, it compiles the copy bundled in the
tarball.
Using the Buildroot-provided abseil instead is not an option today.
setup.py does have a GRPC_PYTHON_BUILD_SYSTEM_ABSL knob, but it is
hardcoded to the build machine paths:
if BUILD_WITH_SYSTEM_ABSL:
CORE_C_FILES = filter(
lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES
)
ABSL_INCLUDE = (os.path.join("/usr", "include"),)
[...]
if BUILD_WITH_SYSTEM_ABSL:
EXTENSION_LIBRARIES += tuple(
lib.stem[3:]
for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so"))
)
i.e. it would pick up the host headers and host libraries, so it cannot
be used when cross-compiling without patching setup.py. And even with
such a patch it would not fix this build failure, since Buildroot's
abseil has the very same limitation.
So just disable the package for the n32 ABI. The o32 and n64 ABIs are
unaffected. Note that n32 is the default ABI for BR2_mips64/BR2_mips64el,
so this affects every mips64 build that does not explicitly select n64.
For the LTS maintainers: python-grpcio gained MIPS support in commit
2bfad952c374, released in 2024.02, and the autobuilders have been hitting
this ever since, already with grpcio 1.60.0, the version shipped in
2024.02:
https://autobuild.buildroot.net/results/e6cb7f473a28af8b53e7cbb8d8a582adffdeb66e/
It is still reproduced on 2025.02.x:
https://autobuild.buildroot.net/results/9cf98bff7ce05262d6ff4221953901ae5543880e/
so a backport is needed there.
Fixes: 2bfad952c374258e37ffdf46a2c450d860640e11 ("package/python-grpcio: add BR2_PACKAGE_PYTHON_GRPCIO_ARCH_SUPPORTS")
Fixes:
https://autobuild.buildroot.net/results/90405c0a3d0b2e929d5074305906e6fe3679298c/
Assisted-by: Claude:claude-opus-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
package/python-grpcio/Config.in | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/package/python-grpcio/Config.in b/package/python-grpcio/Config.in
index 6119991c7e..f52e19dc18 100644
--- a/package/python-grpcio/Config.in
+++ b/package/python-grpcio/Config.in
@@ -6,6 +6,11 @@ config BR2_PACKAGE_PYTHON_GRPCIO_ARCH_SUPPORTS
default y if BR2_i386 || BR2_x86_64
default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
default y if BR2_riscv
+ # The bundled abseil-cpp only implements DirectMmap() for the o32
+ # ABI on MIPS, and its 64-bit fallback fails to build with the n32
+ # ABI, where long is 32-bit. See
+ # third_party/abseil-cpp/absl/base/internal/direct_mmap.h
+ depends on !BR2_MIPS_NABI32
config BR2_PACKAGE_PYTHON_GRPCIO
bool "python-grpcio"
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: disable for the MIPS n32 ABI
2026-09-17 11:37 [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: disable for the MIPS n32 ABI Yegor Yefremov via buildroot
2026-09-17 11:37 ` [Buildroot] [PATCH v2 1/2] package/libabseil-cpp: " Yegor Yefremov via buildroot
2026-09-17 11:37 ` [Buildroot] [PATCH v2 2/2] package/python-grpcio: " Yegor Yefremov via buildroot
@ 2026-09-18 7:37 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-09-18 7:37 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: buildroot, James Hilliard
On Thu, Sep 17, 2026 at 01:37:18PM +0200, Yegor Yefremov via buildroot wrote:
> Yegor Yefremov (2):
> package/libabseil-cpp: disable for the MIPS n32 ABI
> package/python-grpcio: disable for the MIPS n32 ABI
Both applied, thanks!
Thomas
--
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] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/libabseil-cpp: disable for the MIPS n32 ABI
2026-09-17 11:37 ` [Buildroot] [PATCH v2 1/2] package/libabseil-cpp: " Yegor Yefremov via buildroot
@ 2026-09-25 14:46 ` Raphaël Mélotte via buildroot
0 siblings, 0 replies; 6+ messages in thread
From: Raphaël Mélotte via buildroot @ 2026-09-25 14:46 UTC (permalink / raw)
To: buildroot, Yegor Yefremov; +Cc: Raphaël Mélotte
In reply of:
> 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 <yegorslists@googlemail.com>
Applied to 2025.02.x, 2026.08.x. Thanks
> ---
> 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 d13bf6e663..feb4963042 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"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Buildroot] [PATCH v2 2/2] package/python-grpcio: disable for the MIPS n32 ABI
2026-09-17 11:37 ` [Buildroot] [PATCH v2 2/2] package/python-grpcio: " Yegor Yefremov via buildroot
@ 2026-09-25 14:46 ` Raphaël Mélotte via buildroot
0 siblings, 0 replies; 6+ messages in thread
From: Raphaël Mélotte via buildroot @ 2026-09-25 14:46 UTC (permalink / raw)
To: buildroot, Yegor Yefremov; +Cc: Raphaël Mélotte
In reply of:
> python-grpcio builds its own bundled copy of abseil-cpp, which only
> implements DirectMmap() with 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:
>
> third_party/abseil-cpp/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");
> | ~~~~~~~~~~~~~~~~~~~~~~^~~~
> third_party/abseil-cpp/absl/base/internal/direct_mmap.h:130:39:
> note: the comparison reduces to '(4 == 8)'
>
> This is the same defect fixed for libabseil-cpp in the previous patch,
> but the dependency added there does not help here: python-grpcio does
> not use the Buildroot abseil, it compiles the copy bundled in the
> tarball.
>
> Using the Buildroot-provided abseil instead is not an option today.
> setup.py does have a GRPC_PYTHON_BUILD_SYSTEM_ABSL knob, but it is
> hardcoded to the build machine paths:
>
> if BUILD_WITH_SYSTEM_ABSL:
> CORE_C_FILES = filter(
> lambda x: "third_party/abseil-cpp" not in x, CORE_C_FILES
> )
> ABSL_INCLUDE = (os.path.join("/usr", "include"),)
> [...]
> if BUILD_WITH_SYSTEM_ABSL:
> EXTENSION_LIBRARIES += tuple(
> lib.stem[3:]
> for lib in sorted(pathlib.Path("/usr").glob("lib*/libabsl_*.so"))
> )
>
> i.e. it would pick up the host headers and host libraries, so it cannot
> be used when cross-compiling without patching setup.py. And even with
> such a patch it would not fix this build failure, since Buildroot's
> abseil has the very same limitation.
>
> So just disable the package for the n32 ABI. The o32 and n64 ABIs are
> unaffected. Note that n32 is the default ABI for BR2_mips64/BR2_mips64el,
> so this affects every mips64 build that does not explicitly select n64.
>
> For the LTS maintainers: python-grpcio gained MIPS support in commit
> 2bfad952c374, released in 2024.02, and the autobuilders have been hitting
> this ever since, already with grpcio 1.60.0, the version shipped in
> 2024.02:
>
> https://autobuild.buildroot.net/results/e6cb7f473a28af8b53e7cbb8d8a582adffdeb66e/
>
> It is still reproduced on 2025.02.x:
>
> https://autobuild.buildroot.net/results/9cf98bff7ce05262d6ff4221953901ae5543880e/
>
> so a backport is needed there.
>
> Fixes: 2bfad952c374258e37ffdf46a2c450d860640e11 ("package/python-grpcio: add BR2_PACKAGE_PYTHON_GRPCIO_ARCH_SUPPORTS")
> Fixes:
> https://autobuild.buildroot.net/results/90405c0a3d0b2e929d5074305906e6fe3679298c/
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Applied to 2025.02.x, 2026.08.x. Thanks
> ---
> package/python-grpcio/Config.in | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/package/python-grpcio/Config.in b/package/python-grpcio/Config.in
> index 6119991c7e..f52e19dc18 100644
> --- a/package/python-grpcio/Config.in
> +++ b/package/python-grpcio/Config.in
> @@ -6,6 +6,11 @@ config BR2_PACKAGE_PYTHON_GRPCIO_ARCH_SUPPORTS
> default y if BR2_i386 || BR2_x86_64
> default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> default y if BR2_riscv
> + # The bundled abseil-cpp only implements DirectMmap() for the o32
> + # ABI on MIPS, and its 64-bit fallback fails to build with the n32
> + # ABI, where long is 32-bit. See
> + # third_party/abseil-cpp/absl/base/internal/direct_mmap.h
> + depends on !BR2_MIPS_NABI32
>
> config BR2_PACKAGE_PYTHON_GRPCIO
> bool "python-grpcio"
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-25 14:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-17 11:37 [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: disable for the MIPS n32 ABI Yegor Yefremov via buildroot
2026-09-17 11:37 ` [Buildroot] [PATCH v2 1/2] package/libabseil-cpp: " Yegor Yefremov via buildroot
2026-09-25 14:46 ` Raphaël Mélotte via buildroot
2026-09-17 11:37 ` [Buildroot] [PATCH v2 2/2] package/python-grpcio: " Yegor Yefremov via buildroot
2026-09-25 14:46 ` Raphaël Mélotte via buildroot
2026-09-18 7:37 ` [Buildroot] [PATCH v2 0/2] package/{libabseil-cpp, python-grpcio}: " 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