I'm trying to get Kerberos 1.2.2 compiled on a Sun E220 with Solaris 5.8
and gcc 2.95.2.
But the following error occurs during make:
making all in lib/rpc/unit-test...
gcc -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
krb5_cc_get_principal ../../../lib/libgssapi_krb5.so
krb5_cc_retrieve_cred ../../../lib/libkrb5.so
krb5_cc_get_type ../../../lib/libgssapi_krb5.so
krb5_cc_set_flags ../../../lib/libgssapi_krb5.so
krb5_cc_get_name ../../../lib/libgssapi_krb5.so
krb5_cc_store_cred ../../../lib/libgssapi_krb5.so
krb5_cc_start_seq_get ../../../lib/libgssapi_krb5.so
krb5_cc_next_cred ../../../lib/libgssapi_krb5.so
krb5_cc_end_seq_get ../../../lib/libgssapi_krb5.so
krb5_cc_destroy ../../../lib/libkrb5.so
krb5_cc_initialize ../../../lib/libgssapi_krb5.so
krb5_cc_gen_new ../../../lib/libgssapi_krb5.so
krb5_cc_close ../../../lib/libgssapi_krb5.so
ld: fatal: Symbol referencing errors. No output written to client
collect2: ld returned 1 exit status
*** Error code 1 make: Fatal error: Command failed for target `client'
Current working directory
/usr/local/src/krb5-1.2.2/src/lib/rpc/unit-test
*** Error code 1 make: Fatal error: Command failed for target
`all-recurse'
Current working directory /usr/local/src/krb5-1.2.2/src/lib/rpc
*** Error code 1 make: Fatal error: Command failed for target
`all-recurse'
Current working directory /usr/local/src/krb5-1.2.2/src/lib
*** Error code 1 make: Fatal error: Command failed for target
`all-recurse'
Kerberos 1.2.1 compiles on the same machine and the same environment
without a problem.
Thanks in advance,
Adrian
P.S. There was another problem in util/et/error_message.c on line 52,
but I removed the if statement there. Now only the old style is left and
makes no problems anymore.
Adrian> Now tested under RedHat Linux 7.0 as well.
Adrian> Same behaviour as under Solaris...
>> I'm trying to get Kerberos 1.2.2 compiled on a Sun E220 with Solaris 5.8
>> and gcc 2.95.2.
>> But the following error occurs during make:
>>
>> gcc -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
>> krb5_cc_get_principal ../../../lib/libgssapi_krb5.so
>> krb5_cc_retrieve_cred ../../../lib/libkrb5.so
[...]
>> ld: fatal: Symbol referencing errors. No output written to client
>> collect2: ld returned 1 exit status
That's really weird. Are you sure your source and build trees are
clean? Some time prior to krb5-1.1, I think, we removed a bunch of
macros of the form krb5_cc_* and replaced them with functions.
>> Kerberos 1.2.1 compiles on the same machine and the same environment
>> without a problem.
That's even weirder. There should not have been any changes to those
functions between the 1.2.1 and 1.2.2 releases.
In any case, krb5-1.2.2 builds just fine under Solaris 8 for us, using
gcc.
---Tom
tlyu> Some time prior to krb5-1.1, I think, we removed a bunch of
tlyu> macros of the form krb5_cc_* and replaced them with functions.
I've been corrected; we still haven't yet replaced the krb5_cc_*
macros with functions. It's likely that there is some problem in your
build whereby an incorrect krb5.h gets used to compile the libraries,
resulting in undefined function symbols for krb5_cc_* rather than the
expanded macros getting compiled.
---Tom
Library path is set as follows:
crle -s /usr/lib -l /opt/sfw/lib:/usr/local/lib:/usr/lib
Path is set as follows:
export PATH=/opt/sfw/bin:/usr/local/bin:/usr/bin:/usr/ccs/bin
Instructions to compile:
$ gunzip -c krb5-current.tar.gz | tar -xf -
$ cd krb5-current/src
$ gmake distclean
$ rm -r config.cache config.status
$ ./configure --prefix=/usr/local --enable-dns --without-krb5
--with-ccopts=-i \
--with-cc=gcc --enable-kdc-replay-cache [--enable-shared]
$ gmake
As mentioned above, the error seems to depend on the switch
--enable-shared.
For me, it's not very important, that this problem is solved, since
1.2.1 works just fine for me.
Regards,
Adrian
Adrian> The system I use is fresh installed Solaris 8.0 (4/01), for
Adrian> x86 processors with the Software Companion installed.
You said this was a Solaris sparc problem, and now you're describing
x86 stuff...
Adrian> Library path is set as follows:
Adrian> crle -s /usr/lib -l /opt/sfw/lib:/usr/local/lib:/usr/lib
What is in /opt/sfw?
Adrian> Path is set as follows:
Adrian> export PATH=/opt/sfw/bin:/usr/local/bin:/usr/bin:/usr/ccs/bin
Adrian> Instructions to compile:
Adrian> $ gunzip -c krb5-current.tar.gz | tar -xf -
Are you talking about krb5-current, or krb5-1.2.2, or what? Your
excerpts don't match the rest of your query. By 1.2.2, do you
actually mean krb5-current? If so, could you please be more exact?
It's very hard to debug a problem where inaccurate information is
given.
Adrian> $ cd krb5-current/src
Adrian> $ gmake distclean
This result in an error due to lack of src/Makefile in a freshly
unpacked distribution.
Adrian> $ rm -r config.cache config.status
Adrian> $ ./configure --prefix=/usr/local --enable-dns --without-krb5
Adrian> --with-ccopts=-i \
Adrian> --with-cc=gcc --enable-kdc-replay-cache [--enable-shared]
Adrian> $ gmake
Do you mean "--without-krb4" instead of "--without-krb5"? Also, what
are you using the "-i" flag for? Is it a gcc flag or an ld flag? I'm
not familiar with it, but it seems that it means different things to
GNU ld vs the Solaris ld.
For comparison, we use gcc but with the Solaris ld here at MIT. I
haven't tried building using GNU ld yet, but that may be part of the
problem. You've likely got another install of krb5 in your
/usr/local, which could be confusing GNU ld.
Adrian> As mentioned above, the error seems to depend on the switch
Adrian> --enable-shared.
That's very curious. The shared library build procedure did change
somewhat between 1.2.1 and 1.2.2, but should not affect Solaris at
all.
---Tom