Categories
howto

OSX PHP 5.5 Beta 1 Build part 2 (Bison)

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:

  1. 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.
  2. tar -zxvf bison-2.7.1.tar.gz
  3. cd bison-2.7.1
  4. ./configure –prefix=/usr/local
  5. make
  6. sudo make install
  7. 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.

Categories
howto

OSX 10.8.3 PHP 5.5 pre Build

At the urging of @akrabat at #tek13, I decided to see if I could compile #php 5.5 on my cleanly installed Mountain Lion. Here is how it went.