undefined reference krb5_c_fx_cf2_simple

classic Classic list List threaded Threaded
3 messages Options
r l
Reply | Threaded
Open this post in threaded view
|

undefined reference krb5_c_fx_cf2_simple

r l
I get an error while compiling with krb5-1.16.2:

    undefined reference to `krb5_c_fx_cf2_simple'

  The full message is below.

I searched the whole source for it using   find ... | grep

without success.

Compiling on another machine with a rather similar setup does not show
this error.

Please, could someone give help or advice?

Best regards,

R. Laatsch

-----------------

gcc -g -O2 -DHAVE_LIBNSL=1 -DHAVE_LIBRESOLV=1 -DSTDC_HEADERS=1
-DHAVE_SYS_TIME_H=1 -DHAVE_SYSLOG_H=1 -DHAVE_MALLOC_H=1
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
-DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
-DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_STRFTIME=1
-DHAVE_VPRINTF=1 -DHAVE_GETHOSTNAME=1 -DHAVE_SELECT=1 -DHAVE_SOCKET=1
-DHAVE_STRDUP=1 -DHAVE_STRTOL=1 -DHAVE_SETSID=1 -DNO_GSSAPI_CONFIG_H -I.
-I. -I/usr/afsws/include  -I. -I./gssapi -I./GSS -I/opt/krb5/include  
-c ./gssklog_afs.c
gcc  -o gssklog gssklog.o gssklog_afs.o \
         gssklog_gss.o gssklog_comm.o \
         -Wl,--noinhibit-exec,-rpath,:/usr/lib:/lib -L/usr/afsws/lib
-L/usr/afsws/lib/afs -lprot -lubik -lauth -lcmd -lsys -lrxkad -lrx -llwp
/usr/afsws/lib/libdes.a /usr/afsws/lib/afs/util.a
/usr/afsws/lib/afs/libafscom_err.a \
          \
         -L/opt/krb5/lib -lgssapi_krb5 -l gssrpc -lcom_err -lk5crypto
-lkrb5 -lkrb5support -ldl strlcat.o -lresolv -lnsl
/opt/krb5/lib/libkrb5.a(auth_con.o): In function
`krb5_auth_con_initivector':
/Data/krb5-1.15.4/src/lib/krb5/krb/auth_con.c:323: undefined reference
to `krb5_c_init_state'
/opt/krb5/lib/libkrb5.a(get_in_tkt.o): In function `verify_anonymous':
/Data/krb5-1.15.4/src/lib/krb5/krb/get_in_tkt.c:201: undefined reference
to `krb5_c_fx_cf2_simple'
/opt/krb5/lib/libkrb5.a(preauth_ec.o): In function `ec_process':
/Data/krb5-1.15.4/src/lib/krb5/krb/preauth_ec.c:109: undefined reference
to `krb5_c_fx_cf2_simple'
/Data/krb5-1.15.4/src/lib/krb5/krb/preauth_ec.c:69: undefined reference
to `krb5_c_fx_cf2_simple'

....

------------------------------------------------------------------------


________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference krb5_c_fx_cf2_simple

Greg Hudson
On 12/23/18 3:11 AM, r l wrote:
>     undefined reference to `krb5_c_fx_cf2_simple'

> I searched the whole source for it using   find ... | grep

It is defined in src/lib/crypto/krb/cf2.c.

> gcc  -o gssklog gssklog.o gssklog_afs.o \
>          gssklog_gss.o gssklog_comm.o \
>          -Wl,--noinhibit-exec,-rpath,:/usr/lib:/lib -L/usr/afsws/lib
> -L/usr/afsws/lib/afs -lprot -lubik -lauth -lcmd -lsys -lrxkad -lrx -llwp
> /usr/afsws/lib/libdes.a /usr/afsws/lib/afs/util.a
> /usr/afsws/lib/afs/libafscom_err.a \
>           \
>          -L/opt/krb5/lib -lgssapi_krb5 -l gssrpc -lcom_err -lk5crypto
> -lkrb5 -lkrb5support -ldl strlcat.o -lresolv -lnsl

I notice this link line is putting -lk5crypto before -lkrb5, which is
backwards.  I'm not sure it should matter, but depending on the platform
it might, especially if there's a very old (1.6 or earlier) version of
libk5crypto somewhere on the system.
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos
r l
Reply | Threaded
Open this post in threaded view
|

Re: undefined reference krb5_c_fx_cf2_simple

r l
Reversing the order of -lkrb and -lk5crypto solved it.

Greg, manythanks to you.

Best wishes for christmas and a happy new year to all from cologne!

Best regards,

Rainer


--------------------------------------------------------------------------------------


On 12/23/18 6:24 PM, Greg Hudson wrote:

> On 12/23/18 3:11 AM, r l wrote:
>>      undefined reference to `krb5_c_fx_cf2_simple'
>> I searched the whole source for it using   find ... | grep
> It is defined in src/lib/crypto/krb/cf2.c.
>
>> gcc  -o gssklog gssklog.o gssklog_afs.o \
>>           gssklog_gss.o gssklog_comm.o \
>>           -Wl,--noinhibit-exec,-rpath,:/usr/lib:/lib -L/usr/afsws/lib
>> -L/usr/afsws/lib/afs -lprot -lubik -lauth -lcmd -lsys -lrxkad -lrx -llwp
>> /usr/afsws/lib/libdes.a /usr/afsws/lib/afs/util.a
>> /usr/afsws/lib/afs/libafscom_err.a \
>>            \
>>           -L/opt/krb5/lib -lgssapi_krb5 -l gssrpc -lcom_err -lk5crypto
>> -lkrb5 -lkrb5support -ldl strlcat.o -lresolv -lnsl
> I notice this link line is putting -lk5crypto before -lkrb5, which is
> backwards.  I'm not sure it should matter, but depending on the platform
> it might, especially if there's a very old (1.6 or earlier) version of
> libk5crypto somewhere on the system.
________________________________________________
Kerberos mailing list           [hidden email]
https://mailman.mit.edu/mailman/listinfo/kerberos