Problem compiling krb5 1.17 under AIX 7.2.

Oliver Pelz oliverpelz at gmail.com
Mon Mar 25 14:27:16 EDT 2019


Topic : Problem compiling krb5 1.17 under AIX 7.2.


Dear Kerberos developers,

I know that AIX is no longer a supported platform for Kerberos but help
would be really appreciated!

I am on the latest AIX 7.2 ppc and have problems compiling/linking latest
Kerberos 5 1.17.
I am trying to compile with native xlc.

Here is what I did:

$ export CC="xlc_r"

# Fix for unsupported AIX version, see
http://kerberos.996246.n3.nabble.com/MIT-krb5-1-12-1-configure-fails-on-AIX-6-1-and-7-1-td39461.html
$ cd ./src
$ /usr/bin/perl -i -pe "s/aix5/aix[567]/" config/shlib.conf


# Fix configure script, see
http://kerberos.996246.n3.nabble.com/Missing-lpthreads-breaks-build-in-plugins-tls-k5tls-on-AIX-td47390.html
# change in configure and configure.in:

-TLS_IMPL_LIBS    = -lssl -lcrypto
+TLS_IMPL_LIBS    = -lssl -lcrypto -pthread


# C-FLAG qlanglvl=extc99 is needed because of errors without it, see samba
mail list
https://lists.samba.org/archive/samba-technical/2006-October/049722.html

$ ./configure CFLAGS="-qlanglvl=extc99"
--prefix=/oli-compile/krb5-1.17/build

# Run make

$ /bin/make

# Make throws errors, as AIX does only work with .a archive files
$ cd ./lib
$ for i in *.so; do /bin/ar -v -q `basename $i .so`.a $i; done
$ cd ..
# Run make again
$ /bin/make

# Runs further but needs a fix again, as libkadm5srv_mit is also only .so
$ cd ./lib
$ /bin/ar -v -q libkadm5srv_mit.a libkadm5srv_mit.so
$ cd ..

# Run make again
$ cd ..
$ make
# Runs further, now another missing dep: libdb, for fix see
http://kerberos.996246.n3.nabble.com/KRB5-1-5-or-1-6-compiled-on-AIX-5-2-5-3-td15834.html
$ cd ./lib
$ ln -s ../plugins/kdb/db2/libdb2/libdb.so.1.1 libdb.so.1.1
$ ln -s libdb.so.1.1 libdb.so
$ cd ..
$ make

# again missing dep:

$ cd lib/
$ /bin/ar -v -q libkadm5clnt_mit.a libkadm5clnt_mit.so
$ cd ..
$ make

# now make finishes without any further errors!!! but "make check" and all
binaries throws following error:
# e.g. kinit

$ LIBPATH=/oli-compile/krb5-1.17/build/lib/ ./kinit

The assert subroutine failed: destructors_set[keynum] == 0, file threads.c,
line 353
IOT/Abort trap (core dumped)

# This has been discussed before on this list, but no solution could be
found: see
http://kerberos.996246.n3.nabble.com/make-check-fails-on-AIX-5-3-td29400.html#a29403
,
http://kerberos.996246.n3.nabble.com/Problem-with-krb5-1-6-under-AIX-5-3-td16260.html

# Here are some threads with similar problems:
https://krbdev.mit.narkive.com/qjQiwyQX/assertion-error-in-mit-kerberos-1-12-4
http://kerberos.996246.n3.nabble.com/make-check-fails-on-AIX-5-3-td29400.html#a29403
https://sourceforge.net/p/modauthkerb/bugs/57/


#Here are the dependencies of one of the failing executables (all compiled
executables fail)

$ LIBPATH=/oli-compile/krb5-1.17/build/lib/ ldd ./kinit

./kinit needs:
         /usr/lib/libc.a(shr.o)
         /usr/lib/libpthreads.a(shr_xpg5.o)
         /oli-compile/krb5-1.17/build/lib//libcom_err.a(libcom_err.so)
         /oli-compile/krb5-1.17/build/lib//libkrb5.a(libkrb5.so)

/oli-compile/krb5-1.17/build/lib//libkadm5srv_mit.a(libkadm5srv_mit.so)
         /oli-compile/krb5-1.17/build/lib//libkdb5.a(libkdb5.so)

/oli-compile/krb5-1.17/build/lib//libkrb5support.a(libkrb5support.so)
         /unix
         /usr/lib/libcrypt.a(shr.o)
         /usr/lib/libpthreads.a(shr_comm.o)
         /oli-compile/krb5-1.17/build/lib//libkrb5support.so
         /usr/lib/librtl.a(shr.o)
         /oli-compile/krb5-1.17/build/lib//libk5crypto.so
         /oli-compile/krb5-1.17/build/lib//libcom_err.so
         /oli-compile/krb5-1.17/build/lib//libgssrpc.so
         /oli-compile/krb5-1.17/build/lib//libgssapi_krb5.so
         /oli-compile/krb5-1.17/build/lib//libkdb5.so
         /oli-compile/krb5-1.17/build/lib//libkrb5.so

# It looks strange to me that several libs have been imported twice (e.g.
libpthreads.a) and also that it uses .so and .a of the same lib.

# Another view using the dump command:

$ LIBPATH=/oli-compile/krb5-1.17/build/lib/ dump -H ./kinit

./kinit:

                        ***Loader Section***
                      Loader Header Information
VERSION#         #SYMtableENT     #RELOCent        LENidSTR
0x00000001       0x00000054       0x000000ae       0x000000f8

#IMPfilID        OFFidSTR         LENstrTBL        OFFstrTBL
0x00000008       0x00001028       0x0000064e       0x00001120


                        ***Import File Strings***
INDEX  PATH                          BASE                MEMBER
0      /oli-compile/krb5-1.17/build/lib::/usr/lib:/lib
1                                    libc.a              shr.o
2                                    libpthreads.a       shr_xpg5.o
3                                    libcom_err.a        libcom_err.so
4                                    libkrb5.a           libkrb5.so
5                                    libkadm5srv_mit.a   libkadm5srv_mit.so
6                                    libkdb5.a           libkdb5.so
7                                    libkrb5support.a    libkrb5support.so





I would really like to solve the problems, can someone help me finding the
issues about it?

Thank you very much for your help!!!
Oliver


More information about the krbdev mailing list