Icon Patrick Gibsonpatrickgibson.com
news and such projects, etc. movies writings hyperlinks contact
search:
news and stuff

Tuesday, June 17, 2008

Xdebug for PHP 4.4.8 on Mac OS X Leopard

To anyone trying to compile Xdebug for use with PHP 4.4.x on Mac OS X Leopard, you will probably have problems loading the module if your PHP was compiled as a Universal binary. You will see something like:

Failed loading /path/to/xdebug.so (null)

You need to specify some options on before you run configure to have Xdebug compiled as a Universal binary:

MACOSX_DEPLOYMENT_TARGET=10.5 \
CFLAGS='-arch i386 -arch x86_64 -arch ppc7400 -arch ppc64' \
LDFLAGS='-arch i386 -arch x86_64 -arch ppc7400 -arch ppc64' \
CXXFLAGS='-arch i386 -arch x86_64 -arch ppc7400 -arch ppc64' \
./configure --enable-xdebug

Posted at 11:55
« Do not shop at Barnes and Noble (bn.com) | Back to News and Such | Leopard and usbmuxd issues »

Comments

Patrick, thank you for this, you've solved my problem with Xdebug. I confirm that your solution also helps for same Xdebug problems on Mac OS X with PHP 5.2.8.

- Peter Kehl, Thursday, February 12, 2009


Patrick, this is apparently exactly the info I need, but I'm a little unclear on how to apply it. You mention "specify some options". Is that done through terminal? Actually, I can run each of the lines except the bottom one, starting with "./configure...". Am I approaching this right? Thanks for your time.

- Mark, Tuesday, March 17, 2009


Just copy and paste those five lines into Terminal. The options I referred to are setting all of those variables like MACOSX_DEPLOYMENT_TARGET, CFLAGS, etc.

- Patrick, Wednesday, March 18, 2009


Post a comment

Name:

Email Address: (optional)

Website: (optional)

Comments:

Enter the number shown here:

back

Retrix Hosting