Re: Ubuntu 18.04 fails to build bison 3.7

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
Hi Arnold,

> Le 26 juil. 2020 à 12:53, Arnold Robbins <[email protected]> a écrit :
> 
>  CCLD     src/bison
> src/bison-complain.o: In function `warnings_print_categories':
> /usr/local/src/Gnu/bison-3.7/src/complain.c:457: undefined reference to `ostream_printf'
> src/bison-complain.o: In function `end_hyperlink':
> /usr/local/src/Gnu/bison-3.7/src/complain.c:117: undefined reference to `styled_ostream_set_hyperlink'
> src/bison-complain.o: In function `begin_hyperlink':
> /usr/local/src/Gnu/bison-3.7/src/complain.c:110: undefined reference to `styled_ostream_set_hyperlink'
> collect2: error: ld returned 1 exit status
> Makefile:4327: recipe for target 'src/bison' failed
> make: *** [src/bison] Error 1

I'm about to push the following patch, once the CI validates it.  I hope I can release 3.7.1 tomorrow.

Thanks for the report!

commit ba1834f9a8bdc6f5a9ee4dcd95650cd759d36e4b
Author: Akim Demaille <[email protected]>
Date:   Sun Jul 26 18:00:15 2020 +0200

    libtextstyle: be sure to have ostream_printf and hyperlink support
    
    Older versions of libtextstyle do not support them, rule them out.
    
    Reported by Lars Wendler
    https://lists.gnu.org/r/bug-bison/2020-07/msg00030.html
    
    and by Arnold Robbins
    https://lists.gnu.org/r/bug-bison/2020-07/msg00041.html and
    https://lists.gnu.org/mailman/private/gawk-devel/2020-July/003988.html
    
    With support from Bruno Haible in gnulib
    https://lists.gnu.org/r/bug-gnulib/2020-08/msg00000.html
    thread starting at
    https://lists.gnu.org/r/bug-gnulib/2020-07/msg00148.html
    
    * configure.ac: Require libtextstyle 0.20.5.
    * gnulib: Update.

diff --git a/NEWS b/NEWS
index cf79ac1e..717ff8a9 100644
--- a/NEWS
+++ b/NEWS
@@ -4,7 +4,9 @@ GNU Bison NEWS
 
 ** Bug fixes
 
-  Fixed a crash when a token alias contains a NUL byte.
+  Crash when a token alias contains a NUL byte.
+
+  Portability issues with libtextstyle.
 
 ** Changes
 
diff --git a/README b/README
index 489caa70..118dc31b 100644
--- a/README
+++ b/README
@@ -42,9 +42,11 @@ installing it.  In that case, do not use `src/bison`: it would use the
 As an experimental feature, diagnostics are now colored, controlled by the
 `--color` and `--style` options.
 
-To use them, install the libtextstyle library before configuring Bison.  It
-is available from https://alpha.gnu.org/gnu/gettext/, for instance
-https://alpha.gnu.org/pub/gnu/gettext/libtextstyle-0.20.5.tar.gz.
+To use them, install the libtextstyle library, 0.20.5 or newer, before
+configuring Bison.  It is available from https://alpha.gnu.org/gnu/gettext/,
+for instance https://alpha.gnu.org/gnu/gettext/libtextstyle-0.20.5.tar.gz,
+or as part of Gettext 0.21 or newer, for instance
+https://ftp.gnu.org/gnu/gettext/gettext-0.21.tar.gz.
 
 The option --color supports the following arguments:
 - always, yes: Enable colors.
diff --git a/THANKS b/THANKS
index 5c64da3c..a97f2b03 100644
--- a/THANKS
+++ b/THANKS
@@ -106,6 +106,7 @@ Keith Browne              [email protected]
 Ken Moffat                [email protected]
 Kiyoshi Kanazawa          [email protected]
 Lars Maier                [email protected]
+Lars Wendler              [email protected]
 László Várady             [email protected]
 Laurent Mascherpa         [email protected]
 Lie Yan                   [email protected]
diff --git a/configure.ac b/configure.ac
index c5750a6d..4993a2c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,6 +60,9 @@ AC_PROG_CXX
 # Gnulib (early checks).
 gl_EARLY
 
+# We want ostream_printf and hyperlink support.
+gl_LIBTEXTSTYLE_OPTIONAL([0.20.5])
+
 # Gnulib uses '#pragma GCC diagnostic push' to silence some
 # warnings, but older gcc doesn't support this.
 AC_CACHE_CHECK([whether pragma GCC diagnostic push works],
diff --git a/gnulib b/gnulib
index ac34618e..c6e65c2e 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit ac34618e85013bfec4650f02e8e79c5de6d80fb3
+Subproject commit c6e65c2e9fc89cc1a3b743d370f69d222fbdb6bb
diff --git a/lib/.gitignore b/lib/.gitignore
index 7f9045d4..758edcc0 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -192,8 +192,6 @@
 /localcharset.h
 /locale.h
 /locale.in.h
-/localtime-buffer.c
-/localtime-buffer.h
 /lstat.c
 /malloc.c
 /malloca.c
diff --git a/m4/.gitignore b/m4/.gitignore
index cca78f48..9bc07270 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -67,7 +67,6 @@
 /intlmacosx.m4
 /intmax.m4
 /intmax_t.m4
-/inttypes-pri.m4
 /inttypes.m4
 /inttypes_h.m4
 /isnan.m4
@@ -97,7 +96,6 @@
 /locale-ja.m4
 /locale-zh.m4
 /locale_h.m4
-/localtime-buffer.m4
 /lock.m4
 /longlong.m4
 /lstat.m4
@@ -117,6 +115,7 @@
 /msvc-inval.m4
 /msvc-nothrow.m4
 /multiarch.m4
+/musl.m4
 /nls.m4
 /nocrash.m4
 /non-recursive-gnulib-prefix-hack.m4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.