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

REIX, Tony tony.reix at atos.net
Thu Aug 24 06:41:32 EDT 2017


Hummmm  The patch does not apply correctly:

+ patch -p1 -b --suffix .LHHd6fDW -s
+ 0< /opt/freeware/src/packages/SOURCES/krb5-1.15.1-LHHd6fDW.patch
1 out of 2 hunks FAILED -- saving rejects to file src/include/k5-platform.h.rej
Bad exit status from /var/opt/freeware/tmp/rpm-tmp.3088 (%prep)

Did I something wrong ?

Thx

Tony



# cat src/include/k5-platform.h.rej
***************
*** 361,376 ****
  
  
  
- #if !defined(SHARED) && !defined(_WIN32)
- 
- /*
-  * In this case, we just don't care about finalization.  The code will still
-  * define the function, but we won't do anything with it.
-  */
- # define MAKE_FINI_FUNCTION(NAME)               \
-         static void NAME(void) UNUSED
- 
- #elif defined(USE_LINKER_FINI_OPTION) || defined(_WIN32)
  /* If we're told the linker option will be used, it doesn't really
     matter what compiler we're using.  Do it the same way
     regardless.  */
--- 361,367 ----
  
  
  
+ #if defined(USE_LINKER_FINI_OPTION) || defined(_WIN32)
  /* If we're told the linker option will be used, it doesn't really
     matter what compiler we're using.  Do it the same way
     regardless.  */


Cordialement,

Tony Reix

Bull - ATOS
IBM Coop Architect & Technical Leader
Office : +33 (0) 4 76 29 72 67
1 rue de Provence - 38432 Échirolles - France
www.atos.net

________________________________________
De : Greg Hudson [ghudson at mit.edu]
Envoyé : jeudi 24 août 2017 00:00
À : REIX, Tony; krbdev at mit.edu
Objet : Re: Change in include/k5-platform.h breaks compiling krb5 1.15.1 on AIX (and more)

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).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: krb5-1.15.1-LHHd6fDW.patch
Type: text/x-patch
Size: 3696 bytes
Desc: krb5-1.15.1-LHHd6fDW.patch
Url : http://mailman.mit.edu/pipermail/krbdev/attachments/20170824/f2baf00c/attachment.bin


More information about the krbdev mailing list