problem trying to configure krb5-1.2.8 with compiler option for 64bit support
Swift, Louise
louise.swift at hants.gov.uk
Wed Aug 13 06:19:54 EDT 2003
Thanks for answering Ken.
What a dork I am not to mention our systems - I think my brain was mush in the heat::-)
I'm trying to install this on Sun 450 running Solaris 8
Thanks to your tip re config.log I have been able to do more research, and got further. Basically the whole problem is due to trying to use the gcc compiler for 64bit on Solaris. As time is short for our project I have given up with gcc for now, and used the Sun compiler wth success.
I will have to go back and try and resolve using gcc - I'm stuck at the moment with the configure working, but the make failing as it looks like the linking is trying to use some 32bit module somewhere (see STEP 4) - any hints on how to progress getting the make to work?
If not , when I get back to progressing gcc, I will scan the web then post another question about gcc and make, here and on gcc
Cheers
Louise
Just for referance in case anybody else gets stuck like I did, I am noting what I did, errors encountered, how to do get over them etc. This may be a bit long, but it may help others.
Cheers
Louise
Step 1. install Kerberso MIT on Solaris 8 using 32bit support using gcc-2.95.3-sol8-sparc-local
./configure --with-cc=gcc --without-krb4 --with-tcl=/usr/local --enable-shared
No problems - all works fine
Step 2. install Kerberso MIT on Solaris 8 using 64bit support using gcc-2.95.3-sol8-sparc-local
./configure --with-cc=gcc --with-ccopts=-m64 --without-krb4 --with-tcl=/usr/local --enable-shared
checking for working const... no <--------- this was yes in step 1 example
checking for gethostbyname... no
checking for gethostbyname in -lnsl... no <--------- this was yes in step 1 example
checking for gethostbyname in -lsocket... no <--------- this was yes in step 1 example
checking for gethostbyname in -lsocket... (cached) no
checking for gethostbyname in -lresolv... no
checking for socket... no
checking for socket in -lsocket... no
checking for socket in -lsocket... (cached) no
checking if DNS Kerberos lookup support should be compiled in... yes
checking for res_search... no
checking for res_search in -lresolv... no <--------- this was yes in step 1 example
configure: error: Cannot find resolver support routine res_search in -lresolv.
config.log says
configure:1015: gcc -c -g -O2 -m64 conftest.c 1>&5
cc1: -m64 is not supported by this configuration
cc1: -mptr32 not allowed on -m64
Checked on the web & it seems that although the documentation for gcc says that you can compile for 64bit on Solaris , it doesn't work (great) and you should install the latest level of gcc- so have installed the latest level of GCC 3.3 and tried again.
Step 3. install Kerberso MIT on Solaris 8 using 64bit support using gcc 3.3
./configure --with-cc=gcc --with-ccopts=-m64 --without-krb4 --with-tcl=/usr/local --enable-shared
checking for tclConfig.sh... /usr/local/lib/tclConfig.sh
checking Tcl info in /usr/local/lib/tclConfig.sh... 8.3 - compilation failed
configure: warning: trying old tcl search code
checking for dlopen in -ldl... yes
checking for main in -lld... no
checking for tcl.h... yes
checking for tcl/tcl.h... no
checking for Tcl_CreateCommand in -ltcl8.0... no
checking for Tcl_CreateCommand in -ltcl7.6... no
checking for Tcl_CreateCommand in -ltcl7.5... no
checking for Tcl_CreateCommand in -ltcl... no
configure: warning: tcl.h found but not library
configure: error: Could not find Tcl
config.log says
cl_CreateCommand()
; return 0; }
configure:2714: checking for Tcl_CreateCommand in -ltcl
configure:2733: gcc -o conftest -g -O2 -m64 -lnsl -I$(BUILDTOP)/include -I$(SRCTOP)/include -I$(BUILDTOP)/include/krb5 -I$(SRCTOP)/
include/krb5 -I/usr/local/include -L/usr/local/lib conftest.c -ltcl -lm -ldl -lsocket -lresolv 1>&5
ld: fatal: file /usr/local/lib/libtcl.so: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to conftest
collect2: ld returned 1 exit status
configure: failed program was:
#line 2722 "configure"
#include "confdefs.h"
The ELF bit is saying that it wants a 64bit version , but can only find 32bit version.
changed the tcl to 8.4 which support 64bit, but I got exactly the same. So if you do a
file against the tcl library then it shows the tcl is actually 32bit - which made me think I may need to compile tcl , but instaeda took the tcl out of the configure coptions, and the configure staged then worked.
Step 4. install Kerberso MIT on Solaris 8 using 64bit support using gcc 3.3
./configure --with-cc=gcc --with-ccopts=-m64 --without-krb4 --enable-shared
and whoopeee the configure stage works, but ....
now the make step fails
building shared com_err library (3.0)
ld: fatal: file ./error_message.so: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to libcom_err.so.3.0
collect2: ld returned 1 exit status
make[2]: *** [libcom_err.so.3.0] Error 1
make[2]: Leaving directory `/export/home/system/kerberos5/krb5-1.2.8/src/util/et'
make[1]: *** [all-recurse] Error 1
make[1]: Leaving directory `/export/home/system/kerberos5/krb5-1.2.8/src/util'
make: *** [all-recurse] Error 1
At this point I had to resort to using the SUN compiler.
Step 5. install Kerberso MIT on Solaris 8 using 64bit support using Sun compiler
./configure --with-cc="cc -xarch=v9 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__" --without-krb4 --enable-shared
configure and make worked fine, although if you out in the --with-tcl=/usr/local you will still get a failure.
> Louise Swift
> IT Services (rm 415)
> Hampshire County Council
> Elizabeth II Court, The Castle,
> Winchester, Hants SO23 8US
> Tel: +44 (0)1962 847427
> Fax: +44 (0)1962 847434
> HPSN: 200 7427
Louise.Swift at hants.gov.uk
More information about the Kerberos
mailing list