Bison 3.5.90.41-3b05-dirty (built from git, *no* changes, dunno where the "dirty" comes from), on Fedora 31, x86_64.
examples/c/bistromathic build fails, because LC_ALL isn't defined (missing <locale.h>), link references a non-existing/unneeded library -lintl (perhaps needed for other environments?) and is missing the C math library (-lm). The attached patch fixes all those. -- Dr. Horst H. von Brand User #22616 counter.li.org Departamento de Informatica Fono: +56 32 2654431 Universidad Tecnica Federico Santa Maria +56 32 2654239 Casilla 110-V, Valparaiso, Chile 2340000 Fax: +56 32 2797513
diff --git a/examples/c/bistromathic/Makefile b/examples/c/bistromathic/Makefile index c1ac6887..6fbdad44 100644 --- a/examples/c/bistromathic/Makefile +++ b/examples/c/bistromathic/Makefile @@ -14,7 +14,8 @@ LDFLAGS = -L/opt/local/lib BISON_LOCALEDIR = $(shell $(BISON) $(BISON_FLAGS) --print-localedir) CPPFLAGS += -DENABLE_NLS -DBISON_LOCALEDIR='"$(BISON_LOCALEDIR)"' -LIBS = -lreadline -lintl +LIBS = -lreadline -lm all: $(BASE) diff --git a/examples/c/bistromathic/parse.y b/examples/c/bistromathic/parse.y index 925e06f5..b47e859b 100644 --- a/examples/c/bistromathic/parse.y +++ b/examples/c/bistromathic/parse.y @@ -7,6 +7,7 @@ #include <stdio.h> // printf #include <stdlib.h> // calloc #include <string.h> // strcmp + #include <locale.h> #include <readline/readline.h> #include <readline/history.h>
