Re: squid_kerb_auth build issues with 3.1.0.1 on FreeBSD

From: Markus Moeller <huaraz_at_moeller.plus.com>
Date: Sun, 9 Nov 2008 17:18:41 -0000

"Thomas-Martin Seck" <tmseck-lists_at_netcologne.de> wrote in message
news:20081108194320.GA85974_at_hardy.tmseck.homedns.org...
> Squid devs,
>
> I had a look at 3.1.0.1 today and started to create a FreeBSD port for
> the 3.1 series.
>
> The environments in which I test the port are clean FreeBSD jails
> running 6.3-RELEASE and 7.0-RELEASE i386 respectively. The directory
> prefix passed to configure is set to /usr/scratch, CFLAGS are the
> FreeBSD default of "-O2 -fno-strict-aliasing") and CONFIG_SHELL is
> /bin/sh. I included aufs and COSS into the build.
>
> I ran into the following issues while build-testing:
>
> 1) two (probably harmless) bashisms snuck into configure.in, see this
> patch:
>
> --- configure.in.orig 2008-11-08 16:20:56.000000000 +0100
> +++ configure.in 2008-11-08 16:22:03.000000000 +0100
> @@ -3622,7 +3622,7 @@
> AC_DEFINE(_SQUID_RES_NSADDR6_COUNT,ns6count,[Nameserver Counter for IPv6
> _res_ext])
> fi
>
> -if test "$_SQUID_RES_NSADDR6_LIST" == ""; then
> +if test "$_SQUID_RES_NSADDR6_LIST" = ""; then
> AC_CACHE_CHECK(for _res._u._ext.nsaddrs, ac_cv_have_res_ext_nsaddrs,
> AC_TRY_COMPILE([
> #if HAVE_SYS_TYPES_H
> @@ -3676,7 +3676,7 @@
> AC_DEFINE(_SQUID_RES_NSADDR_COUNT,_res.nscount,[Nameserver counter for
> IPv4 _res])
> fi
>
> -if test "$_SQUID_RES_NSADDR_LIST" == ""; then
> +if test "$_SQUID_RES_NSADDR_LIST" = ""; then
> AC_CACHE_CHECK(for _res.ns_list, ac_cv_have_res_ns_list,
> AC_TRY_COMPILE([
> #if HAVE_SYS_TYPES_H
>
> 2) squid_kerb_auth does not build on either FreeBSD 6 or 7 (and
> probably 8-CURRENT):
>
> Making all in negotiate_auth
> Making all in squid_kerb_auth
> make all-recursive
> if
> c -DHAVE_CONFIG_H -I. -I. -I. -Ispnegohelp -I/usr/include -I/usr/scratch/include
> -I../../../include -O2 -fno-strict-aliasing -pipe -Wall -Wextra -Werror
> -Wcomment -Wpointer-arith -Wcast-align -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wmissing-declarations -Wdeclaration-after-statement
> -Wshadow -MT squid_kerb_auth.o -MD -MP -MF
> ".deps/squid_kerb_auth.Tpo" -c -o squid_kerb_auth.o squid_kerb_auth.c;
> then mv -f ".deps/squid_kerb_auth.Tpo" ".deps/squid_kerb_auth.Po"; else
> rm -f ".deps/squid_kerb_auth.Tpo"; exit 1; fi
> In file included from ../../../include/getaddrinfo.h:21,
> from squid_kerb_auth.c:65:
> ../../../include/config.h:196:1: "FD_SETSIZE" redefined
> In file included from /usr/include/sys/types.h:299,
> from /usr/include/unistd.h:41,
> from squid_kerb_auth.c:36:
> /usr/include/sys/select.h:59:1: this is the location of the previous
> definition

I think you need to add an undef in squids config.h (see below) as select.h
defines it too.

/* Increase FD_SETSIZE if SQUID_MAXFD is bigger */
#if CHANGE_FD_SETSIZE && SQUID_MAXFD > DEFAULT_FD_SETSIZE
#undef FD_SETSIZE
#define FD_SETSIZE SQUID_MAXFD
#endif

> squid_kerb_auth.c:121:20: base64.h: No such file or directory
> squid_kerb_auth.c:123:24: spnegohelp.h: No such file or directory

The header files seem to be missing

/home/markus/squid-3.1.0.2/helpers/negotiate_auth/squid_kerb_auth
$ find . | egrep "*.h$"
./install-sh
./ltmain.sh
./config.h

should be:

 find . | egrep "*.h$"
./install-sh
./base64.h
./spnegohelp/spnego.h
./spnegohelp/spnegoparse.h
./spnegohelp/spnegohelp.h
./spnegohelp/derparse.h
./config.h

> squid_kerb_auth.c: In function `main':
> squid_kerb_auth.c:424: warning: implicit declaration of function
> `ska_base64_decode_len'
> squid_kerb_auth.c:429: warning: implicit declaration of function
> `ska_base64_decode'
> squid_kerb_auth.c:433: warning: implicit declaration of function
> `parseNegTokenInit'
> squid_kerb_auth.c:512: warning: implicit declaration of function
> `makeNegTokenTarg'
> squid_kerb_auth.c:529: warning: implicit declaration of function
> `ska_base64_encode_len'
> squid_kerb_auth.c:537: warning: implicit declaration of function
> `ska_base64_encode'
> *** Error code 1
>
> On FreeBSD 6, helpers/negotiate_auth/squid_kerb_auth/config.h looks
> like the following, on FreeBSD 7 the only difference is that
> HAVE_GSSAPI_GSSAPI_KRB5_H is (correctly) defined:
>
> /* config.h. Generated from config.h.in by configure. */
> /* config.h.in. Generated from configure.in by autoheader. */
>
> /*
> * -----------------------------------------------------------------------------
> *
> * Author: Markus Moeller (markus_moeller_at_compuserve.com)
> *
> * Copyright (C) 2007 Markus Moeller. All rights reserved.
> *
> * This program is free software; you can redistribute it and/or modify
> * it under the terms of the GNU General Public License as published by
> * the Free Software Foundation; either version 2 of the License, or
> * (at your option) any later version.
> *
> * This program is distributed in the hope that it will be useful,
> * but WITHOUT ANY WARRANTY; without even the implied warranty of
> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> * GNU General Public License for more details.
> *
> * You should have received a copy of the GNU General Public License
> * along with this program; if not, write to the Free Software
> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
> USA.
> *
> * As a special exemption, M Moeller gives permission to link this
> program
> * with MIT, Heimdal or other GSS/Kerberos libraries, and distribute
> * the resulting executable, without including the source code for
> * the Libraries in the source distribution.
> *
> * -----------------------------------------------------------------------------
> */
>
>
> /* Define to 1 if you have the declaration of `xfree', and to 0 if you
> don't.
> */
> #define HAVE_DECL_XFREE 1
>
> /* Define to 1 if you have the declaration of `xfreeaddrinfo', and to 0 if
> you
> don't. */
> #define HAVE_DECL_XFREEADDRINFO 1
>
> /* Define to 1 if you have the declaration of `xgai_strerror', and to 0 if
> you
> don't. */
> #define HAVE_DECL_XGAI_STRERROR 1
>
> /* Define to 1 if you have the declaration of `xgetaddrinfo', and to 0 if
> you
> don't. */
> #define HAVE_DECL_XGETADDRINFO 1
>
> /* Define to 1 if you have the declaration of `xgetnameinfo', and to 0 if
> you
> don't. */
> #define HAVE_DECL_XGETNAMEINFO 1
>
> /* Define to 1 if you have the declaration of `xmalloc', and to 0 if you
> don't. */
> #define HAVE_DECL_XMALLOC 1
>
> /* Define to 1 if you have the declaration of `xstrdup', and to 0 if you
> don't. */
> #define HAVE_DECL_XSTRDUP 1
>
> /* Define to 1 if you have the <getaddrinfo.h> header file. */
> #define HAVE_GETADDRINFO_H 1
>
> /* Define to 1 if you have the <getnameinfo.h> header file. */
> #define HAVE_GETNAMEINFO_H 1
>
> /* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
> /* #undef HAVE_GSSAPI_GSSAPI_EXT_H */
>
> /* Define to 1 if you have the <gssapi/gssapi_generic.h> header file. */
> /* #undef HAVE_GSSAPI_GSSAPI_GENERIC_H */
>
> /* Define to 1 if you have the <gssapi/gssapi.h> header file. */
> /* #undef HAVE_GSSAPI_GSSAPI_H */
>
> /* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
> /* #undef HAVE_GSSAPI_GSSAPI_KRB5_H */
>
> /* Define to 1 if you have the <gssapi.h> header file. */
> #define HAVE_GSSAPI_H 1
>
> /* Define to 1 if you have Heimdal Kerberos */
> #define HAVE_HEIMDAL_KERBEROS 1
>
> /* Define to 1 if you have the <inttypes.h> header file. */
> /* #undef HAVE_INTTYPES_H */
>
> /* Define to 1 if you have the `m' library (-lm). */
> #define HAVE_LIBM 1
>
> /* Define to 1 if you have the `mw' library (-lmw). */
> /* #undef HAVE_LIBMW */
>
> /* Define to 1 if you have the <memory.h> header file. */
> /* #undef HAVE_MEMORY_H */
>
> /* Define to 1 if you have MIT Kerberos */
> /* #undef HAVE_MIT_KERBEROS */
>
> /* Define to 1 if you have NAS Kerberos */
> /* #undef HAVE_NAS_KERBEROS */
>
> /* Define to 1 if you have New Solaris 10/OpenSolaris Kerberos */
> /* #undef HAVE_NEW_SEAM_KERBEROS */
>
> /* Define to 1 if you have SEAM Kerberos */
> /* #undef HAVE_SEAM_KERBEROS */
>
> /* Define to 1 if you have SPNEGO support */
> /* #undef HAVE_SPNEGO */
>
> /* Define to 1 if you have SQUID */
> #define HAVE_SQUID 1
>
> /* Define to 1 if you have the <stdint.h> header file. */
> /* #undef HAVE_STDINT_H */
>
> /* Define to 1 if you have the <stdlib.h> header file. */
> /* #undef HAVE_STDLIB_H */
>
> /* Define to 1 if you have the <strings.h> header file. */
> /* #undef HAVE_STRINGS_H */
>
> /* Define to 1 if you have the <string.h> header file. */
> /* #undef HAVE_STRING_H */
>
> /* Define to 1 if you have the <sys/stat.h> header file. */
> /* #undef HAVE_SYS_STAT_H */
>
> /* Define to 1 if you have the <sys/types.h> header file. */
> /* #undef HAVE_SYS_TYPES_H */
>
> /* Define to 1 if you have the <unistd.h> header file. */
> /* #undef HAVE_UNISTD_H */
>
> /* Define to 1 if you have the <util.h> header file. */
> #define HAVE_UTIL_H 1
>
> /* Name of package */
> #define PACKAGE "squid_kerb_auth"
>
> /* Define to the address where bug reports for this package should be
> sent. */
> #define PACKAGE_BUGREPORT "markus_moeller_at_compuserve.com"
>
> /* Define to the full name of this package. */
> #define PACKAGE_NAME "squid_kerb_auth"
>
> /* Define to the full name and version of this package. */
> #define PACKAGE_STRING "squid_kerb_auth 1.0.3"
>
> /* Define to the one symbol short name of this package. */
> #define PACKAGE_TARNAME "squid_kerb_auth"
>
> /* Define to the version of this package. */
> #define PACKAGE_VERSION "1.0.3"
>
> /* Define to 1 if you have the ANSI C header files. */
> /* #undef STDC_HEADERS */
>
> /* Version number of package */
> #define VERSION "1.0.3"
>
> /* Define to 1 if your processor stores words with the most significant
> byte
> first (like Motorola and SPARC, unlike Intel and VAX). */
> /* #undef WORDS_BIGENDIAN */
>
>
> #ifdef HAVE_HEIMDAL_KERBEROS
> #ifdef HAVE_GSSAPI_GSSAPI_H
> #include <gssapi/gssapi.h>
> #elif defined(HAVE_GSSAPI_H)
> #include <gssapi.h>
> #endif
> #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
> #else
> #ifdef HAVE_SEAM_KERBEROS
> #ifdef HAVE_GSSAPI_GSSAPI_H
> #include <gssapi/gssapi.h>
> #elif defined(HAVE_GSSAPI_H)
> #include <gssapi.h>
> #endif
> #ifdef HAVE_GSSAPI_GSSAPI_EXT_H
> #include <gssapi/gssapi_ext.h>
> #endif
> #define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE
> #else /*MIT*/
> #ifdef HAVE_GSSAPI_GSSAPI_H
> #include <gssapi/gssapi.h>
> #elif defined(HAVE_GSSAPI_H)
> #include <gssapi.h>
> #endif
> #ifdef HAVE_GSSAPI_GSSAPI_KRB5_H
> #include <gssapi/gssapi_krb5.h>
> #endif
> #ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H
> #include <gssapi/gssapi_generic.h>
> #endif
> #endif
> #endif
>
> --
> Thomas-Martin Seck
>
Received on Sun Nov 09 2008 - 17:19:08 MST

This archive was generated by hypermail 2.2.0 : Sun Nov 09 2008 - 12:00:03 MST