Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Install phalcon on mac osx yosemite

Hi,

I am attempting to build phalcon 1.3.4 (I need it for a bugfix). I had previously successfully built phalcon.so 1.3.2 when the machine was a osx mavericks machine using an old version of osx develepment tools.

Now my machine is Yosemite and using an recently updated develepment tools (no xcode installed). My php 5.5.22 is locally installed in /usr/local/php and is working happily with phalcon.so 1.3.2 (built for php 5.5.10 works for 5.5.22 too).

In directory cphalcon-phalcon-v1.3.4/build I use ./install and get the following:

sudo ./install
Password:
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
/usr/local/autoconf/bin/autoconf: /usr/local/autoconf-2.69/bin/autom4te: /opt/local/bin/perl: bad interpreter: No such file or directory
/usr/local/autoconf/bin/autoconf: line 505: /usr/local/autoconf-2.69/bin/autom4te: Undefined error: 0

Now what is happening is that perl is not installed in /opt/local/bin/perl. It is installed in the native osx yosemite location of /usr/bin/perl. Is this a bug in the install script?



21.6k
edited Apr '15

I linked the following:

sudo ln -s  /usr/bin /opt/local/

This resulted in:

sudo ./install
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
/Library/Developer/CommandLineTools/usr/bin/gm4: unrecognized option `--gnu'
Try `/Library/Developer/CommandLineTools/usr/bin/gm4 --help' for more information.
autom4te: /opt/local/bin/gm4 failed with exit status: 1

/Library/Developer/CommandLineTools/usr/bin/gm4 --version revealed:

GNU M4 1.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Written by Rene' Seindal.


21.6k
Accepted
answer
edited Jun '15
  • install m4-1.4.17 to say /usr/local
  • temporarily rename /Library/Developer/CommandLineTools/usr/bin/gm4
  • Create a symlink /Library/Developer/CommandLineTools/usr/bin/gm4 to /usr/local/m4-1.4.17/bin/m4
  • Undo rename and symlink

Notes:

After getting in touch with [email protected] I was directed to http://ftp.gnu.org/gnu/m4/ and downloaded m4-1.4.17 version. So use same m4 as used in Ubuntu 14.04LTS

I made and installed this into /usr/local/m4-1.4.17 and symlink /usr/local/bin/gm4 to /usr/local/m4-1.4.17/bin/m4.

After updating my bash profile with the path to gm4 and m4 I found the installer still insisted on using the /Library/Developer/CommandLineTools/usr/bin/gm4 even though /etc/paths points to /usr/local/bin first.

So I renamed /Library/Developer/CommandLineTools/usr/bin/gm4 to something else and created a symlink to /usr/local/bin/m4 (m4-1.4.17).

Only after this did cphalcon compile. I now have phalcon.so 1.3.4 succesfully working in Apache/2.4.12 (Unix) PHP/5.5.22.



21.6k
edited Apr '15

I'm assuming that the usual build environment is Ubuntu 14.04LTS.