Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autoconf yacc bug workaround #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

bbbrumley
Copy link

@bbbrumley bbbrumley commented Aug 7, 2022

I think #113 is actually an autoconf bug

jqlang/jq#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
...

@nicm
Copy link
Owner

nicm commented Aug 7, 2022

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

@bbbrumley
Copy link
Author

You mean use an older one?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants