[14479] in Kerberos

home help back first fref pref prev next nref lref last post

Re: Krb5 on Solaris 7/8 64-bit

daemon@ATHENA.MIT.EDU (johanvz@ewranglers.com)
Fri May 25 15:43:54 2001

From: johanvz@ewranglers.com
Date: 25 May 2001 19:27:47 GMT
Message-ID: <9embnj$dkd$1@news.skycache.com>
To: kerberos@MIT.EDU


>On Thu, 24 May 2001, shen wrote:
>
>> I have compiled Krb5 1.2.1 (configure -with-cc='cc -xarch=v9') on Solaris
>> 7/8 64-bit
>> and changed source code by replacing sys_errlist and sys_nerr by strerror.
>> The compiling went through fine. However, I got "GSS-API (or Kerberos) error
>> while initializing kadmin interface" after I entered password. The 32-bit
>> version worked well.
>> Has anyone successfully implemented Krb5 on Solaris 7/8 64-bit?

In article <Pine.GSO.4.33.0105250740120.17644-100000@shred.stanford.edu>,
Booker C. Bense <bbense@networking.stanford.edu> wrote:

>- You might want to try 1.2.2[1], I'm pretty sure it has the
>sys_errlist fix and some other fixes as well. In 1.2.1 we needed that
>fix and the following tweak to des.h courtesy of Marc Reyhner
><mreyhner@cs.stanford.edu>

 These changes did not make it into the source release of 1.2.2 that i
 downloaded:

make[3]: Entering directory
`/local/src/kerb/krb5-1.2.2/src/SunOS-5.7-64bit/lib/rpc/unit-test'
cc -xarch=v9 -L../../../lib -R/usr/local/lib -o client client.o
rpc_test_clnt.o \
        -lgssrpc -ldyn -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lgen
	-lsocket -lnsl  -lresolv
Undefined                       first referenced
 symbol                             in file
sys_errlist                         ../../../lib/libgssrpc.so
sys_nerr                            ../../../lib/libgssrpc.so
ld: fatal: Symbol referencing errors. No output written to client

Executing the following command:

 find . -name \*.[ch] -exec grep -l sys_nerr {} \; 

... at the top of the source tree yields:

./appl/telnet/libtelnet/strerror.c
./include/win-mac.h
./include/krb5/k5-config.h
./lib/krb5/posix/strerror.c
./lib/rpc/clnt_perror.c
./util/db2/clib/strerror.c
./util/et/error_message.c
./util/et/internal.h
./util/et/test_et.c

... so i'm guess this is not a trivial change.


This link has information about the 64-bit "death" of sys_nerr and
sys_errlist :

http://www.sun.com/developers/tools/abi/sundevelopers.html


 I also had to make several changes to .../src/aclocal.m4 in order to get
some shared object files to link.  aclocal.m4 is used by configure to
generate the copious Makefiles.  The problem with some of the Solaris
stanzas is that explicitly call the linker as $(CC) (rather than as "ld"),
and then they don't add $LDOPTS to the command line.  Supposedly, the
Solaris ld will take the architecture of the first .o file and set the
.so's arch. appropriately.  However, cc does not, and so cc defaults to
attempting to create 32-bit .so's, even if given a bunch of 64-bit .o's to
link, unless cc is also given something like "-xarch=v9" on the command
line.

 These are the diffs for aclocal.m4 i had to make to get functional
Makefiles:

chaos:/local/src/kerb/krb5-1.2.2/src $ diff aclocal.m4 aclocal.m4.org 
1323c1323
<               LDCOMBINE='$(CC) $(LDFLAGS) -dy -G -z text -h lib$(LIB)$(SHLIBSEXT)'
---
>               LDCOMBINE='$(CC) -dy -G -z text -h lib$(LIB)$(SHLIBSEXT)'
1330,1331c1330,1331
<       CC_LINK_SHARED='$(PURE) $(CC) $(LDFLAGS) $(PROG_LIBPATH)
-R$(PROG_RPATH)'
<       CC_LINK_STATIC='$(PURE) $(CC) $(LDFLAGS) $(PROG_LIBPATH)'
---
>       CC_LINK_SHARED='$(PURE) $(CC) $(PROG_LIBPATH) -R$(PROG_RPATH)'
>       CC_LINK_STATIC='$(PURE) $(CC) $(PROG_LIBPATH)'


 It might make more sense to simply replace $(CC) with ld, but i'm not
sure how that would interact with the "$(PURE)" lines...


This is the configure line i was using:

configure --prefix=/usr/local --enable-shared --with-tcl=/usr/local \
  --without-krb4 --with-ccopts='-xO3 -xarch=v9' \
  --with-ldopts='-xarch=v9'


 I didn't have the time to go through and fix the occurances of sys_nerr
and sys_errlist, so i gave up and stuck with a 32-bit build. (That
decision was largely based on the observation that 1.2.2 apparently has
never been compiled in 64-bit mode under Solaris, and so there could be
more problems lurking there, beyond these two sets.)


Johan van Zanten			\ "And so once again we find that
Systems Shaman				 \ the evil of the past seeps into
Tumbleweed Electron Wranglers, Inc.	  \ the present, like salad dressing 
		    			   \ through cheap waxed paper."

home help back first fref pref prev next nref lref last post