Configuration issues on Solaris 11.4
Summary
gmake configure
for BIND 9.11.31 failed to complete cleanly without modification to configure.ac.
In addition the summary failed to display compiler version.
BIND version used
9.11.31
Steps to reproduce
$ gmake configure
(/bin/rm -f -rf /builds/bind/components/bind/build/amd64 ; /bin/mkdir -p /builds/bind/components/bind/build/amd64)
(cd /builds/bind/components/bind/build/amd64 ; /usr/bin/env \
CONFIG_SHELL="/bin/bash" PKG_CONFIG_PATH="/usr/lib/amd64/pkgconfig" \
CC="/opt/developerstudio12.6/bin/cc"
CXX="/opt/developerstudio12.6/bin/CC" \
PATH="/usr/bin/amd64:/usr/bin:/usr/gnu/bin" \
CC_FOR_BUILD="/opt/developerstudio12.6/bin/cc -m64" \
CXX_FOR_BUILD="/opt/developerstudio12.6/bin/CC -m64" \
CPPFLAGS="-m64" "ac_cv_func_realloc_0_nonnull=yes" \
"NM=/usr/gnu/bin/nm" INTLTOOL_PERL="/usr/perl5/5.22/bin/perl"
CFLAGS="-m64 -xO4 -g -preserve_argvalues=complete -xchip=generic -Ui386 -U__i386 -xregs=no%frameptr -mt" \
CXXFLAGS="-norunpath -m64 -xO4 -g -preserve_argvalues=complete -xchip=generic -Ui386 -U__i386 -xregs=no%frameptr" \
LDFLAGS="" http_proxy= https_proxy= ftp_proxy= /bin/bash \
/builds/bind/components/bind/bind-9.11.31/configure --prefix=/usr \
--mandir=/usr/share/man --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib/dns/amd64 \
--enable-full-report --with-python=/usr/bin/python3.7 --with-libtool --with-openssl=/usr \
--with-pkcs11=/usr/lib/amd64/libpkcs11.so.1 --with-libxml2=/usr --enable-threads \
--enable-devpoll --enable-fixed-rrset --with-tuning=large --enable-largefile \
--sysconfdir=/etc --localstatedir=/var --with-randomdev=/dev/random \
--with-gssapi=krb5-config --with-docbook-xsl=/usr/share/sgml/docbook
--with-python-install-dir=/usr/lib/python3.7/vendor-packages)
What is the current bug behavior?
Configure fails to link with GSSAPI
What is the expected correct behavior?
Configuration summary shown.
Relevant configuration files
Relevant logs and/or screenshots
checking for gcc... (cached) /opt/developerstudio12.6/bin/cc
checking whether we are using the GNU C compiler... (cached) no
checking whether /opt/developerstudio12.6/bin/cc accepts -g... (cached) yes
checking for /opt/developerstudio12.6/bin/cc option to accept ISO C89... (cached) none needed
checking for /opt/developerstudio12.6/bin/cc option to accept ISO C99... none needed
checking for ANSI C header files... (cached) yes
checking for fcntl.h... yes
checking for regex.h... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking for sys/mman.h... yes
checking for sys/sockio.h... yes
checking for sys/select.h... yes
checking for sys/param.h... yes
checking for sys/sysctl.h... no
checking for net/if6.h... no
checking for sys/socket.h... yes
checking for net/route.h... yes
checking for linux/netlink.h... no
checking for linux/rtnetlink.h... no
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for sysctlbyname... no
checking for flexible array members... yes
checking for mmap... yes
checking for seteuid... yes
checking for setresuid... no
checking for setegid... yes
checking for setresgid... no
checking for ftello... yes
checking for fseeko... yes
checking for static inline breakage... no
checking for size_t... yes
checking for ssize_t... yes
checking for uintptr_t... yes
checking for socklen_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for long long... yes
checking for uname... yes
checking for GCC noreturn attribute... yes
checking for struct lifconf... yes
checking for kqueue... no
checking epoll support... no
checking sys/devpoll.h usability... yes
checking sys/devpoll.h presence... yes
checking for sys/devpoll.h... yes
checking devpoll.h usability... yes
checking devpoll.h presence... yes
checking for devpoll.h... yes
checking if unistd.h or sys/types.h defines fd_set... yes
checking whether byte ordering is bigendian... no
checking for GSSAPI library... trying krb5-config
checking for krb5-config... /usr/bin/krb5-config
checking gssapi.h usability... yes
checking gssapi.h presence... yes
checking for gssapi.h... yes
checking gssapi/gssapi.h usability... yes
checking gssapi/gssapi.h presence... yes
checking for gssapi/gssapi.h... yes
checking krb5/krb5.h usability... yes
checking krb5/krb5.h presence... yes
checking for krb5/krb5.h... yes
checking krb5.h usability... yes
checking krb5.h presence... yes
checking for krb5.h... yes
checking krb5-config linking as -lkrb5 -lk5crypto -lcom_err... krb5-config: could not determine proper GSSAPI linkage
checking for GSSAPI library, non krb5-config method... looking in /usr/lib
checking for gssapi.h... (cached) yes
checking for gssapi/gssapi.h... (cached) yes
checking gssapi_krb5.h usability... no
checking gssapi_krb5.h presence... no
checking for gssapi_krb5.h... no
checking gssapi/gssapi_krb5.h usability... no
checking gssapi/gssapi_krb5.h presence... no
checking for gssapi/gssapi_krb5.h... no
checking for krb5.h... (cached) yes
checking for krb5/krb5.h... (cached) yes
checking kerberosv5/krb5.h usability... no
checking kerberosv5/krb5.h presence... no
checking for kerberosv5/krb5.h... no
checking linking as -lgssapi_krb5... no
checking linking as -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err... no
checking linking as -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lresolv... no
checking linking as -lgssapi... no
checking linking as -lgssapi -lkrb5 -ldes -lcrypt -lasn1 -lroken -lcom_err... no
checking linking as -lgssapi -lkrb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err... no
checking linking as -lgssapi -lkrb5 -lgssapi_krb5 -lcrypto -lcrypt -lasn1 -lroken -lcom_err... no
checking linking as -lgssapi -lkrb5 -lhx509 -lcrypto -lcrypt -lasn1 -lroken -lcom_err... no
checking linking as -lgss -lkrb5... no
configure: error: could not determine proper GSSAPI linkage
gmake: *** [/builds/bind/make-rules/configure.mk:176: /builds/bind/components/bind/build/amd64/.configured] Error 1
The compiler version issue:
-------------------------------------------------------------------------------
Compiler: /opt/developerstudio12.6/bin/cc
cc: Warning: Option --version passed to ld, if ld is invoked, ignored otherwise
usage: cc [ options ] files. Use 'cc -flags' for details
===============================================================================
Possible fixes
Patch being applied to release 9.11.31
Addresses several issues with configuration for Solaris build.
* krb5-config was not providing correct arguments, instead
it was printing the krb5 options!
* When using Studio compiler the summary did not report the version.
* The '-mt' option to Studio compiler was only ever for CFLAGS, not libs.
Either-way it has not been needed for some time now.
Patch will be passed back to ISC.
--- a/configure.ac 2021-04-19 07:10:40.000000000 -0700
+++ b/configure.ac 2021-04-28 09:41:01.159252398 -0700
@@ -921,8 +921,16 @@
else
KRB5_CONFIG="$use_gssapi"
fi
- gssapi_cflags=`$KRB5_CONFIG --cflags gssapi krb5`
- gssapi_libs=`$KRB5_CONFIG --libs gssapi krb5`
+ case "$host_os" in
+ solaris*)
+ gssapi_cflags=`$KRB5_CONFIG --cflags gssapi`
+ gssapi_libs=`$KRB5_CONFIG --libs gssapi`
+ ;;
+ *)
+ gssapi_cflags=`$KRB5_CONFIG --cflags gssapi krb5`
+ gssapi_libs=`$KRB5_CONFIG --libs gssapi krb5`
+ ;;
+ esac
saved_cppflags="$CPPFLAGS"
CPPFLAGS="$gssapi_cflags $CPPFLAGS"
AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h,
@@ -1282,7 +1290,7 @@
CCNOOPT="$CCNOOPT -pthread"
;;
*-solaris*)
- CC="$CC -mt"
+ CC="$CC"
CCOPT="$CCOPT -mt"
CCNOOPT="$CCNOOPT -mt"
;;
@@ -5726,8 +5734,17 @@
echo " localstatedir: $localstatedir"
echo "-------------------------------------------------------------------------------"
echo "Compiler: $CC"
- $CC --version 2>&1 | sed 's/^/ /'
-
+ if test "yes" == "$GCC"; then
+ $CC --version 2>&1 | sed 's/^/ /'
+ else
+ case "$host_os" in
+ solaris*)
+ $CC -V 2>&1 | sed 's/^/ /'
+ ;;
+ *)
+ $CC --version 2>&1 | sed 's/^/ /'
+ esac
+ fi
if test "X$ac_unrecognized_opts" != "X"; then
echo "Unrecognized options:"
echo " $ac_unrecognized_opts"