Technical stuff

Requirements are like water. They're easier to build on when they're frozen.

Tag Archives for: OS X

How to install kcachegrind / qcachegrind on Mac OSX

30 March 2012 by Georgiana

Installing kcachegrind via macports takes a long time because it has to build KDE, as well.

An alternative faster way is described below.

  • download Qt binary and install it
  • download and install graphviz; I used brew install graphviz
  • fix default graphviz location by symlinking to a place where cachegrind will find it sudo ln -s /usr/local/bin/dot /usr/bin/dot
  • qmake -spec 'macx-g++'; make
  • copy generated qcachegrind.app to your Applications folder
  • enjoy!

1 comment | Categories: Computer setup | Tags: , , , ,

Install Xdebug on Mac OSX Lion

02 March 2012 by Georgiana

  • Download the latest Xdebug version. The most stable is currently 2.1.3, but if you’re brave you’ll use
    xdebug-latest.tgz

    directly.

    cd /tmp/ && curl http://xdebug.org/files/xdebug-2.1.3.tgz > xdebug.tgz
    tar -xvzf xdebug.tgz
    cd xdebug-2.1.3

  • configure it with phpize
    phpize
  • specify some mac-specific environment variables

    MACOSX_DEPLOYMENT_TARGET=10.7
    CFLAGS="-arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp"
    CCFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
    CXXFLAGS="-arch i386 -arch x86_64 -g -Os -pipe"
    LDFLAGS="-arch i386 -arch x86_64 -bind_at_load"
    export CFLAGS CXXFLAGS LDFLAGS CCFLAGS MACOSX_DEPLOYMENT_TARGET
  • build and install
    ./configure
    make
    sudo make install
  • enable it in php.ini

    [xdebug]
    xdebug.profiler_output_dir = /var/log/xdebug
    xdebug.overload_var_dump = 0
    xdebug.profiler_output_name = callgrind.out.%R
  • restart your Apache

Comments Off | Categories: Computer setup, Mac OSX | Tags: , , ,