Friday, April 30, 2021

Re: UPDATE: devel/bison

On 2021/04/28 19:21, Todd C. Miller wrote:
> Another port I'd like to update needs a newer version of bison that
> we provide so I've updated to the lastest version.
>
> The only problem I encountered is that makeinfo in base is old and
> doesn't understand some of these new-fangled directives. They
> appear to just be cosmetic anyway.
>
> - todd

Updated diff below, there were some missing library deps and I've enabled
building a debug package. My build is still running, so far I've run
into errors in these which seem related:

- x11/qt5/qtwebkit: I don't see why (no apparent crashes/errors from bison)
but I get this with a file that should have been generated by bison.
waiting for a build slot to try repeating it.

[...]/DerivedSources/WebCore/CSSGrammar.cpp:160:10: fatal error: 'CSSGrammar.hpp' file not found

- devel/cbmc: repeatable bison segfault, seems related to curses/libtextstyle.

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000296d2c05573 in delay_output (ms=54) at /src/checkout/openbsd-src-cvs/lib/libcurses/tinfo/lib_tputs.c:81
81 if (no_pad_char) {
(gdb) bt
#0 0x00000296d2c05573 in delay_output (ms=54) at /src/checkout/openbsd-src-cvs/lib/libcurses/tinfo/lib_tputs.c:81
#1 0x00000296d2c05aee in tputs (string=0x2965f84ebe0 "", affcnt=<optimized out>, outc=<optimized out>)
at /src/checkout/openbsd-src-cvs/lib/libcurses/tinfo/lib_tputs.c:272
#2 0x00000296b818601d in out_hyperlink_change (
stream=<error reading variable: Unhandled dwarf expression opcode 0xa3>, new_hyperlink=0x2965f847700,
async_safe=<optimized out>) at term-ostream.oo.c:1586
#3 0x00000296b8186ab5 in out_attr_change (stream=0x2965f833200, new_attr=...) at term-ostream.oo.c:1737
#4 0x00000296b818634d in output_buffer (stream=0x2965f833200, goal_attr=...) at term-ostream.oo.c:1906
#5 0x00000296b8183aef in term_ostream__flush (stream=0x2965f833200, scope=FLUSH_THIS_STREAM)
at term-ostream.oo.c:2052
#6 0x00000293dadb0996 in flush (out=<optimized out>) at src/complain.c:124
#7 warnings_print_categories (warn_flags=Wyacc, out=<optimized out>) at src/complain.c:464
#8 error_message (loc=0x7f7ffffca4e0, flags=Wyacc, sever=<optimized out>, message=<optimized out>,
args=0x293dad98b69) at src/complain.c:510
#9 complains (loc=0x7f7ffffca4e0, flags=Wyacc, message=0x293dad98b69 "POSIX Yacc does not support string literals",
args=<error reading variable: Unhandled dwarf expression opcode 0xa3>) at src/complain.c:537
#10 0x00000293dadb05b1 in complain (loc=0x36, flags=-236729,
message=0x1 <error: Cannot access memory at address 0x1>) at src/complain.c:549
#11 0x00000293dade8b05 in gram_lex (val=0x7f7ffffca4b0, loc=<optimized out>)
at /Users/akim/src/gnu/bison/src/scan-gram.l:566
#12 0x00000293dadd1eb3 in gram_parse () at src/parse-gram.c:2078
#13 0x00000293daddcc9b in reader (gram=<error reading variable: Unhandled dwarf expression opcode 0xa3>)
at src/reader.c:718
#14 0x00000293dadc5ae7 in main (argc=8, argv=0x7f7ffffca738) at src/main.c:108


Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/bison/Makefile,v
retrieving revision 1.62
diff -u -p -r1.62 Makefile
--- Makefile 5 Oct 2020 21:50:40 -0000 1.62
+++ Makefile 30 Apr 2021 09:43:10 -0000
@@ -2,8 +2,7 @@

COMMENT= GNU parser generator

-DISTNAME= bison-3.3.2
-REVISION= 2
+DISTNAME= bison-3.7.6
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU:=bison/}
EXTRACT_SUFX= .tar.xz
@@ -13,12 +12,13 @@ HOMEPAGE= https://www.gnu.org/software/b
# GPLv3+
PERMIT_PACKAGE= Yes

-WANTLIB= c iconv intl m
+WANTLIB= c curses iconv intl m textstyle

AUTOCONF_VERSION= 2.69
AUTOMAKE_VERSION= 1.16

-LIB_DEPENDS= devel/gettext,-runtime
+LIB_DEPENDS= devel/gettext,-runtime \
+ devel/gettext,-textstyle
BUILD_DEPENDS= devel/gettext,-tools \
devel/help2man \
devel/m4
@@ -26,6 +26,7 @@ RUN_DEPENDS= devel/m4

CONFIGURE_STYLE=autoreconf
CONFIGURE_ARGS= --disable-yacc
+DEBUG_PACKAGES= ${BUILD_PACKAGES}
MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/build-aux

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/devel/bison/distinfo,v
retrieving revision 1.13
diff -u -p -r1.13 distinfo
--- distinfo 14 May 2019 16:28:23 -0000 1.13
+++ distinfo 30 Apr 2021 09:43:10 -0000
@@ -1,2 +1,2 @@
-SHA256 (bison-3.3.2.tar.xz) = A57kW2HZXlAD5+g3b5CAABtAZv81e94nG3+qzlO52AQ=
-SIZE (bison-3.3.2.tar.xz) = 2108612
+SHA256 (bison-3.7.6.tar.xz) = Z9aM4eIhkgUFJWQ/wKeiIpdXZoK+9qXFFEaQP1ru888=
+SIZE (bison-3.7.6.tar.xz) = 2627180
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_in 30 Apr 2021 09:43:10 -0000
@@ -0,0 +1,61 @@
+$OpenBSD$
+Base makeinfo doesn't support the --set-customization-variable option.
+
+Index: Makefile.in
+--- Makefile.in.orig
++++ Makefile.in
+@@ -1,4 +1,4 @@
+-# Makefile.in generated by automake 1.16b from Makefile.am.
++# Makefile.in generated by automake 1.16.2 from Makefile.am.
+ # @configure_input@
+
+ # Copyright (C) 1994-2020 Free Software Foundation, Inc.
+@@ -1302,7 +1302,6 @@ am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
+-AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
+ RECHECK_LOGS = $(TEST_LOGS)
+ TEST_SUITE_LOG = test-suite.log
+ TEST_EXTENSIONS = @EXEEXT@ .test
+@@ -1401,8 +1400,6 @@ am__relativize = \
+ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.lz $(distdir).tar.xz
+ GZIP_ENV = --best
+ DIST_TARGETS = dist-lzip dist-xz dist-gzip
+-# Exists only to be overridden by the user if desired.
+-AM_DISTCHECK_DVI_TARGET = dvi
+ distuninstallcheck_listfiles = find . -type f -print
+ am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+@@ -3053,12 +3050,7 @@ dist_xslt_DATA = \
+ data/xslt/xml2text.xsl \
+ data/xslt/xml2xhtml.xsl
+
+-AM_MAKEINFOFLAGS = \
+- --no-split \
+- --set-customization-variable=SECTION_NAME_IN_TITLE=true \
+- --set-customization-variable=AVOID_MENU_REDUNDANCY=true \
+- --set-customization-variable=ICONS=true
+-
++AM_MAKEINFOFLAGS = --no-split
+ info_TEXINFOS = doc/bison.texi
+ doc_bison_TEXINFOS = \
+ $(CROSS_OPTIONS_TEXI) \
+@@ -9262,7 +9254,7 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
+ fi; \
+ echo "$${col}$$br$${std}"; \
+- echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; \
++ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+@@ -9453,7 +9445,7 @@ distcheck: dist
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+- && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
++ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
Index: patches/patch-doc_bison_texi
===================================================================
RCS file: patches/patch-doc_bison_texi
diff -N patches/patch-doc_bison_texi
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-doc_bison_texi 30 Apr 2021 09:43:10 -0000
@@ -0,0 +1,60 @@
+$OpenBSD$
+Base makeinfo doesn't support inlineraw.
+
+Index: doc/bison.texi
+--- doc/bison.texi.orig
++++ doc/bison.texi
+@@ -4,7 +4,6 @@
+ @documentencoding UTF-8
+ @include version.texi
+ @settitle Bison @value{VERSION}
+-@xrefautomaticsectiontitle on
+
+ @c cite a reference in text. Could not find a means to have a single
+ @c definition that looks nice in all the output formats.
+@@ -80,35 +79,25 @@
+
+ @ifnottex
+ @macro colorGreen
+-@inlineraw{html, <span style="color:green">}
+ @end macro
+ @macro colorYellow
+-@inlineraw{html, <span style="color:#ff8000">}
+ @end macro
+ @macro colorRed
+-@inlineraw{html, <span style="color:red">}
+ @end macro
+ @macro colorBlue
+-@inlineraw{html, <span style="color:blue">}
+ @end macro
+ @macro colorPurple
+-@inlineraw{html, <span style="color:darkviolet">}
+ @end macro
+ @macro colorOff
+-@inlineraw{html, </span>}
+ @end macro
+
+ @macro diagError
+-@inlineraw{html, <b style="color:red">}
+ @end macro
+ @macro diagNotice
+-@inlineraw{html, <b style="color:darkcyan">}
+ @end macro
+ @macro diagWarning
+-@inlineraw{html, <b style="color:darkviolet">}
+ @end macro
+ @macro diagOff
+-@inlineraw{html, </b>}
+ @end macro
+ @end ifnottex
+
+@@ -9966,8 +9955,7 @@ if-then-else.y: @dnotice{note}: rerun with option '-Wc
+
+ @noindent
+ Let's rerun @command{bison} with the option
+-@option{-Wcex}/@option{-Wcounterexamples}@inlinefmt{info, (the following
+-output is actually in color)}:
++@option{-Wcex}/@option{-Wcounterexamples}:
+
+ @example
+ if-then-else.y: @dwarning{warning}: 1 shift/reduce conflict [@dwarning{-Wconflicts-sr}]
Index: patches/patch-doc_local_mk
===================================================================
RCS file: /cvs/ports/devel/bison/patches/patch-doc_local_mk,v
retrieving revision 1.1
diff -u -p -r1.1 patch-doc_local_mk
--- patches/patch-doc_local_mk 11 Jul 2020 23:42:05 -0000 1.1
+++ patches/patch-doc_local_mk 30 Apr 2021 09:43:10 -0000
@@ -1,34 +1,19 @@
$OpenBSD: patch-doc_local_mk,v 1.1 2020/07/11 23:42:05 naddy Exp $
-
-Don't depend on the path of the bison executable.
-https://git.savannah.gnu.org/cgit/bison.git/commit/doc/local.mk?id=0782ed327401d1b59c059c89c8630d002260b4f7
-
-PARALLEL MAKE BUG
-Fix build race: Our make(1) treats $(top_srcdir)/doc/bison.help and
-doc/bison.help as distinct targets.
+Base makeinfo doesn't support the --set-customization-variable option.

Index: doc/local.mk
--- doc/local.mk.orig
+++ doc/local.mk
-@@ -90,9 +90,11 @@ MAINTAINERCLEANFILES += $(top_srcdir)/doc/bison.help
- $(top_srcdir)/doc/bison.help: src/bison$(EXEEXT)
- $(AM_V_GEN)LC_ALL=C src/bison$(EXEEXT) --version >doc/bison.help.tmp
- $(AM_V_at) LC_ALL=C src/bison$(EXEEXT) --help | \
-+## Avoid depending on the path to Bison.
-+ sed -e 's,^Usage: .*/bison \[OPTION\],Usage: bison [OPTION],g' \
- ## Avoid variations in the output depending on whether we are
- ## on a glibc system.
-- sed '/translation bugs/d' >>doc/bison.help.tmp
-+ -e '/translation bugs/d' >>doc/bison.help.tmp
- $(AM_V_at)$(top_srcdir)/build-aux/move-if-change doc/bison.help.tmp $@
- endif ! CROSS_COMPILING
-
-@@ -112,7 +114,7 @@ remove_time_stamp = \
+@@ -14,11 +14,7 @@
+ ## You should have received a copy of the GNU General Public License
+ ## along with this program. If not, see <http://www.gnu.org/licenses/>.

- # Depend on configure to get version number changes.
- if ! CROSS_COMPILING
--MAN_DEPS = doc/bison.help doc/bison.x $(top_srcdir)/configure
-+MAN_DEPS = $(top_srcdir)/doc/bison.help doc/bison.x $(top_srcdir)/configure
- endif
+-AM_MAKEINFOFLAGS = \
+- --no-split \
+- --set-customization-variable=SECTION_NAME_IN_TITLE=true \
+- --set-customization-variable=AVOID_MENU_REDUNDANCY=true \
+- --set-customization-variable=ICONS=true
++AM_MAKEINFOFLAGS = --no-split

- $(top_srcdir)/doc/bison.1: $(MAN_DEPS)
+ info_TEXINFOS = %D%/bison.texi
+ %C%_bison_TEXINFOS = \
Index: patches/patch-lib_vasnprintf_c
===================================================================
RCS file: /cvs/ports/devel/bison/patches/patch-lib_vasnprintf_c,v
retrieving revision 1.2
diff -u -p -r1.2 patch-lib_vasnprintf_c
--- patches/patch-lib_vasnprintf_c 23 Oct 2020 21:34:05 -0000 1.2
+++ patches/patch-lib_vasnprintf_c 30 Apr 2021 09:43:10 -0000
@@ -1,21 +0,0 @@
-$OpenBSD: patch-lib_vasnprintf_c,v 1.2 2020/10/23 21:34:05 jca Exp $
-
-Don't use printf %n.
-https://git.savannah.gnu.org/cgit/gnulib.git/commit/lib/vasnprintf.c?id=b954346c6101860c7b462d1b286641d1307afd6c
-
-Index: lib/vasnprintf.c
---- lib/vasnprintf.c.orig
-+++ lib/vasnprintf.c
-@@ -4871,11 +4871,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
-

No comments:

Post a Comment