| View previous topic :: View next topic |
| Author |
Message |
solsys
Joined: 20 Jan 2006 Posts: 4
|
Posted: Mon Nov 05, 2007 3:38 Post subject: Compiling Modules in Leopard |
|
|
Installed Release 5 from the other thread on my gimpy little G4 Mini, and it works great. Now I want to install XDebug & PHPUnit...
How do I convince pecl to compile modules against this version of PHP? Using /usr/local/php5/bin/pecl still compiles against the the built-in version of php...
Compiling against the built-in version results in modules that compile, but don't work (they die with a seg fault, Wez said that this has something to do with exports being stripped from the built-in version...)
Thanks! |
|
| Back to top |
|
 |
Taracque
Joined: 23 Aug 2006 Posts: 6
|
Posted: Tue Nov 06, 2007 19:40 Post subject: Make pecl work, quick and DIRTY |
|
|
What i have did, is the following:
removing php,phpize,php-config,pecl,pear,peardev from /usr/bin/
make symlinks to /usr/local/php5/bin like this
| Code: | cd /usr/bin
sudo ln -s /usr/local/php5/bin/php .
sudo ln -s /usr/local/php5/bin/phpize .
sudo ln -s /usr/local/php5/bin/php-config .
sudo ln -s /usr/local/php5/bin/pear .
sudo ln -s /usr/local/php5/bin/peardev .
sudo ln -s /usr/local/php5/bin/pecl .
|
i have removed /usr/share/pear directory, and make a symlink too:
| Code: | cd /usr/share
sudo ln -s /usr/local/php5/lib/php pear
|
Taracque |
|
| Back to top |
|
 |
solsys
Joined: 20 Jan 2006 Posts: 4
|
Posted: Fri Nov 09, 2007 20:29 Post subject: |
|
|
Doh!, forgot about phpize & php-config, I aliased everything else but those would cause a problem...
Other than an annoying crashing bug in XDebug itself(don't try to include a file that doesn't exist when using XDebug 2.0.1), it works fine now.
Thanks! |
|
| Back to top |
|
 |
kashbridge
Joined: 27 Jan 2006 Posts: 2
|
Posted: Sat Nov 10, 2007 12:31 Post subject: XDebug not working |
|
|
Hi,
I can't get debug working with PHP5 under Leopard on a Mac Pro (64 bit). I have installed the latest binary from entropy.ch, and that is working. XDebug.so, however, crashes with a segmentation fault. If I force PHP to run as a 32-bit using "arch -i386 /usr/local/php5/bin/php -v", XDebug will now show up in the phpinfo() listing, but it still doesn't work. I've even tried recompiling XDebug 2.0.1 on my own system, but same problem. Any ideas?
Would any of those people who keep saying "Works for me", please let us know if you're using a 32-bit system? I think the 64-bit Mac may be the stumbling block.
Many thanks,
Kevin. |
|
| Back to top |
|
 |
solsys
Joined: 20 Jan 2006 Posts: 4
|
Posted: Sun Nov 11, 2007 8:26 Post subject: |
|
|
| My Mini is a 32bit PowerPC. Going to try compiling it on my MacBook Pro (32bit Core Duo) some time this week. I'll let you know if it works. |
|
| Back to top |
|
 |
znarf
Joined: 11 Nov 2007 Posts: 1
|
Posted: Tue Nov 13, 2007 1:39 Post subject: |
|
|
I tried compiling extensions like apc or memcache :
| Code: | sudo pecl install apc
sudo pecl install memcache |
Compilation works fine but extensions are not loading :
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/apc.so' - (null) in Unknown on line 0
I tried to symlink like mentioned above (before compiling), but that was not better. |
|
| Back to top |
|
 |
mstearne
Joined: 11 Dec 2007 Posts: 3
|
Posted: Tue Dec 11, 2007 19:09 Post subject: |
|
|
| znarf wrote: | I tried compiling extensions like apc or memcache :
...
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/apc.so' - (null) in Unknown on line 0
I tried to symlink like mentioned above (before compiling), but that was not better. |
I am getting the same error. Has anyone compiled and gotten this to work correctly?
Thanks! |
|
| Back to top |
|
 |
CMKoehler
Joined: 04 Dec 2007 Posts: 4
|
Posted: Tue Dec 11, 2007 20:45 Post subject: |
|
|
Getting the same thing with xdebug, no matter how I compile it. pecl and pear doesn't work, compiling it myself with phpize leads to the same result.
"which phpize" points to the right one in /usr/local/php5/
When compiling it myself and running "make test" as it says, I get this:
| Code: | PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/php5/lib/php/extensions/no-debug-non-zts-20060613/xdebug.so' - (null) in Unknown on line 0
/bin/sh: line 1: 47295 Segmentation fault TEST_PHP_EXECUTABLE=/usr/local/php5/bin/php TEST_PHP_SRCDIR=/tmp/xdebug-2.0.2 CC="gcc" /usr/local/php5/bin/php -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' /tmp/xdebug-2.0.2/run-tests.php -U -d extension_dir=modules/ ` if test "x/tmp/xdebug-2.0.2/modules/xdebug.la" != "x"; then for i in /tmp/xdebug-2.0.2/modules/xdebug.la""; do . $i; /tmp/xdebug-2.0.2/build/shtool echo -n -- " -d extension=$dlname"; done; fi` tests/
make: [test] Error 139 (ignored) |
|
|
| Back to top |
|
 |
mstearne
Joined: 11 Dec 2007 Posts: 3
|
Posted: Fri Dec 14, 2007 10:20 Post subject: |
|
|
| CMKoehler wrote: | Getting the same thing with xdebug, no matter how I compile it. pecl and pear doesn't work, compiling it myself with phpize leads to the same result.
"which phpize" points to the right one in /usr/local/php5/
|
phpize is probably not the issue. It would be great if anyone could make a suggestion. Does it matter that the configure is different in Leopard than it was for Tiger?
10.4:
'./configure' '--prefix=/usr/local/php5' '--with-apxs' .......
'--with-fbsql=shared,/Users/liyanage/svn/entropy/universalbuild/src/FBDeveloperLibraries/Library/FrontBase' '--with-json=shared' '--enable-memcache' '--enable-openbase_module'
10.5:
'./configure' '--disable-dependency-tracking' '--prefix=/usr/local/php5' '--with-apxs2=/usr/sbin/apxs' '--with-config-file-scan-dir=/usr/local/php5/php.d' '--with-openssl=/usr'
.....'--with-pgsql=shared,/usr/local/php5' '--with-pdo-pgsql=shared,/usr/local/php5' '--with-mcrypt=shared,/usr/local/php5'
In the 10.5 configure there is no --enable-memcache. |
|
| Back to top |
|
 |
Jaza
Joined: 28 May 2009 Posts: 1
|
Posted: Thu May 28, 2009 9:09 Post subject: Worked out |
|
|
I've worked it out! The issue is that when you compile on Leopard, the built-in Xcode C compiler builds it for a 32-bit architecture by default, even though all Leopard installs are on 64-bit hardware.
To compile for 64-bit hardware, you need to do the 'configure' step like this:
| Code: | | MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" ./configure |
See this blog post I just wrote, about compiling the uploadprogress extension. |
|
| Back to top |
|
 |
bunam
Joined: 22 Jul 2004 Posts: 4
|
Posted: Sat May 30, 2009 21:47 Post subject: |
|
|
i have done by using this "simple command" :
| Code: | | MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch x86_64 -g -Os -pipe -no-cpp-precomp" CCFLAGS="-arch x86_64 -g -Os -pipe" CXXFLAGS="-arch x86_64 -g -Os -pipe" LDFLAGS="-arch x86_64 -bind_at_load" pecl install apc |
so i have
| Code: | apc
APC Support enabled
Version 3.0.19
MMAP Support Enabled
MMAP File Mask no value
Locking type File Locks
Revision $Revision: 3.154.2.5 $
Build Date May 30 2009 22:44:18 |
|
|
| Back to top |
|
 |
|