Compilation fails with Compiling lib/netapi/cm.c "/opt/csw/include/client.h", line 24: #error: "Do not include this header directly" cc: acomp failed for lib/netapi/cm.c The following command failed: /opt/SUNWspro/bin/cc -xc99=all -I/opt/csw/include -xO3 -m32 -xarch=sparc -lintl -I. -I/home/dam/mgar/pkg/samba/trunk/work/solaris10-sparc/build-isa-sparcv8plus/samba-3.6.1/source3 -I/home/dam/mgar/pkg/samba/trunk/work/solaris10-sparc/build-isa-sparcv8plus/samba-3.6.1/source3/../lib/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I../lib/tdb/include -DHAVE_CONFIG_H -I/opt/csw/include -I/opt/csw/include -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED -DSUNOS5 -I/home/dam/mgar/pkg/samba/trunk/work/solaris10-sparc/build-isa-sparcv8plus/samba-3.6.1/source3/lib -I.. -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 -KPIC -c lib/netapi/cm.c -o lib/netapi/cm.o as client.h is included from the system-installed /opt/csw/include/client.h instead of the header file shipped with the samba distribution. The order results from the definition of CFLAGS: Using CFLAGS = -I/opt/csw/include -xO3 -m32 -xarch=sparc -lintl -I. -I/home/dam/mgar/pkg/samba/trunk/work/solaris10-sparc/build-isa-sparcv8plus/samba-3.6.1/source3 -I/home/dam/mgar/pkg/samba/trunk/work/solaris10-sparc/build-isa-sparcv8plus/samba-3.6.1/source3/../lib/iniparser/src -Iinclude -I./include -I. -I. -I./../lib/replace -I./../lib/tevent -I./librpc -I./.. -I../lib/tdb/include -DHAVE_CONFIG_H -I/opt/csw/include -I/opt/csw/include -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DLDAP_DEPRECATED -DSUNOS5 -I/home/dam/mgar/pkg/samba/trunk/work/solaris10-sparc/build-isa-sparcv8plus/samba-3.6.1/source3/lib -I.. -D_SAMBA_BUILD_=3 -D_SAMBA_BUILD_=3 Further investigation showed that the -I comes from prefixing the output of krb5-config to CFLAGS instead of appending it. I suggest changing the order in which the kerberos-specific parameters are added similar to this patch: diff --git a/source3/configure.in b/source3/configure.in index 9b49c96..008be93 100644 --- a/source3/configure.in +++ b/source3/configure.in @@ -3745,9 +3745,9 @@ if test x"$with_ads_support" != x"no"; then # remove needless evil rpath stuff as early as possible: LIB_REMOVE_USR_LIB(KRB5_LIBS) LIB_REMOVE_USR_LIB(KRB5_LDFLAGS) - CFLAGS="$KRB5_CFLAGS $CFLAGS" - CPPFLAGS="$KRB5_CPPFLAGS $CPPFLAGS" - LDFLAGS="$KRB5_LDFLAGS $LDFLAGS" + CFLAGS="$CFLAGS $KRB5_CFLAGS" + CPPFLAGS="$CPPFLAGS $KRB5_CPPFLAGS" + LDFLAGS="$LDFLAGS $KRB5_LDFLAGS" KRB5_LIBS="$KRB5_LDFLAGS $KRB5_LIBS"
Created attachment 9228 [details] git patch for 4.0 changing the order as you suggest seems to make sense here actually. Here is a patch for 4.0. In 4.1 we don't have autoconf any more. 3.6 doesn't get fixes like this any more, right?
I hope this is fixed with the waf based buildsystem in 4.0.0 and highwe.