We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

What setup in osx is used to succesfully compile all versions of phalcon

Hi,

I am having trouble with getting a setup that will succesfully compile phalcon in osx mavericks. I am getting compiler errors which I will look at in seperate posts.

What I am looking for known configurations to succesfully compile all versions of phalcon in osx in the following terms:

  • osx version
  • gcc compiler (clang-503.0.38) used and version (brew, fink, macports, xcode dev tools)

I'm using Maverick OS and installed it via Homebrew:

brew install php53-phalcon

⚡ brew --env
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.9
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin
mpeh in ~/Projects/nccmt_calendar
⚡ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: 72dbdabe6c0ac100ce83a048ab19f5b7cf62bbc2
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.9.2-x86_64
Xcode: 5.1
CLT: 5.1.0.0.1.1393561416
Clang: 5.1 build 503

On my personal server which is running Mountain Lion but running PHP5.5 and also installed via Homebrew:

brew install php55-phalcon

jubilee$ brew --env
HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /usr/include/libxml2:/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.8
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Library/ENV/4.3:/usr/bin:/bin:/usr/sbin:/sbin
jubilee$ brew --config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew.git
HEAD: a20046f2da216f4eb1eed5570889f2738404276f
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit ivybridge
OS X: 10.8.5-x86_64
Xcode: 5.1
CLT: 5.1.0.0.1.1393561416
Clang: 5.1 build 503

What kind of errors are you getting while compiling it?



47.7k
Accepted
answer

I didn't use brew.

At first I was getting problems compiling with gcc here:

configure:2726: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files

This went away after uninstalling xcode and developer tools then reinstalling osx developer tools december 2013 release.

I then had problems in that the compiled modules api version did not match the php version I was running as expected.

This turned out to be a problem with my environment in that I hadn't made sure that right php version was being used and pointed to in the right way at compile time.

After following Patrick Bougies blog I finally got to the environment I wanted(needed for my wants) that compiled phalcon nicely and delivered the expected phalcon module to use with the php version I felt I needed. More in that I now feel I have more control of my php dev environment.



47.7k

In osx platform (Mavericks) I compiled phalcon 1.2.6 from source using a gcc compiler with clang-500.2.79 (Using Command Line devtools created 23/10/13).