fdm icon indicating copy to clipboard operation
fdm copied to clipboard

autoconf yacc bug workaround

Open bbbrumley opened this issue 3 years ago • 2 comments

I think #113 is actually an autoconf bug

https://github.com/stedolan/jq/issues/1093

https://savannah.gnu.org/support/?110266

I don't think the bug is really fixed yet. And I tried to switch to AC_PROG_BISON like in that bug report, but my toolchain didn't recognize the macro.

I am no automake expert but this PR solved it for me.

$ ./configure --prefix=$HOME/.local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for yacc... no
configure: error: "yacc not found"

Then after installing bison, which for me was sudo apt install bison

$ ./configure --prefix=$HOME/.local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for yacc... yacc
checking for bison... (cached) yacc
checking how to run the C preprocessor... gcc -E
...

bbbrumley avatar Aug 07 '22 16:08 bbbrumley

I don't think this necessary. If the macro is broken in some autoconf versions, use an older or newer one.

nicm avatar Aug 07 '22 16:08 nicm

You mean use an older one?

Like I said, the autoconf bug doesn't seem to be fixed even after all these years.

bbbrumley avatar Aug 07 '22 17:08 bbbrumley