[OpenAFS] Compiling openafs-1.4.6 on AIX 5.3

Frank Bagehorn FBA@zurich.ibm.com
Thu, 13 Mar 2008 15:45:18 +0100


Hi all,
I'm trying to compile 1.4.6 on AIX 5.3 with the built-in krb5.
I used the following settings for configure:
CC=xlc
KRB5CFLAGS="-I/usr/include"
KRB5LIBS="-L/usr/krb5/lib -lkrb5"
./configure --with-afs-sysname=rs_aix53 --enable-transarc-paths 
--with-krb5

While compiling aklog I get errors about unresolved symbols:
+ cd aklog
+ make all
        cc -o aklog  -I/usr/include -DALLOW_REGISTER 
-I/u/fba1/Public/openafs-1.4.6/src/config -I. -I. 
-I/u/fba1/Public/openafs-1.4.6/include 
-I/u/fba1/Public/openafs-1.4.6/include/afs 
-I/u/fba1/Public/openafs-1.4.6/include/rx -I/u/fba1/Public/openafs-1.4.6 
-I/u/fba1/Public/openafs-1.4.6/src -I/u/fba1/Public/openafs-1.4.6/src -K 
-D_NONSTD_TYPES -D_MBI=void  aklog.o aklog_main.o krb_util.o linked_list.o 
 -L/usr/krb5/lib -lkrb5 /u/fba1/Public/openafs-1.4.6/lib/libprot.a 
/u/fba1/Public/openafs-1.4.6/lib/libubik.a 
/u/fba1/Public/openafs-1.4.6/lib/libauth.a 
/u/fba1/Public/openafs-1.4.6/lib/librxkad.a 
/u/fba1/Public/openafs-1.4.6/lib/librx.a 
/u/fba1/Public/openafs-1.4.6/lib/liblwp.a 
/u/fba1/Public/openafs-1.4.6/lib/libsys.a 
/u/fba1/Public/openafs-1.4.6/lib/libdes.a 
/u/fba1/Public/openafs-1.4.6/lib/libcom_err.a 
/u/fba1/Public/openafs-1.4.6/lib/libafsutil.a -ldl
ld: 0711-317 ERROR: Undefined symbol: .krb5_c_encrypt_length
ld: 0711-317 ERROR: Undefined symbol: .krb5_c_encrypt
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more 
information.
make: 1254-004 The error code from the last command is 8.

To debug I added -bnoquiet as a linker option and I get:

+ cd aklog
+ make all
        cc -bnoquiet -o aklog  -I/usr/include -DALLOW_REGISTER 
-I/u/fba1/Public/openafs-1.4.6/src/config -I. -I. 
-I/u/fba1/Public/openafs-1.4.6/include 
-I/u/fba1/Public/openafs-1.4.6/include/afs 
-I/u/fba1/Public/openafs-1.4.6/include/rx -I/u/fba1/Public/openafs-1.4.6 
-I/u/fba1/Public/openafs-1.4.6/src -I/u/fba1/Public/openafs-1.4.6/src -K 
-D_NONSTD_TYPES -D_MBI=void  aklog.o aklog_main.o krb_util.o linked_list.o 
 -L/usr/krb5/lib -lkrb5 /u/fba1/Public/openafs-1.4.6/lib/libprot.a 
/u/fba1/Public/openafs-1.4.6/lib/libubik.a 
/u/fba1/Public/openafs-1.4.6/lib/libauth.a 
/u/fba1/Public/openafs-1.4.6/lib/librxkad.a 
/u/fba1/Public/openafs-1.4.6/lib/librx.a 
/u/fba1/Public/openafs-1.4.6/lib/liblwp.a 
/u/fba1/Public/openafs-1.4.6/lib/libsys.a 
/u/fba1/Public/openafs-1.4.6/lib/libdes.a 
/u/fba1/Public/openafs-1.4.6/lib/libcom_err.a 
/u/fba1/Public/openafs-1.4.6/lib/libafsutil.a -ldl
(ld): halt 4
(ld): setfflag 4
(ld): savename aklog
(ld): filelist 20 1
(ld): i /lib/crt0.o
(ld): i aklog.o
(ld): i aklog_main.o
(ld): i krb_util.o
(ld): i linked_list.o
(ld): lib /usr/krb5/lib/libkrb5.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/libprot.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/libubik.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/libauth.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/librxkad.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/librx.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/liblwp.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/libsys.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/libdes.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/libcom_err.a
(ld): i /u/fba1/Public/openafs-1.4.6/lib/libafsutil.a
(ld): lib /usr/lib/libdl.a
(ld): lib /usr/vac/lib/libxlopt.a
(ld): lib /usr/vac/lib/libxl.a
(ld): lib /usr/lib/libc.a
LIBRARY: Shared object libkrb5.a[libkrb5.a.so]: 320 symbols imported.
LIBRARY: Symbols imported from import file 
/u/fba1/Public/openafs-1.4.6/lib/libsys.a[afsl.exp]: 8
LIBRARY: Shared object libdl.a[shr.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[shr.o]: 2870 symbols imported.
LIBRARY: Shared object libc.a[meth.o]: 2 symbols imported.
LIBRARY: Shared object libc.a[posix_aio.o]: 20 symbols imported.
LIBRARY: Shared object libc.a[aio.o]: 18 symbols imported.
LIBRARY: Shared object libc.a[pse.o]: 5 symbols imported.
LIBRARY: Shared object libc.a[dl.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty.o]: 1 symbols imported.
FILELIST: Number of previously inserted files processed: 20
(ld): resolve
RESOLVE: 1048 of 10742 symbols were kept.
(ld): addgl /usr/lib/glink.o
ADDGL: Glink code added for 96 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
        The following symbols are in error:
 Symbol                    Inpndx  TY CL Source-File(Object-File) OR 
Import-File{Shared-object}
                              RLD: Address  Section  Rld-type Referencing 
Symbol
 
----------------------------------------------------------------------------------------------
 .krb5_c_encrypt_length    [76]    ER PR aklog_main.c(aklog_main.o)
                                   0000005c .text    R_RBR    [12] 
.krb5_encrypt_tkt_part
 .krb5_c_encrypt           [80]    ER PR aklog_main.c(aklog_main.o)
                                   000000d0 .text    R_RBR    [12] 
.krb5_encrypt_tkt_part
ER: The return code is 8.
make: 1254-004 The error code from the last command is 8.

Obviously its loading the libkrb5.a library with 320 symbols, but it still 
can't find two symbols. This is surprising as the symbols are contained in 
the libkrb5.a library.

# dump -c /usr/krb5/lib/libkrb5.a | grep krb5_c_encrypt
         37324   .krb5_c_encrypt
         37432   .krb5_c_encrypt_length

Any ideas what's going wrong here ?

Regards
Frank

----------------------------------------------------------------------------
Dr. Frank Bagehorn
Manager Infrastructure Services ZRL IS
Sr. IT Architect / ITIL Foundation certified
IBM Zurich Research Lab.
Saeumerstr. 4
CH-8803 Rueschlikon 
Switzerland
----------------------------------------------------------------------------
SMTP: fba@zurich.ibm.com
Notes: Frank Bagehorn/Zurich/IBM@IBMCH
phone: ++41 (044) 724 83 23  fax: ++41 (044) 724 89 59