Why does my Mac (OS X 10.7.3) have an old version (2.3) of Gnu Bison?

前端 未结 7 783
孤街浪徒
孤街浪徒 2021-02-14 03:15

The version of GNU Bison on my mac is 2.3 but I know that Bison 2.5 was released long ago. The book Flex & Bison uses version 2.5.

Should I upgrade to 2.5 m

7条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-14 04:15

    So I figured out how to get rid of bison build issues on Mojave and Catalina.

    Here's what I did:

    $ brew install bison
    $ cp /usr/local/opt/bison/bin/bison /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/bison
    

    --

    Didn't need admin privileges, the cp command will overwrite the bison binary in your Xcode app with the latest one installed by homebrew.

    now I can do this:

        $ bison -V
    bison (GNU Bison) 3.7.1
    

    Been having so many problems building wine on multiple macOS systems running Mojave. Mostly due to this weird need for a library I've never heard of, but this fix got it working.

提交回复
热议问题