Problem compiling krb5 1.17 under AIX 7.2.

Oliver Pelz oliverpelz at
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
$ cd ./src
$ /usr/bin/perl -i -pe "s/aix5/aix[567]/" config/shlib.conf

# Fix configure script, see
# change in configure and

-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

$ ./configure CFLAGS="-qlanglvl=extc99"

# 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
$ cd ..

# Run make again
$ cd ..
$ make
# Runs further, now another missing dep: libdb, for fix see
$ cd ./lib
$ ln -s ../plugins/kdb/db2/libdb2/
$ ln -s
$ cd ..
$ make

# again missing dep:

$ cd lib/
$ /bin/ar -v -q libkadm5clnt_mit.a
$ 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

# Here are some threads with similar problems:

#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:



# 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


                        ***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
4                                    libkrb5.a 
5                                    libkadm5srv_mit.a
6                                    libkdb5.a 
7                                    libkrb5support.a

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

Thank you very much for your help!!!

More information about the krbdev mailing list