How can you change ./configure to use a specific binary over /usr/bin?
1
vote
1
answer
450
views
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?
Asked by Adam Ronald
(31 rep)
May 25, 2021, 03:05 PM
Last activity: May 25, 2021, 04:16 PM
Last activity: May 25, 2021, 04:16 PM