gnupg 2.0.9 compile problem on hp-ux 11.23 (hppa)

Werner Koch wk at gnupg.org
Thu Nov 27 12:22:08 CET 2008


Hi,

and thanks for the extr ainfo you sent.

On Wed, 26 Nov 2008 13:18, wk at gnupg.org said:

> Strange: We don't use any libgpg-error functions in the jnlib directory.
> Can you figure out where this symbol is used?  Feel free to send me the
> stringhelp.o file by PM.

I was wrong here: All jnlib code includes gcrypt.h via libjnlib-config.h
to access the libgcrypt memory allocation fuctnions.  By including
gcrypt.h gpg-error.h is also included and the problem is that we have
this code in gpg-error.h:

  #ifdef __GNUC__
  #define GPG_ERR_INLINE __inline__
  #elif __STDC_VERSION__ >= 199901L
  #define GPG_ERR_INLINE inline
  #else
  #ifndef GPG_ERR_INLINE
  #define GPG_ERR_INLINE
  #endif 
  #endif
  
  static GPG_ERR_INLINE gpg_error_t
  gpg_err_make_from_errno (gpg_err_source_t source, int err)
  {
    return gpg_err_make (source, gpg_err_code_from_errno (err));
  }
  
Now if your compiler is not gcc and not C-99 compliant, we don't get
an inline function but

  static gpg_error_t
  gpg_err_make_from_errno (gpg_err_source_t source, int err)
  {
    return gpg_err_make (source, gpg_err_code_from_errno (err));
  }

which adds a dependency to libgpg-error :-(.  A smart linker could
remove such unused functions but that is not the case here.  There are
two solution I can think of: a) Macro trickery to replace the symbols or
b) link against libgpg-error if needed.  Given that it is just a test
function I tend to option b.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Auschnahme regelt ein Bundeschgesetz.




More information about the Gnupg-users mailing list