Benches macOS

3

What's the deal with bison?

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

This strikes me as a little odd.

file bison

bison: Mach-O universal binary with 2 architectures

bison (for architecture i386): Mach-O executable i386

bison (for architecture ppc): Mach-O executable ppc

bison --version

GNU Bison version 1.28

It looks like Apple went and built a universal binary version of Bison 1.28, which was brand new on July 6, 1999!

Why would they do that?

Do you think it will break anything if I install a more recent version? Like, say, the current one, which is 2.3?

3 replies

Sign in or join Beachball Help to reply.

  1. 0

    etresoft

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Bison isn't the most commonly used program. No one has probably asked them to update it yet. Or, perhaps, there is something in Darwin that either requires 1.28 and they can't upgrade or they don't want to bother to test it.

    In any event, just install your bison to /usr/local and you should be fine.

  2. 0

    David Livesay

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    It may not be the most commonly used program, but anyone who has tried to build PostgreSQL, at least since version 8.0, probably would have seen that warning.

    Besides, in a sense they have updated bison. They have issued a new universal binary build. If this binary had been knocking around since 1999, it wouldn't be a universal binary. It would more likely be a "fat" binary, except that Mac OS X never ran on the 680x0 architecture.

    My concern is that Darwin may, indeed, require 1.28. I was hoping someone with some actual knowledge regarding this point might respond. I've already done the speculating.

    Is it really safe to have two versions of bison installed at the same time? It seems like I'd have to be careful about which version was in whose command path. One problem I noticed almost immediately is that, while my login runs the version of bison in /usr/local/bin by default and root runs /usr/bin/bison by default, man defaults to /usr/share/man/man1/bison.1 for both users, but /usr/local/man/man1/bison.1 is the manpage that was installed with /usr/local/bin/bison, so I'm not getting the right documentation for the version I'm using unless I go out of my way to specify which page man uses. Since the command path is specified by each user's .login file, and the path man uses by /usr/share/misc/man.conf, I can't see any easy way to reconcile this.

  3. 0

    etresoft

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Is it really safe to have two versions of bison

    installed at the same time? It seems like I'd have to

    be careful about which version was in whose command

    path. One problem I noticed almost immediately is

    that, while my login runs the version of bison in

    /usr/local/bin by default and root runs

    /usr/bin/bison by default, man defaults to

    /usr/share/man/man1/bison.1 for both users, but

    /usr/local/man/man1/bison.1 is the manpage that was

    installed with /usr/local/bin/bison, so I'm not

    getting the right documentation for the version I'm

    using unless I go out of my way to specify which page

    man uses. Since the command path is specified by each

    user's .login file, and the path man uses by

    /usr/share/misc/man.conf, I can't see any easy way to

    reconcile this.

    I was just guessing about the geneology of MacOS X Bison. I can assure you it is safe to have multiple copies of Bison. I have my own copies of autoconf and automake. It is quite common to have multiple versions of tools like this.

    You should be able to set MANPATH for your environment so that your newer Bison man shows up. You may have to run makewhatis again.

    If you like man, you should really check out
    Bwana.