[Buildroot] [git commit branch/next] package/python-gymnasium: add missing toolchain dependencies for numpy

Julien Olivain ju.o at free.fr
Fri May 15 13:13:56 UTC 2026


commit: https://gitlab.com/buildroot.org/buildroot/-/commit/40ceef27819a51263310fc1c81f7bbe3d4e2fab5
branch: https://gitlab.com/buildroot.org/buildroot/-/tree/next

python-gymnasium selects python-numpy, but does not inherit the toolchain
requirements of numpy, which can lead to automatic selection of numpy
without proper toolchain support (C++, gcc >= 9, glibc/musl).

Fix this by adding all necessary toolchain dependencies that numpy
requires. Also update the help URL and add a comment explaining the
toolchain requirements.

Signed-off-by: Xukai Wang <kingxukai at zohomail.com>
Signed-off-by: Julien Olivain <ju.o at free.fr>
---
 package/python-gymnasium/Config.in | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

diff --git a/package/python-gymnasium/Config.in b/package/python-gymnasium/Config.in
index 19185f267c..b93fe6ccc8 100644
--- a/package/python-gymnasium/Config.in
+++ b/package/python-gymnasium/Config.in
@@ -1,11 +1,22 @@
 config BR2_PACKAGE_PYTHON_GYMNASIUM
 	bool "python-gymnasium"
-	select BR2_PACKAGE_PYTHON_CLOUDPICKLE # runtime
-	select BR2_PACKAGE_PYTHON_FARAMA_NOTIFICATIONS # runtime
-	select BR2_PACKAGE_PYTHON_NUMPY # runtime
-	select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS # runtime
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
+	depends on BR2_INSTALL_LIBSTDCPP  # python-numpy
+	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL  # python-numpy
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9  # python-numpy
+	depends on BR2_HOST_GCC_AT_LEAST_9  # host-python-numpy
+	select BR2_PACKAGE_PYTHON_CLOUDPICKLE  # runtime
+	select BR2_PACKAGE_PYTHON_FARAMA_NOTIFICATIONS  # runtime
+	select BR2_PACKAGE_PYTHON_NUMPY  # runtime
+	select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS  # runtime
 	help
 	  A standard API for reinforcement learning and a diverse set
 	  of reference environments (formerly Gym).
 
-	  https://farama.org
+	  https://gymnasium.farama.org
+
+comment "python-gymnasium needs a glibc or musl toolchain w/ C++, gcc >= 9"
+	depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
+	depends on !BR2_INSTALL_LIBSTDCPP || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_9 || \
+		!(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)


More information about the buildroot mailing list