Re: Bison 3.4.1 released [stable]

2019-05-27 Thread Akim Demaille
Hi Dennis,

> Le 26 mai 2019 à 21:09, Dennis Clarke  a écrit :
> 
> On 5/26/19 9:57 AM, Akim Demaille wrote:
>> Hi Dennis!
>> Thanks a lot for your efforts!
> 
> Just trying to help.  Bison really is an essential piece ya know.

I hope it remains this way :)


So, configure runs smoothly.

> I will spare you the twenty pages of compile log however ...
> 
> beta $
> beta $ uname -a
> SunOS beta 5.10 Generic_150400-65 sun4u sparc SUNW,SPARC-Enterprise
> beta $ psrinfo -pv
> The physical processor has 8 virtual processors (0-7)
>  SPARC64-VII+ (portid 1024 impl 0x7 ver 0xa1 clock 2860 MHz)
> beta $
> beta $ /usr/bin/time -p /usr/local/bin/gmake
> .
> .
> .
> /opt/developerstudio12.6/bin/cc -D_STDC_C99= -DEXEEXT=\"\"   -I. -I./lib -I. 
> -I./lib -DINSTALLDIR=\"/usr/local/bin\" -I/usr/local/include -D_EXTENSIONS_ 
> -D__EXTENSIONS__ -D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE 
> -D_REENTRANT   -m64 -xarch=sparc -g -Xa -errfmt=error -erroff=%none 
> -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 
> -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs 
> -xdebugformat=dwarf -errtags=yes -errwarn=%none -D_LARGEFILE64_SOURCE 
> -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO -c -o src/bison-state.o `test -f 
> 'src/state.c' || echo './'`src/state.c
> "./lib/inttypes.h", line 61: #error: "This file assumes that 'int' has 
> exactly 32 bits. Please report your platform and compiler to 
> ."
> cc: acomp failed for src/state.c

Wow.  I will report this to gnulib.  That's a real portability issue.
That was with CC = /opt/developerstudio12.6/bin/cc.


> Let me try again from the top with hard core Oracle Studio C99 compiler
> which is just about as compliant with the specs as anyone could wish
> for.  If software compiles here with C99 then it will compile anywhere
> and that includes your toaster.

My toaster runs with Oracle Java :)



> Let's use the C99 compiler now :
> 
> beta $ echo $CC
> /opt/developerstudio12.6/bin/cc
> beta $ CC=/opt/developerstudio12.6/bin/c99 ; export CC
> beta $
> beta $ ls -lapb /usr/bin/c99
> lrwxrwxrwx   1 root root  32 May 29  2018 /usr/bin/c99 -> 
> /opt/developerstudio12.6/bin/c99*
> beta $
> 
> Just so you know that c99 is installed in the default PATH as well as in
> the usual /opt location.
> 
> A few trivial adjustments to get to a baseline trivial config :
> 
> beta $ CFLAGS='-m64 -xarch=sparc -g -Xc -errfmt=error -erroff=%none 
> -errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 
> -xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs 
> -xdebugformat=dwarf -errtags=yes -errwarn=%none'
> beta $ export CFLAGS
> beta $
> beta $ CPPFLAGS='-D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO'
> beta $ export CPPFLAGS
> beta $ unset EXTRA_CPPFLAGS
> 
> OKay so let's look at what we have here :
> 
> beta $ env | sort | grep -v 'SSH'
> AR=/usr/ccs/bin/ar
> AS=/usr/ccs/bin/as
> AUTOCONF=/usr/local/bin/autoconf
> AUTOHEADER=/usr/local/bin/autoheader
> AUTOMAKE=/usr/local/bin/automake
> AWK=/usr/local/bin/gawk
> BUILD=/usr/local/build
> CC=/opt/developerstudio12.6/bin/c99
> CFLAGS=-m64 -xarch=sparc -g -Xc -errfmt=error -erroff=%none -errshort=full 
> -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 -xregs=no%appl 
> -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 -xs 
> -xdebugformat=dwarf -errtags=yes -errwarn=%none
> COLUMNS=132
> CONFIG_SHELL=/usr/local/bin/bash
> CPPFLAGS=-D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO
> CXX=/opt/developerstudio12.6/bin/CC
> EDITOR=/usr/xpg6/bin/vi
> GREP=/usr/local/bin/grep
> HOME=/export/home/dclarke
> JAVA_HOME=/usr/jdk/latest
> JRE_HOME=/usr/jdk/latest/jre
> LANG=C
> LC_COLLATE=C
> LC_CTYPE=C
> LC_MESSAGES=C
> LC_MONETARY=C
> LC_NUMERIC=C
> LC_TIME=C
> LD=/usr/ccs/bin/sparcv9/ld
> LDFLAGS=-L/usr/local/lib
> LD_OPTIONS=-64 -R/usr/local/lib -L/usr/local/lib
> LD_RUN_PATH=/usr/local/lib
> LIBTOOL_M4=/usr/local/share/aclocal/libtool.m4
> LINES=43
> LOGNAME=dclarke
> M4=/usr/local/bin/m4
> MACHTYPE=sparc-sun-solaris
> MAIL=/usr/mail/dclarke
> MAKE=/usr/local/bin/gmake
> MANPATH=/usr/local/man:/usr/local/share/man:/usr/share/man:/usr/X11/share/man
> NM=/usr/ccs/bin/sparcv9/nm -p
> OLDPWD=/usr/local/build
> OSTYPE=solaris
> PAGER=/usr/xpg4/bin/more
> PATH=/usr/xpg6/bin:/usr/xpg4/bin:/usr/ccs/bin:/usr/jdk/latest/bin:/opt/developerstudio12.6/bin:/sbin:/bin:/usr/bin:/usr/sbin:/usr/dt/bin:/usr/openwin/bin:/usr/X11/bin:/opt/schily/bin
> PCRE_CONFIG=/usr/local/bin/pcre-config
> PERL=/usr/local/bin/perl
> PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
> PWD=/usr/local/build/bison-3.4.1.5-1dcd6_SunOS5.10_sparc64vii+.002
> SED=/usr/local/bin/sed
> SHELL=/usr/local/bin/bash
> SHLVL=0
> SRC=/usr/local/src
> SSL_CERT_DIR=/usr/local/ssl/certs
> TERM=xterm
> TMPDIR=/var/tmp/dclarke
> TZ=GMT0
> USER=dclarke
> VISUAL=/usr/xpg4/bin/vi
> XTERM_LOCALE=C
> YACC=/usr/local/bin/bison
> _=/usr/xpg4/bin/env
> beta $
> 
> Note that the -Xc 

Re: Bison 3.4.1 released [stable]

2019-05-26 Thread Dennis Clarke

On 5/26/19 9:57 AM, Akim Demaille wrote:

Hi Dennis!

Thanks a lot for your efforts!


Just trying to help.  Bison really is an essential piece ya know.
Also I am so thankful you are not on github. I am trying ( was
trying ) to sort out flex but it is on github and just a pain.
They had a great little maillist which worked fine for decades.
Anyways ... let look at bison here.


corv $
corv $ /bin/bash --version
GNU bash, version 3.2.57(1)-release (sparc-sun-solaris2.10)
Copyright (C) 2007 Free Software Foundation, Inc.
corv $ SHELL=/bin/bash ; export SHELL
corv $

.
.
.

FAIL: examples/c/mfcalc/mfcalc.test


Well, this appears to be caused by my crap, not Oracle's.


Oh darn.



I apologize for the waste of time that followed (including installing a more 
modern version of Bash).



Hardly a waste. I did get recent bash built and installed fine.
Also, may have said this, bison is essential.


If you are still willing to try Bison 3.4 on these boxes, please give a try to 
this version, which includes the patch at the bottom of this message.

https://www.lrde.epita.fr/~akim/private/bison/bison-3.4.1.5-1dcd6.tar.gz
https://www.lrde.epita.fr/~akim/private/bison/bison-3.4.1.5-1dcd6.tar.xz



OKay, let's jump on that.

Here is *everything* I see :

beta $ cd /usr/local/build
beta $ gzip -dc ../src/bison-3.4.1.5-1dcd6.tar.gz | tar -xf -
beta $
beta $ ls -ladtr bison* | tail -12
drwxr-xr-x   2 dclarke  devl   5 Feb  6 21:03 bison_3.3.2_tests
-rwxr-xr-x   1 dclarke  devl4827 May 25 18:21 
bison-3.4.1_SunOS5.10_sparc64vii+.001.setup.sh
-rw-r--r--   1 dclarke  devl2716 May 25 18:21 
bison-3.4.1_SunOS5.10_sparc64vii+.001.env
-rw-r--r--   1 dclarke  devl   24075 May 25 18:25 
bison-3.4.1_SunOS5.10_sparc64vii+.001.config.log
-rw-r--r--   1 dclarke  devl 380 May 25 18:25 
bison-3.4.1_SunOS5.10_sparc64vii+.001.config
-rw-r--r--   1 dclarke  devl2903 May 25 18:32 
bison-3.4.1_SunOS5.10_sparc64vii+.001.env2
-rw-r--r--   1 dclarke  devl   25396 May 25 18:34 
bison-3.4.1_SunOS5.10_sparc64vii+.001.config.log2
-rw-r--r--   1 dclarke  devl  160655 May 25 18:36 
bison-3.4.1_SunOS5.10_sparc64vii+.001.compile.log
drwxr-xr-x  14 dclarke  devl  44 May 25 18:38 
bison-3.4.1_SunOS5.10_sparc64vii+.001
-rw-r--r--   1 dclarke  devl   13601 May 25 18:38 
bison-3.4.1_SunOS5.10_sparc64vii+.001.check.log

drwxr-xr-x  14 dclarke  devl  37 May 26 13:39 bison-3.4.1.5-1dcd6
beta $
beta $ mv bison-3.4.1.5-1dcd6 bison-3.4.1.5-1dcd6_SunOS5.10_sparc64vii+.001
beta $ cd bison-3.4.1.5-1dcd6_SunOS5.10_sparc64vii+.001
beta $ cp -p ../bison-3.4.1_SunOS5.10_sparc64vii+.001.setup.sh 
../bison-3.4.1.5-1dcd6_SunOS5.10_sparc64vii+.001.setup.sh

beta $ touch ../bison-3.4.1.5-1dcd6_SunOS5.10_sparc64vii+.001.setup.sh
beta $ . ../bison-3.4.1.5-1dcd6_SunOS5.10_sparc64vii+.001.setup.sh
INFO : found pcre-config
INFO : PCRE_CONFIG set to /usr/local/bin/pcre-config
INFO : env var TMPDIR=/var/tmp/dclarke
 : ls -lad /var/tmp/dclarke
drwxr-x---   4 dclarke  devl  17 May 26 17:54 /var/tmp/dclarke
beta $
beta $ env | sort | grep -v 'SSH'
AR=/usr/ccs/bin/ar
AS=/usr/ccs/bin/as
AUTOCONF=/usr/local/bin/autoconf
AUTOHEADER=/usr/local/bin/autoheader
AUTOMAKE=/usr/local/bin/automake
AWK=/usr/local/bin/gawk
BUILD=/usr/local/build
CC=/opt/developerstudio12.6/bin/cc
CC_FOR_BUILD=/opt/developerstudio12.6/bin/cc
CFLAGS=-m64 -xarch=sparc -g -Xa -errfmt=error -erroff=%none 
-errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 
-xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 
-xs -xdebugformat=dwarf -errtags=yes -errwarn=%none 
-D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO
CFLAGS_FOR_BUILD=-m64 -xarch=sparc -g -Xa -errfmt=error -erroff=%none 
-errshort=full -xstrconst -xildoff -xmemalign=8s -xnolibmil -xcode=pic32 
-xregs=no%appl -xlibmieee -mc -ftrap=%none -xbuiltin=%none -xunroll=1 
-xs -xdebugformat=dwarf -errtags=yes -errwarn=%none 
-D_LARGEFILE64_SOURCE -D_POSIX_PTHREAD_SEMANTICS -D_TS_ERRNO

COLUMNS=132
CONFIG_SHELL=/usr/local/bin/bash
CPPFLAGS=-I/usr/local/include -D_EXTENSIONS_ -D__EXTENSIONS__ 
-D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE
CPPFLAGS_FOR_BUILD=-I/usr/local/include -D_EXTENSIONS_ -D__EXTENSIONS__ 
-D_TS_ERRNO -D_POSIX_PTHREAD_SEMANTICS -D_LARGEFILE64_SOURCE

CXX=/opt/developerstudio12.6/bin/CC
EDITOR=/usr/xpg6/bin/vi
EXTRA_CPPFLAGS=-D__EXTENSIONS__ -D_EXTENSIONS_
GREP=/usr/local/bin/grep
HOME=/export/home/dclarke
JAVA_HOME=/usr/jdk/latest
JRE_HOME=/usr/jdk/latest/jre
LANG=C
LC_COLLATE=C
LC_CTYPE=C
LC_MESSAGES=C
LC_MONETARY=C
LC_NUMERIC=C
LC_TIME=C
LD=/usr/ccs/bin/sparcv9/ld
LDFLAGS=-L/usr/local/lib
LDFLAGS_FOR_BUILD=-L/usr/local/lib
LD_OPTIONS=-64 -R/usr/local/lib -L/usr/local/lib
LD_RUN_PATH=/usr/local/lib
LIBTOOL_M4=/usr/local/share/aclocal/libtool.m4
LINES=43
LOGNAME=dclarke
M4=/usr/local/bin/m4
MACHTYPE=sparc-sun-solaris
MAIL=/usr/mail/dclarke
MAKE=/usr/local/bin/gmake

Re: Bison 3.4.1 released [stable]

2019-05-26 Thread Akim Demaille
Hi Dennis!

Thanks a lot for your efforts!

> Le 25 mai 2019 à 19:11, Dennis Clarke  a écrit :
> 
> Here is the crap from Oracle :
> 
> corv $
> corv $ /bin/bash --version
> GNU bash, version 3.2.57(1)-release (sparc-sun-solaris2.10)
> Copyright (C) 2007 Free Software Foundation, Inc.
> corv $

It's not recent, indeed, but it should work for the test suite.

>> Something like make check SHELL=/bin/bash should work.
> 
> I agree totally.
> 
> Should.
> 
> corv $
> corv $ /bin/bash --version
> GNU bash, version 3.2.57(1)-release (sparc-sun-solaris2.10)
> Copyright (C) 2007 Free Software Foundation, Inc.
> corv $ SHELL=/bin/bash ; export SHELL
> corv $
> 
> .
> .
> .
> 
> FAIL: examples/c/mfcalc/mfcalc.test

Well, this appears to be caused by my crap, not Oracle's.  I'm sorry to report 
that I believed that the test suite was using SHELL, but it didn't (back to 
"should")...

I apologize for the waste of time that followed (including installing a more 
modern version of Bash).

If you are still willing to try Bison 3.4 on these boxes, please give a try to 
this version, which includes the patch at the bottom of this message.

https://www.lrde.epita.fr/~akim/private/bison/bison-3.4.1.5-1dcd6.tar.gz
https://www.lrde.epita.fr/~akim/private/bison/bison-3.4.1.5-1dcd6.tar.xz

>> Well, the thing is that it's a pain to be compliant with them, if it's 
>> useless.
> 
> Pain?  Let me tell you about pain.  I had a pile of Oracle/Solaris zones
> running in production within a finance corp and had to get up to date
> Apache httpd there as well as OpenSSL with latest TLS 1.3 and then php
> also.  A horror show nightmare. A nightmare I tell you.

Wow...  I had no idea you faced such challenges, but I can imagine
(well, probably only vaguely) how tricky it must be to shoehorn
new pieces of software onto an old platform.

> Simple solution?  Install a deck load of Debian and FreeBSD boxen. All
> problems go away with 10Gbit LACP and backend storage and VMware ESXi
> and other modern solutions.

Yes, I can imagine how suddenly friction and viscosity is reduced.

> Anyways Solaris on sparc is a curse.

It used to be a beautiful environment.  Their chips are so much better
than Intel's (well, Itanium was promising, but actually it's not even
Intel that started it).

But now all this is bit-rotten.

> I think I am qualified to say so.
> It has three features : very expensive, very slow, very power hungry and
> runs hot as anything you can imagine.  Four.  Four features.

:) :) :)

> Also nothing else runs on sparc.  Not any recent sparc.
> 
> Anyways, rant aside, there are shells out there other than bash and so
> it may be of some limited value to make the scripts and such really
> baseline old school compliant.  However is it worth the effort?

Well, it really depends on the cost.  Migrating to full support for
the native shell is probably too painful (and with a negative impact
for new users: the "example/test" shell script is installed with
the examples and meant to be read by end users, whom I'd like to
protect from antique idioms such as `...` (which cannot be nested
safely) instead of $(...)).  But supporting properly $SHELL is
definitely Bison should do.

> Here we flip a coin.  Personally I choose to not ruin a nice Saturday.

I hope you enjoyed the rest of it!

Thanks again, Dennis, for having spent so much time on Bison's test suite.

Cheers!


commit 1dcd6068dd3cbd5fd8e041fd6351651b0bdb84ef
Author: Akim Demaille 
Date:   Sun May 26 15:29:37 2019 +0200

tests: take SHELL into account

Reported by Dennis Clarke.
http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00053.html

* examples/local.mk, tests/local.mk: here.

diff --git a/examples/local.mk b/examples/local.mk
index ff04345c..db6fe650 100644
--- a/examples/local.mk
+++ b/examples/local.mk
@@ -33,7 +33,7 @@
 ## which guarantees that parse.y is indeed shipped.
 
 dist_noinst_SCRIPTS = %D%/extexi %D%/test
-TEST_LOG_COMPILER = $(top_srcdir)/%D%/test
+TEST_LOG_COMPILER = $(SHELL) $(top_srcdir)/%D%/test
 
 AM_CXXFLAGS =  \
   $(WARN_CXXFLAGS) $(WARN_CXXFLAGS_TEST) $(WERROR_CXXFLAGS)
diff --git a/tests/local.mk b/tests/local.mk
index c8ee3f02..7c233042 100644
--- a/tests/local.mk
+++ b/tests/local.mk
@@ -85,7 +85,7 @@ $(TESTSUITE): $(TESTSUITE_AT)
 ##  ##
 
 # Move into %D%/ so that testsuite.dir etc. be created there.
-RUN_TESTSUITE = $(TESTSUITE) -C %D% $(TESTSUITEFLAGS)
+RUN_TESTSUITE = $(SHELL) $(TESTSUITE) -C %D% $(TESTSUITEFLAGS)
 check_SCRIPTS += $(BISON) %D%/atconfig %D%/atlocal
 RUN_TESTSUITE_deps = all $(TESTSUITE) $(check_SCRIPTS)
 




Re: Bison 3.4.1 released [stable]

2019-05-25 Thread Dennis Clarke




Well damn ... even with bash 5.0.7 total fail :


gmake[3]: 'tests/bison' is up to date.
gmake[3]: Nothing to be done for 'tests/atconfig'.
gmake[3]: 'tests/atlocal' is up to date.
gmake[3]: Leaving directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001'

/usr/local/bin/gmake  check-TESTS check-local
gmake[3]: Entering directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001'
gmake[4]: Entering directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001'

FAIL: examples/c/mfcalc/mfcalc.test
FAIL: examples/c/rpcalc/rpcalc.test
FAIL: examples/c/calc/calc.test
FAIL: examples/c++/simple.test
FAIL: examples/c++/variant.test
FAIL: examples/c++/variant-11.test
FAIL: examples/java/Calc.test

Testsuite summary for GNU Bison 3.4.1

# TOTAL: 7
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  7
# XPASS: 0
# ERROR: 0

See ./test-suite.log
Please report to bug-bison@gnu.org




--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional





















Re: Bison 3.4.1 released [stable]

2019-05-25 Thread Dennis Clarke




Which is really silly, and really bad for text editor that try to match parens.

Don't you have bash installed?


.
.
.


I'll give it a try with bash 5.0.7 :


beta $
beta $ uptime
  6:17pm  up 26 min(s),  1 user,  load average: 0.05, 0.07, 0.06
beta $ /usr/local/bin/bash --version
GNU bash, version 5.0.7(1)-release (sparc-sun-solaris2.10)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 



This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
beta $ /usr/local/bin/bash
bash-5.0$ PS1=beta\$\
beta$


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional










Re: Bison 3.4.1 released [stable]

2019-05-25 Thread Dennis Clarke

On 5/25/19 12:55 PM, Akim Demaille wrote:

Hi Dennis,


Le 25 mai 2019 à 16:11, Dennis Clarke  a écrit :

On 5/25/19 2:38 AM, Akim Demaille wrote:

Hi Dennis,

Le 24 mai 2019 à 08:53, Dennis Clarke  a écrit :

On 5/22/19 3:34 PM, Akim Demaille wrote:

The Bison team is sad to announce the crash of Bison 3.4.
May its cores rest in peace.
Rejoice!  Bison 3.4 is born again!  And he shall be called Bison 3.4.1.


Builds fine on ye ol Solaris 10 sparc boxen and fails every test :

Well, not "every", just the ones in examples/.  But because they failed, the 
main test suite was skipped.  You can try with make check-local instead of make check.


yeah .. that fails too :

3.4.1_SunOS5.10_sparc64vii+.001'
./tests/testsuite -C tests
./tests/testsuite: syntax error at line 53383: `(' unexpected
gmake: *** [Makefile:8439: check-local] Error 2


The problem is here:

   # Number of found conflicts.
   case $gram in
 (sr)sr_count=1; rr_count=0;;
 (rr)sr_count=0; rr_count=1;;
 (sr-rr) sr_count=1; rr_count=1;;
   esac

With old shells, you have to write (no opening parens)

   # Number of found conflicts.
   case $gram in
 sr)sr_count=1; rr_count=0;;
 rr)sr_count=0; rr_count=1;;
 sr-rr) sr_count=1; rr_count=1;;
   esac

Which is really silly, and really bad for text editor that try to match parens.

Don't you have bash installed?


Of course.

Here is the crap from Oracle :

corv $
corv $ /bin/bash --version
GNU bash, version 3.2.57(1)-release (sparc-sun-solaris2.10)
Copyright (C) 2007 Free Software Foundation, Inc.
corv $




I can make the test suite more portable (if we work together), but the simplest 
would really be to use a more modern shell to run the tests.  Something like

make check SHELL=/bin/bash

should work.



I agree totally.

Should.

corv $
corv $ /bin/bash --version
GNU bash, version 3.2.57(1)-release (sparc-sun-solaris2.10)
Copyright (C) 2007 Free Software Foundation, Inc.
corv $ SHELL=/bin/bash ; export SHELL
corv $

.
.
.

FAIL: examples/c/mfcalc/mfcalc.test
FAIL: examples/c/rpcalc/rpcalc.test
FAIL: examples/c/calc/calc.test
FAIL: examples/c++/simple.test
FAIL: examples/c++/variant.test
FAIL: examples/c++/variant-11.test

Testsuite summary for GNU Bison 3.4.1

# TOTAL: 6
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  6
# XPASS: 0
# ERROR: 0


ha.

lovely.




Would be nice if an old XPG4 POSIX type shell would suffice but I know
that is crazy these days.


:)

Well, the thing is that it's a pain to be compliant with them, if it's useless.


Pain?  Let me tell you about pain.  I had a pile of Oracle/Solaris zones
running in production within a finance corp and had to get up to date
Apache httpd there as well as OpenSSL with latest TLS 1.3 and then php
also.  A horror show nightmare. A nightmare I tell you.

Simple solution?  Install a deck load of Debian and FreeBSD boxen. All
problems go away with 10Gbit LACP and backend storage and VMware ESXi
and other modern solutions.

Anyways Solaris on sparc is a curse.  I think I am qualified to say so.
It has three features : very expensive, very slow, very power hungry and
runs hot as anything you can imagine.  Four.  Four features.

Also nothing else runs on sparc.  Not any recent sparc.

Anyways, rant aside, there are shells out there other than bash and so
it may be of some limited value to make the scripts and such really
baseline old school compliant.  However is it worth the effort?

Here we flip a coin.  Personally I choose to not ruin a nice Saturday.


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional





Re: Bison 3.4.1 released [stable]

2019-05-25 Thread Akim Demaille
Hi Dennis,

> Le 25 mai 2019 à 16:11, Dennis Clarke  a écrit :
> 
> On 5/25/19 2:38 AM, Akim Demaille wrote:
>> Hi Dennis,
>>> Le 24 mai 2019 à 08:53, Dennis Clarke  a écrit :
>>> 
>>> On 5/22/19 3:34 PM, Akim Demaille wrote:
 The Bison team is sad to announce the crash of Bison 3.4.
 May its cores rest in peace.
 Rejoice!  Bison 3.4 is born again!  And he shall be called Bison 3.4.1.
>>> 
>>> Builds fine on ye ol Solaris 10 sparc boxen and fails every test :
>> Well, not "every", just the ones in examples/.  But because they failed, the 
>> main test suite was skipped.  You can try with make check-local instead of 
>> make check.
> 
> yeah .. that fails too :
> 
> 3.4.1_SunOS5.10_sparc64vii+.001'
> ./tests/testsuite -C tests
> ./tests/testsuite: syntax error at line 53383: `(' unexpected
> gmake: *** [Makefile:8439: check-local] Error 2

The problem is here:

  # Number of found conflicts.
  case $gram in
(sr)sr_count=1; rr_count=0;;
(rr)sr_count=0; rr_count=1;;
(sr-rr) sr_count=1; rr_count=1;;
  esac

With old shells, you have to write (no opening parens)

  # Number of found conflicts.
  case $gram in
sr)sr_count=1; rr_count=0;;
rr)sr_count=0; rr_count=1;;
sr-rr) sr_count=1; rr_count=1;;
  esac

Which is really silly, and really bad for text editor that try to match parens.

Don't you have bash installed?

I can make the test suite more portable (if we work together), but the simplest 
would really be to use a more modern shell to run the tests.  Something like

make check SHELL=/bin/bash

should work.


> Would be nice if an old XPG4 POSIX type shell would suffice but I know
> that is crazy these days.

:)

Well, the thing is that it's a pain to be compliant with them, if it's useless. 
 If some users do want to use them (and have no alternatives, such as 
installing bash), we can work on it.


Re: Bison 3.4.1 released [stable]

2019-05-25 Thread Dennis Clarke

On 5/25/19 10:25 AM, uxio prego wrote:

Hi,


On 25 May 2019, at 16:11, Dennis Clarke  wrote:

[...]


FAIL: examples/c++/variant-11
=

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c++/variant-11.test (exit status: 2)

corv $

Some sort of weird me=$ thing there.

This is because I used $(...) in these tests, which exists only in not too 
ancient shells.
Replacing all the $(...) by `...` in examples/test should address the issue.


Nope. There are no three dots in that file.


The three dots must be an example place holder.

http://git.savannah.gnu.org/cgit/bison.git/tree/examples/test?h=aa21c457#n21

me=`basename "$1" .test`
http://git.savannah.gnu.org/cgit/bison.git/commit/examples/test?h=a4dce889a4

Here seems it was already included in the 3.3 tag:
https://github.com/akimd/bison/commit/a4dce889a44a7d363ce670585704876857543a5e



Well. I have to shrug. Working to get anything running on Solaris 10 is
a waste of time at this point.  I have bison 3.3.2 and that should
suffice :

corv # uname -a
SunOS corv 5.10 Generic_150400-65 sun4u sparc SUNW,SPARC-Enterprise
corv # /usr/local/bin/bison --version
bison (GNU Bison) 3.3.2
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
corv #
corv # exit

corv console login:


Dennis




Re: Bison 3.4.1 released [stable]

2019-05-25 Thread Dennis Clarke

On 5/25/19 2:38 AM, Akim Demaille wrote:

Hi Dennis,


Le 24 mai 2019 à 08:53, Dennis Clarke  a écrit :

On 5/22/19 3:34 PM, Akim Demaille wrote:

The Bison team is sad to announce the crash of Bison 3.4.
May its cores rest in peace.
Rejoice!  Bison 3.4 is born again!  And he shall be called Bison 3.4.1.


Builds fine on ye ol Solaris 10 sparc boxen and fails every test :


Well, not "every", just the ones in examples/.  But because they failed, the 
main test suite was skipped.  You can try with make check-local instead of make check.



yeah .. that fails too :

corv $ PATH=`pwd`/src:$PATH /usr/local/bin/gmake check-local 2>&1 | tee 
../bison-3.4.1_SunOS5.10_sparc64vii+.001.check-local.log

/usr/local/bin/gmake  all-recursive
gmake[1]: Entering directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001'

Making all in po
gmake[2]: Entering directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001/po'

gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001/po'

Making all in runtime-po
gmake[2]: Entering directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001/runtime-po'

gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001/runtime-po'

Making all in gnulib-po
gmake[2]: Entering directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001/gnulib-po'

gmake[2]: Nothing to be done for 'all'.
gmake[2]: Leaving directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001/gnulib-po'

Making all in .
gmake[2]: Entering directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001'

LC_ALL=C tests/bison --version >doc/bison.help.tmp
LC_ALL=C tests/bison --help | \
  sed -e 's,^Usage: .*/bison \[OPTION\],Usage: bison [OPTION],g' \
  -e '/translation bugs/d'  >>doc/bison.help.tmp
./build-aux/move-if-change doc/bison.help.tmp doc/bison.help
gmake[2]: Leaving directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001'
gmake[1]: Leaving directory 
'/usr/local/build/bison-3.4.1_SunOS5.10_sparc64vii+.001'

./tests/testsuite -C tests
./tests/testsuite: syntax error at line 53383: `(' unexpected
gmake: *** [Makefile:8439: check-local] Error 2
corv $



FAIL: examples/c++/variant-11
=

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c++/variant-11.test (exit status: 2)

corv $

Some sort of weird me=$ thing there.


This is because I used $(...) in these tests, which exists only in not too 
ancient shells.

Replacing all the $(...) by `...` in examples/test should address the issue.



Nope. There are no three dots in that file.

Would be nice if an old XPG4 POSIX type shell would suffice but I know
 that is crazy these days.

Dennis



Re: Bison 3.4.1 released [stable]

2019-05-25 Thread Akim Demaille
Hi Dennis,

> Le 24 mai 2019 à 08:53, Dennis Clarke  a écrit :
> 
> On 5/22/19 3:34 PM, Akim Demaille wrote:
>> The Bison team is sad to announce the crash of Bison 3.4.
>> May its cores rest in peace.
>> Rejoice!  Bison 3.4 is born again!  And he shall be called Bison 3.4.1.
> 
> Builds fine on ye ol Solaris 10 sparc boxen and fails every test :

Well, not "every", just the ones in examples/.  But because they failed, the 
main test suite was skipped.  You can try with make check-local instead of make 
check.

> FAIL: examples/c++/variant-11
> =
> 
> ./examples/test: syntax error at line 21: `me=$' unexpected
> FAIL examples/c++/variant-11.test (exit status: 2)
> 
> corv $
> 
> Some sort of weird me=$ thing there.

This is because I used $(...) in these tests, which exists only in not too 
ancient shells.

Replacing all the $(...) by `...` in examples/test should address the issue.

Thanks!


Re: Bison 3.4.1 released [stable]

2019-05-24 Thread Dennis Clarke

On 5/22/19 3:34 PM, Akim Demaille wrote:


The Bison team is sad to announce the crash of Bison 3.4.
May its cores rest in peace.

Rejoice!  Bison 3.4 is born again!  And he shall be called Bison 3.4.1.



Builds fine on ye ol Solaris 10 sparc boxen and fails every test :

corv $
corv $ ./src/bison --version
bison (GNU Bison) 3.4.1
Written by Robert Corbett and Richard Stallman.

Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
corv $
corv $ cat ./test-suite.log
===
   GNU Bison 3.4.1: ./test-suite.log
===

# TOTAL: 6
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  6
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: examples/c/mfcalc/mfcalc
==

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c/mfcalc/mfcalc.test (exit status: 2)

FAIL: examples/c/rpcalc/rpcalc
==

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c/rpcalc/rpcalc.test (exit status: 2)

FAIL: examples/c/calc/calc
==

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c/calc/calc.test (exit status: 2)

FAIL: examples/c++/simple
=

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c++/simple.test (exit status: 2)

FAIL: examples/c++/variant
==

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c++/variant.test (exit status: 2)

FAIL: examples/c++/variant-11
=

./examples/test: syntax error at line 21: `me=$' unexpected
FAIL examples/c++/variant-11.test (exit status: 2)

corv $

Some sort of weird me=$ thing there.

--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional




Re: Bison 3.4.1 released [stable]

2019-05-23 Thread Dennis Clarke

On 5/23/19 6:07 PM, Richard Stallman wrote:

[[[ To any NSA and FBI agents reading my email: please consider]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

The bison is dead; long live the bison!



Someone please get american politics out of the software world.
That would be nice.


--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
GreyBeard and suspenders optional



Re: Bison 3.4.1 released [stable]

2019-05-22 Thread Hans Åberg


> On 22 May 2019, at 22:27, Akim Demaille  wrote:
> 
>> Le 22 mai 2019 à 22:26, Hans Åberg  a écrit :
>> 
>>> On 22 May 2019, at 21:34, Akim Demaille  wrote:
>>> 
>>> The Bison team … Bison 3.4.1.
>> 
>> A bug, that was also in 3.4:
>> 
>> # make install-pdf
>> Making install-pdf in po
>> make[1]: *** No rule to make target `install-pdf'.  Stop.
>> make: *** [install-pdf-recursive] Error 1
> 
> Yes, known issue Hans.  I wait until a modern gettext hits my environment.

Who knows, perhaps I am the only one using it. :-)

> Thanks.

You are welcome.





Re: Bison 3.4.1 released [stable]

2019-05-22 Thread Akim Demaille



> Le 22 mai 2019 à 22:26, Hans Åberg  a écrit :
> 
> 
>> On 22 May 2019, at 21:34, Akim Demaille  wrote:
>> 
>> The Bison team … Bison 3.4.1.
> 
> A bug, that was also in 3.4:
> 
> # make install-pdf
> Making install-pdf in po
> make[1]: *** No rule to make target `install-pdf'.  Stop.
> make: *** [install-pdf-recursive] Error 1

Yes, known issue Hans.  I wait until a modern gettext hits my environment.

Thanks.


Re: Bison 3.4.1 released [stable]

2019-05-22 Thread Hans Åberg


> On 22 May 2019, at 21:34, Akim Demaille  wrote:
> 
> The Bison team … Bison 3.4.1.

A bug, that was also in 3.4:

# make install-pdf
Making install-pdf in po
make[1]: *** No rule to make target `install-pdf'.  Stop.
make: *** [install-pdf-recursive] Error 1





Bison 3.4.1 released [stable]

2019-05-22 Thread Akim Demaille


The Bison team is sad to announce the crash of Bison 3.4.
May its cores rest in peace.

Rejoice!  Bison 3.4 is born again!  And he shall be called Bison 3.4.1.

A particular focus was put on improving the diagnostics, which are now
colored by default, and accurate with multibyte input.  Their format was
also changed, and is now similar to GCC 9's diagnostics.

Users of the default backend (yacc.c) can use the new %define variable
api.header.include to avoid duplicating the content of the generated header
in the generated parser.  There are two new examples installed, including a
reentrant calculator which supports recursive calls to the parser and
Flex-generated scanner.

See below for more details.

==

Bison is a general-purpose parser generator that converts an annotated
context-free grammar into a deterministic LR or generalized LR (GLR) parser
employing LALR(1) parser tables.  Bison can also generate IELR(1) or
canonical LR(1) parser tables.  Once you are proficient with Bison, you can
use it to develop a wide range of language parsers, from those used in
simple desk calculators to complex programming languages.

Bison is upward compatible with Yacc: all properly-written Yacc grammars
work with Bison with no change.  Anyone familiar with Yacc should be able to
use Bison with little trouble.  You need to be fluent in C, C++ or Java
programming in order to use Bison.

Here is the GNU Bison home page:
   https://gnu.org/software/bison/

==

Here are the compressed sources:
  https://ftp.gnu.org/gnu/bison/bison-3.4.1.tar.gz   (4.1MB)
  https://ftp.gnu.org/gnu/bison/bison-3.4.1.tar.xz   (3.1MB)

Here are the GPG detached signatures[*]:
  https://ftp.gnu.org/gnu/bison/bison-3.4.1.tar.gz.sig
  https://ftp.gnu.org/gnu/bison/bison-3.4.1.tar.xz.sig

Use a mirror for higher download bandwidth:
  https://www.gnu.org/order/ftp.html

[*] Use a .sig file to verify that the corresponding file (without the
.sig suffix) is intact.  First, be sure to download both the .sig file
and the corresponding tarball.  Then, run a command like this:

  gpg --verify bison-3.4.1.tar.gz.sig

If that command fails because you don't have the required public key,
then run this command to import it:

  gpg --keyserver keys.gnupg.net --recv-keys 0DDCAA3278D5264E

and rerun the 'gpg --verify' command.

This release was bootstrapped with the following tools:
  Autoconf 2.69
  Automake 1.16.1
  Flex 2.6.4
  Gettext 0.19.8.1
  Gnulib v0.1-2563-gd654989d8

==

NEWS

* Noteworthy changes in release 3.4.1 (2019-05-22) [stable]

** Bug fixes

  Portability fixes.

* Noteworthy changes in release 3.4 (2019-05-19) [stable]

** Deprecated features

  The %pure-parser directive is deprecated in favor of '%define api.pure'
  since Bison 2.3b (2008-05-27), but no warning was issued; there is one
  now.  Note that since Bison 2.7 you are strongly encouraged to use
  '%define api.pure full' instead of '%define api.pure'.

** New features

*** Colored diagnostics

  As an experimental feature, diagnostics are now colored, controlled by the
  new options --color and --style.

  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/gnu/gettext/libtextstyle-0.8.tar.gz

  The option --color supports the following arguments:
- always, yes: Enable colors.
- never, no: Disable colors.
- auto, tty (default): Enable colors if the output device is a tty.

  To customize the styles, create a CSS file similar to

/* bison-bw.css */
.warning   { }
.error { font-weight: 800; text-decoration: underline; }
.note  { }

  then invoke bison with --style=bison-bw.css, or set the BISON_STYLE
  environment variable to "bison-bw.css".

*** Disabling output

  When given -fsyntax-only, the diagnostics are reported, but no output is
  generated.

  The name of this option is somewhat misleading as bison does more than
  just checking the syntax: every stage is run (including checking for
  conflicts for instance), except the generation of the output files.

*** Include the generated header (yacc.c)

  Before, when --defines is used, bison generated a header, and pasted an
  exact copy of it into the generated parser implementation file.  If the
  header name is not "y.tab.h", it is now #included instead of being
  duplicated.

  To use an '#include' even if the header name is "y.tab.h" (which is what
  happens with --yacc, or when using the Autotools' ylwrap), define
  api.header.include to the exact argument to pass to #include.  For
  instance:

%define api.header.include {"parse.h"}

  or

%define api.header.include {}

*** api.location.type is now supported in C (yacc.c, glr.c)

  The %define variable api.location.type