[OpenAFS] AKLOG build error...
Halter, Jonathan
jehalter@uncc.edu
Fri, 28 Apr 2006 16:12:47 -0400
> -----Original Message-----
> From: openafs-info-admin@openafs.org=20
> [mailto:openafs-info-admin@openafs.org] On Behalf Of Ken Hornstein
> Sent: Thursday, April 27, 2006 12:58 PM
> To: openafs-info@openafs.org
> Subject: Re: [OpenAFS] AKLOG build error...=20
>=20
> This patch you're referring to is the one that lets you build with the
> Kerberos libraries includes with Solaris. You indicate that=20
> this isn't
> the issue, since you are using MIT Kerberos 1.4.3.
>=20
> >"aklog_main.c", line 207: #error: "You must have one of
> >krb5_524_convert_creds or krb524_convert_creds_kdc available"
>=20
> This means that autoconf didn't find either of these functions in the
> Kerberos library (the first one should be in the MIT Kerberos
> library). You should probably check config.log to find out why that
> happened. I suspect something else is going on.
>=20
> --Ken
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info
>=20
I've done several tests here, and it seems that we may be getting bit by
some hardcoding of CC somewhere in OPenAFS's configure. No matter what I
specify for CC, by the end of configure, CC always ends up being set to
/opt/SUNWspro/bin/cc. This is a problem on our systems, since our
compilers are not located there.
This is what ultimately has caused the problem in Rodney's original post
about the aklog build error (outlined in test #3 below). CFLAGS were
being=20
***** TEST #1 *****
I try to specify where to find cc (our Sun compilers are not installed
in the traditional /opt/SUNWspro):
CC=3D/apps/coe/bin/cc ./configure \
--enable-transarc-paths \
--enable-largefile-fileserver \
--enable-supergroups \
--with-krb5-conf=3D/usr/local/krb5/bin/krb5-config
and configure seems to be fine with it (at the beginning):
configure:960: checking whether the C compiler (/apps/coe/bin/cc )
works
configure:976: /apps/coe/bin/cc -o conftest conftest.c 1>&5
"configure", line 973: warning: old-style declaration or incorrect type
for: main
configure:1002: checking whether the C compiler (/apps/coe/bin/cc ) is
a cross-compiler
configure:1007: checking whether we are using GNU C
configure:1016: /apps/coe/bin/cc -E conftest.c
configure:1035: checking whether /apps/coe/bin/cc accepts -g
configure:1067: checking how to run the C preprocessor
configure:1088: /apps/coe/bin/cc -E conftest.c >/dev/null
2>conftest.out
configure:1147: checking for ANSI C header files
configure:1160: /apps/coe/bin/cc -E conftest.c >/dev/null
2>conftest.out
configure:1227: /apps/coe/bin/cc -o conftest -g conftest.c 1>&5
"configure", line 1222: warning: implicit function declaration: exit
but by the end, it loses its mind, and falls back to trying to find cc
in /opt/SUNWspro/bin (hardcoding somewhere?):
configure:8108: checking for add_to_error_table
configure:8136: /opt/SUNWspro/bin/cc -o conftest -g
-I/usr/local/krb5/include
conftest.c -lsocket -lnsl -L/usr/local/krb5/lib -lkrb5 -lk5crypto
-lkrb5support -lcom_err -lresolv -lsocket -lnsl 1>&5
./configure: /opt/SUNWspro/bin/cc: not found
Configure completes, but make bombs
(note the location of cc its trying to use):
/opt/SUNWspro/bin/cc -O -I/home/test/openafs-1.4.1/include -I. -dy
-Bdynamic -I. -c ./config.c
gmake[3]: /opt/SUNWspro/bin/cc: Command not found
gmake[3]: *** [config.o] Error 127
gmake[3]: Leaving directory `/home/test/openafs-1.4.1/src/config'
gmake[2]: *** [config] Error 2
gmake[2]: Leaving directory `/home/test/openafs-1.4.1'
gmake[1]: *** [build] Error 2
gmake[1]: Leaving directory `/home/test/openafs-1.4.1'
gmake: *** [all] Error 2
----------
***** TEST #2 *****
Now, I try to specify gcc:
CC=3Dgcc ./configure \
--enable-transarc-paths \
--enable-largefile-fileserver \
--enable-supergroups \
--with-krb5-conf=3D/usr/local/krb5/bin/krb5-config
and according to the config.log, all is well with gcc:
configure:960: checking whether the C compiler (gcc ) works
configure:976: gcc -o conftest conftest.c 1>&5
configure:1002: checking whether the C compiler (gcc ) is a
cross-compiler
configure:1007: checking whether we are using GNU C
configure:1016: gcc -E conftest.c
configure:1035: checking whether gcc accepts -g
configure:1067: checking how to run the C preprocessor
configure:1088: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1147: checking for ANSI C header files
configure:1160: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1227: gcc -o conftest -g -O2 conftest.c 1>&5
by the end, he's back to looking for /opt/SUNWspro/bin/cc:
configure:8108: checking for add_to_error_table
configure:8136: /opt/SUNWspro/bin/cc -o conftest -g -O2
-I/usr/local/krb5/include conftest.c -lsocket -lnsl
-L/usr/local/krb5/lib -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv
-lsocket -lnsl 1>&5
./configure: /opt/SUNWspro/bin/cc: not found
----------
***** TEST #3 *****
So that OpenAFS can find cc, I symlink location of SUNWspro=20
(which is out in AFS on our systems) to /opt/SUNWspro
if I don't specify CC on the configure line, configure seems=20
to default to gcc:
configure:960: checking whether the C compiler (gcc ) works
configure:976: gcc -o conftest conftest.c 1>&5
configure:1002: checking whether the C compiler (gcc ) is a
cross-compiler
configure:1007: checking whether we are using GNU C
configure:1016: gcc -E conftest.c
configure:1035: checking whether gcc accepts -g
configure:1067: checking how to run the C preprocessor
configure:1088: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1147: checking for ANSI C header files
configure:1160: gcc -E conftest.c >/dev/null 2>conftest.out
configure:1227: gcc -o conftest -g -O2 conftest.c 1>&5
and again, it falls back to using /opt/SUNWspro/bin/cc,
but this time it can find it at that location:
configure:8108: checking for add_to_error_table
configure:8136: /opt/SUNWspro/bin/cc -o conftest -g -O2
-I/usr/local/krb5/include conftest.c -lsocket -lnsl
-L/usr/local/krb5/lib -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv
-lsocket -lnsl 1>&5
cc: Warning: option -2 passed to ld
/usr/ccs/bin/ld: illegal option -- 2
but he's still not happy, because the CFLAGS have been set for gcc,
which includes the -O2, this is what is causing the failure in
conftest for krb5_524_convert_creds:
configure:8108: checking for krb5_524_convert_creds
configure:8136: /opt/SUNWspro/bin/cc -o conftest -g -O2
-I/usr/local/krb5/include conftest.c -lsocket -lnsl
-L/usr/local/krb5/lib -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv
-lsocket -lnsl 1>&5
and for krb524_convert_creds_kdc:
configure:8108: checking for krb524_convert_creds_kdc
configure:8136: /opt/SUNWspro/bin/cc -o conftest -g -O2
-I/usr/local/krb5/include conftest.c -lsocket -lnsl
-L/usr/local/krb5/lib -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv
-lsocket -lnsl 1>&5
which in turn causes the error in the aklog make that Rodney originally
posted.