In my previous post I was trying to get PHP 5.5 beta 1 compiled on my OSX laptop. It turns out that Mountain Lion ships with a version of Bison from 2006. Really Apple? There is a difference between being a hipster and being old. Let’s fix this! If you have not read it already and installed autoconf and git, make sure to do so.
Upgrading Bison:
- Go to http://ftp.gnu.org/gnu/bison/ and get 2.6.2. Why not 2.7.1? Because PHP doesn’t support it yet. You would need to manually patch Zend/acinclude.m4 to allow for it.
- tar -zxvf bison-2.7.1.tar.gz
- cd bison-2.7.1
- ./configure –prefix=/usr/local
- make
- sudo make install
- export PATH=/usr/local/bin:$PATH
Now we have a new version of bison in /usr/local/bin. Time to configure php again.
./configure --with-apxs2=/usr/sbin/apxs --enable-cli --with-config-file-path=/etc --with-libxml-dir=/usr --with-openssl=/usr --with-kerberos=/usr --with-zlib=/usr --enable-bcmath --with-bz2=/usr --enable-calendar --disable-cgi --with-curl=/usr --enable-mbstring --enable-mbregex --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=/var/mysql/mysql.sock --with-libedit --with-readline=/usr --enable-shmop --with-snmp=/usr --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-tidy --with-iconv-dir=/usr --enable-zip
And it worked! Will it blend?
make ... Build complete. Don't forget to run 'make test'. $
Yes in deed. I made sure to run “make test” as well and not everything passed so I sent in the report. Make sure you do as well.