1

Running macOS Catalina 10.15.6. My question is more related to compilation with GNU tools, so it may be more suited for a different SE site — I'll be happy to close and ask somewhere else if that's the case.

I'm trying to compile software (namely wine-6.0) and the compilation requires bison, for which there's already an executable in /usr/bin. However, bison needs to be version >3.0 to compile the program and the binary in /usr/bin is version 2.7.6. I compiled bison 3.7.6 and I was gonna just move the new bison 3.7 binary into /usr/bin but due to the filesystem protection of macOS, I can't just replace /usr/bin/bison. I'd have to restart my mac in recovery mode to disable the filesystem lock, but I have something open that can't stop running at the moment.

Using ./configure --enable-win64 gives the following error:

checking for bison... bison
checking whether bison is recent enough... no
configure: error: Your bison version is too old. Please install bison version 3.0 or newer.

To fix it, I thought modifying PATH would work; I moved the bison 3.7.6 binary to /usr/local/bin/bison and did export PATH=/usr/local/bin:$PATH before ./configure but it doesn't work; it still just errors about not having bison >3.0 (the same error as before I tried to mess with bison):

checking for bison... bison
checking whether bison is recent enough... no
configure: error: Your bison version is too old. Please install bison version 3.0 or newer.

The weird thing is, just trying to run bison uses the right binary.

$ bison -V
bison (GNU Bison) 3.7.6
Written by Robert Corbett and Richard Stallman.
...

$ which bison
/usr/local/bin/bison

I also tried messing with the configure.ac file a little, but the problem is I don't really know what I'm doing there. Editing the config file and rerunning autoconf and using ./configure then still doesn't work. Ultimately, my question is: how do I ensure ./configure uses the correct bison binary?

0

1 Answer 1

2

My problem was that the bison install was bad.

I compiled bison from source with configure --prefix=/usr/local instead of letting brew decide where to put everything and then made sure PATH was correct when using configure to gen the makefile for the wine compilation, and it worked.

The problem arose from the wine configure script just checking the exit code of running Bison on an empty file to verify the version. Because bison was failing due to a broken install, it was giving the error exit code, causing the configure script to believe bison was an insufficient version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .