Change in include/k5-platform.h breaks compiling krb5 1.15.1 on AIX (and more)

Greg Hudson ghudson at mit.edu
Wed Aug 23 18:00:13 EDT 2017


On 08/23/2017 06:10 AM, REIX, Tony wrote:
> Linker error message on AIX is:
>    ld: 0711-328 ERROR: Undefined initfini symbol: krb5int_thread_support_fini
> since the following code is generated, where krb5int_thread_support_fini() is static:

I think this problem affects platforms which set
use_linker_fini_option=yes in shlib.conf but use SHOBJEXT=.o instead of
SHOBJEXT=.so, and therefore don't build the object files used in shared
libraries with -DSHARED.  The affected platforms appear to be OSF/1,
IRIX (pre-6.3 and without gcc), and of course AIX.

The offending commit is 4538146e1452e0966164119cefb0804993ce6bbb whose
goal was to disable finalizers in static libraries.  We are really only
worried about that problem for __attribute__((destructor)) finalizers,
so it should be okay to effectively revert that commit in the
USE_LINKER_FINI_OPTION case, as the proposed patch does, because the
linker options are only applied when shared libraries are built.  Rather
than add to the SHARED conditional, I prefer to reorder the clauses so
that the linker option stuff comes first, then the test for SHARED, then
the destructor attribute stuff.

I filed a PR at https://github.com/krb5/krb5/pull/693 if you would like
to test what I expect to merge.  I also put the diff up at
https://pastebin.com/LHHd6fDW (although I expect that to expire at some
point).


More information about the krbdev mailing list