Errors compiling libgpg-error

Gordon Steemson gsteemso at gmail.com
Thu Aug 8 05:56:43 CEST 2024


Hello all,

I am attempting to update a series of very old package-manager configuration files for the various parts of GnuPG, and have hit two snags when experimentally compiling the first package of the collection, `libgpg-error`.

First, a function "my_exec", in the file "spawn-posix.c", assigns a value to a variable "environ".  This variable appears nowhere else in the source code of this package tarball, and nothing is done with it after the assignment statement.  I patched the file to delete the offending assignment statement, and it now compiles; however I see in the list archives that someone who encountered a similar problem in another of GnuPG's components declared it external instead, which apparently also worked.  What is the story behind this variable, and why is it not apparently declared anywhere?

Second, perhaps out of a sense of obsessive completism, I tried to enable the ./configure option for timestamped logging.  This resulted in an undeclared macro or some such (it is called "CLOCK_REALTIME") jamming the compiler.  This macro, or preprocessor constant or whatever it is, likewise does not appear anywhere else in the source code (at least according to grep).  Where is it supposed to be defined?

G.




More information about the Gnupg-devel mailing list