From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:43 +0000 (-0700) Subject: Stop building open-vm-tools for LINUX systems with glibc < 2.12. X-Git-Tag: stable-10.2.0~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6091407c4a7e191925bb1b668a99df4ca7e2fab5;p=thirdparty%2Fopen-vm-tools.git Stop building open-vm-tools for LINUX systems with glibc < 2.12. Implemented a check for glibc version and abort if the detected version is lesser than 2.12 (This affects RHEL5 and older generations). Implemented a config switch '--disable-glibc-check', which when specified, will skip checking for compatible glibc version. Modified the tools-pkg.make file to specify --disable-glibc-check while executing "./configure" for open-vm-tools. Note: glibc check is done only for Linux systems. --- diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index 37291f0f5..8e0c1341f 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -132,6 +132,34 @@ case "$host_os" in esac osVersion="`getOsVersion`" +AC_ARG_ENABLE( + glibc-check, + AS_HELP_STRING( + [--disable-glibc-check], + [Skip checking the glibc version on the system. (off by default)]), + [enable_glibc_check=$enableval], + [enable_glibc_check="yes"]) + +if test "x$enable_glibc_check" != "xno" ; then + if test "x$os" = "xlinux" ; then + libc_ver=`ldd --version 2>/dev/null | head -1 | sed 's/.* //;q'` + + if test "x$libc_ver" = "x"; then + AC_MSG_ERROR(["Failed to detect glibc version installed in the system."]) + fi + + libc_ver_mjr=`expr "$libc_ver" : "\([[0-9]]*\)"` + libc_ver_mnr=`expr "$libc_ver" : "[[0-9]]*\.\([[0-9]]*\)"` + libc_ver_num=`expr $libc_ver_mjr \* 1000 + $libc_ver_mnr` + + if test "$libc_ver_num" -lt 2012; then + AC_MSG_ERROR(["glibc version $libc_ver detected. +This version of open-vm-tools requires glibc version 2.12 or later. +Please use an older version of open-vm-tools for this system."]) + fi + fi +fi + AC_ARG_WITH([kernel-modules], [AS_HELP_STRING([--with-kernel-modules], [compile and install the kernel modules])],