krb5-1.3-beta4 and Mac OS X Panther

Alexandra Ellwood lxs at MIT.EDU
Wed Jul 2 16:08:28 EDT 2003


>I get the following errors at link time:
>
>making all in lib/rpc/unit-test...
>gcc -L../../../lib -g -O2 -Wall -Wmissing-prototypes -Wcast-qual 
>-Wcast-align -Wconversion -Wshadow -Wno-comment -pedantic  -o client 
>client.o rpc_test_clnt.o \
>        -lgssrpc -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err
>ld: Undefined symbols:
>_krb5_gss_dbg_client_expcreds
>_gss_mech_krb5
>_gss_mech_krb5_old
>
>I went through the documentation and followed it as written.
>
>I would appreciate it if someone could explain what I'm doing
>wrong or point me to where I can figure out how to resolve
>this problem.

This is not really a problem with the MIT Kerberos build system.  The 
problem is that Apple's ld behaves differently than ld on most other 
Unix platforms.  On Mac OS X, shared libraries are always chosen over 
static libraries even if there is a static library in an earlier 
search path than the shared library.  This causes the Kerberos which 
ships with Mac OS X to interfere with the MIT krb5 build system's use 
of the -l option.

There are two workarounds:

1) When running configure, pass the option: 
"LDFLAGS=-Wl,-search_paths_first"  This option turns on the more 
common library search order for Mac OS X's ld and is only supported 
in Panther.

2) Move the following symlinks out of the way (to another directory), 
build, and then move them back.  This works on both Jaguar and 
Panther.

/usr/lib/libcom_err.dylib
/usr/lib/libdes425.dylib
/usr/lib/libgssapi_krb5.dylib
/usr/lib/libk5crypto.dylib
/usr/lib/libkrb4.dylib
/usr/lib/libkrb5.dylib
/usr/lib/libkrb524.dylib


Hope this helps,

--lxs
-- 
-----------------------------------------------------------------------------
Alexandra Ellwood                                               <lxs at mit.edu>
MIT Information Systems                               http://mit.edu/lxs/www/
-----------------------------------------------------------------------------
--


More information about the krbdev mailing list