GnuPG 1.9.92 build failures on old Linux

Alain Guibert alguibert+gpd at free.fr
Wed Oct 18 16:52:10 CEST 2006


Hello Werner,

 On Thursday, October 12, 2006 at 17:35:36 +0200, Werner Koch wrote:

> On Wed, 11 Oct 2006 20:18, Alain Guibert said:
>>| watchgnupg.c:227: `socklen_t' undeclared (first use this function)
> Well the usual socklen_t problem. Will include a test to configure.

Checking gnupg SVN trunk revision 4304, all my other problems are fixed,
outside of this socklen_t one. Thank you again.


Additionally I had two minor problems when doing ./autogen.sh on this
old Linux:

| sh: (svn info 2>/dev/null || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q}': bad arithmetic substitution

And:

| sed: -e expression #1, char 29: Extra characters after command

Both problems come from configure.ac line 33 and 34:

| m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
|             || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q}')]))

First problem is that some bash versions (at least 2.0.0) wrongly take
"$((" as beginning an arithmetic substitution, and that fails. A space
between opening parenthesis "$( (" fixes it.

Second problem is that some sed versions (at least 2.05 and 3.02)
dislike grouped commands that do not end in ";". Inserting a semicolon
between "q" and "}" fixes it.

I hope that such syntax does not break on more recent platforms:

| m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
|             || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))


Alain.
-------------- next part --------------
Index: configure.ac
===================================================================
--- configure.ac	(revision 4304)
+++ configure.ac	(working copy)
@@ -30,8 +30,8 @@
 m4_define([my_issvn], [yes])
 
 
-m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
-            || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q}')]))
+m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
+            || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
 AC_INIT([gnupg], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]),
         [bug-gnupg at gnupg.org])
 # Set development_version to yes if the minor number is odd or you


More information about the Gnupg-devel mailing list