[blfs-dev] Gawk 5.0.0 breaks libgpg-error (patch included)

Ryan Marsaw rmarsaw at personainternet.com
Tue Apr 16 10:53:41 PDT 2019


Hello all.

The new gawk 5.0.0 breaks libgpg-error:

[...]
gawk: fatal: cannot use gawk builtin `namespace' as variable name
make[2]: *** [Makefile:1617: errnos-sym.h] Error 2
[...]

The problem's been fixed upstream, but until a new libgpg-error comes
out I've included a patch that fixes the above issue and allows it to
build with the new gawk.

Note that "autoreconf --verbose --force --install" 
will need to be issued after applying the patch.

Cheers,

Ryan
-------------- next part --------------
--- libgpg-error-1.36-orig/lang/cl/mkerrcodes.awk	2013-03-15 15:24:25.000000000 -0400
+++ libgpg-error-1.36/lang/cl/mkerrcodes.awk	2019-04-16 12:43:50.623999689 -0400
@@ -122,7 +122,7 @@
 }
 
 !header {
-  sub (/\#.+/, "");
+  sub (/#.+/, "");
   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
 
   if (/^$/)
--- libgpg-error-1.36-orig/src/Makefile.am	2018-12-12 03:14:31.000000000 -0500
+++ libgpg-error-1.36/src/Makefile.am	2019-04-16 12:50:59.499036057 -0400
@@ -293,7 +293,7 @@
 
 errnos-sym.h: Makefile mkstrtable.awk errnos.in
 	$(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=2 -v nogettext=1 \
-		-v prefix=GPG_ERR_ -v namespace=errnos_ \
+		-v prefix=GPG_ERR_ -v pkg_namespace=errnos_ \
 		$(srcdir)/errnos.in >$@
 
 
--- libgpg-error-1.36-orig/src/mkerrcodes.awk	2013-03-15 15:24:25.000000000 -0400
+++ libgpg-error-1.36/src/mkerrcodes.awk	2019-04-16 12:44:56.404005267 -0400
@@ -85,7 +85,7 @@
 }
 
 !header {
-  sub (/\#.+/, "");
+  sub (/#.+/, "");
   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
 
   if (/^$/)
--- libgpg-error-1.36-orig/src/mkerrcodes1.awk	2013-03-15 15:24:25.000000000 -0400
+++ libgpg-error-1.36/src/mkerrcodes1.awk	2019-04-16 12:45:23.126007533 -0400
@@ -81,7 +81,7 @@
 }
 
 !header {
-  sub (/\#.+/, "");
+  sub (/#.+/, "");
   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
 
   if (/^$/)
--- libgpg-error-1.36-orig/src/mkerrcodes2.awk	2013-03-15 15:24:25.000000000 -0400
+++ libgpg-error-1.36/src/mkerrcodes2.awk	2019-04-16 12:45:42.925009212 -0400
@@ -91,7 +91,7 @@
 }
 
 !header {
-  sub (/\#.+/, "");
+  sub (/#.+/, "");
   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
 
   if (/^$/)
--- libgpg-error-1.36-orig/src/mkerrnos.awk	2013-03-15 15:24:25.000000000 -0400
+++ libgpg-error-1.36/src/mkerrnos.awk	2019-04-16 12:45:58.863010563 -0400
@@ -83,7 +83,7 @@
 }
 
 !header {
-  sub (/\#.+/, "");
+  sub (/#.+/, "");
   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
 
   if (/^$/)
--- libgpg-error-1.36-orig/src/mkstrtable.awk	2013-03-15 15:24:25.000000000 -0400
+++ libgpg-error-1.36/src/mkstrtable.awk	2019-04-16 12:46:19.520012315 -0400
@@ -77,7 +77,7 @@
 #
 # The variable prefix can be used to prepend a string to each message.
 #
-# The variable namespace can be used to prepend a string to each
+# The variable pkg_namespace can be used to prepend a string to each
 # variable and macro name.
 
 BEGIN {
@@ -102,7 +102,7 @@
       print "/* The purpose of this complex string table is to produce";
       print "   optimal code with a minimum of relocations.  */";
       print "";
-      print "static const char " namespace "msgstr[] = ";
+      print "static const char " pkg_namespace "msgstr[] = ";
       header = 0;
     }
   else
@@ -110,7 +110,7 @@
 }
 
 !header {
-  sub (/\#.+/, "");
+  sub (/#.+/, "");
   sub (/[ 	]+$/, ""); # Strip trailing space and tab characters.
 
   if (/^$/)
@@ -150,7 +150,7 @@
   else
     print "  gettext_noop (\"" last_msgstr "\");";
   print "";
-  print "static const int " namespace "msgidx[] =";
+  print "static const int " pkg_namespace "msgidx[] =";
   print "  {";
   for (i = 0; i < coded_msgs; i++)
     print "    " pos[i] ",";
@@ -158,7 +158,7 @@
   print "  };";
   print "";
   print "static GPG_ERR_INLINE int";
-  print namespace "msgidxof (int code)";
+  print pkg_namespace "msgidxof (int code)";
   print "{";
   print "  return (0 ? 0";
 


More information about the blfs-dev mailing list