Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Question:

Question: What's the deal with bison?

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?

MacBook Pro 17, Mac OS X (10.4.10), 4 GB RAM, 160 GB HD

Posted on

Reply

Page content loaded

Jul 13, 2007 6:35 AM in response to David Livesay In response to David Livesay

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.

Jul 13, 2007 6:35 AM

Reply Helpful

Jul 13, 2007 7:14 PM in response to etresoft In response to etresoft

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.

Jul 13, 2007 7:14 PM

Reply Helpful

Jul 14, 2007 2:41 PM in response to David Livesay In response to David Livesay

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.

Jul 14, 2007 2:41 PM

Reply Helpful
User profile for user: David Livesay

Question: What's the deal with bison?