From: David Mulder Date: Wed, 28 Aug 2024 19:34:09 +0000 (-0600) Subject: glibc needs to be at least vers 2.32 for rust X-Git-Tag: tdb-1.4.13~871 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=221447d5ba7bdca25f9a7b3975af0e0c6aa6ee19;p=thirdparty%2Fsamba.git glibc needs to be at least vers 2.32 for rust The libc crate won't build on versions older than 2.32. Signed-off-by: David Mulder Reviewed-by: Alexander Bokovoy --- diff --git a/script/autobuild.py b/script/autobuild.py index 700e1148bc8..972bf127a6e 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -20,6 +20,13 @@ from sysconfig import get_path import platform import ssl +def get_libc_version(): + import ctypes + libc = ctypes.CDLL("libc.so.6") + gnu_get_libc_version = libc.gnu_get_libc_version + gnu_get_libc_version.restype = ctypes.c_char_p + return gnu_get_libc_version().decode() + import logging try: @@ -170,10 +177,14 @@ builddirs = { ctdb_configure_params = " --enable-developer ${PREFIX}" samba_configure_params = " ${ENABLE_COVERAGE} ${PREFIX} --with-profiling-data" -# We cannot configure himmelblau on old systems missing openssl 3 +# We cannot configure himmelblau on old systems missing openssl 3 or with glibc +# older than version 2.32. himmelblau_configure_params = '' -rust_configure_param = ' --enable-rust' -if ssl.OPENSSL_VERSION_INFO[0] >= 3: +rust_configure_param = '' +glibc_vers = float('.'.join(get_libc_version().split('.')[:2])) +if glibc_vers >= 2.32: + rust_configure_param = ' --enable-rust' +if ssl.OPENSSL_VERSION_INFO[0] >= 3 and rust_configure_param: himmelblau_configure_params = rust_configure_param + ' --with-himmelblau' samba_libs_envvars = "PYTHONPATH=${PYTHON_PREFIX}:$PYTHONPATH"