Re: Building extension for Mac OS X
| From: | D. Walsh | Date: | Fri, 23 Sep 2005 15:17:41 +0000 |
| Subject: | Re: Building extension for Mac OS X | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-19143@lists.php.net to get a copy of this message | ||
On Sep 23, 2005, at 03:00 AM, Fredrik Olsson wrote:
Hi. As you replied to my e-mail I guess it is ok to do the same. Just a shame that a possible solution will not remain in the list for others to see :/.unfortunately the list doesn't tag the reply to so hitting reply goes to the sender.
D. Walsh skrev:pushd /usr/local ln -shf php5 php popd /usr/local/php/bin/phpize LDFLAGS="-L/usr/local/php -L/usr/local/php/lib" CPPFLAGS=-I/usr/local/php/include ./configure [options] LDFLAGS="-L/usr/local/php -L/usr/local/php/lib" CPPFLAGS=-I/usr/local/php/include make sudo make installOn Sep 22, 2005, at 09:48 AM, Fredrik Olsson wrote:<snip>I use the binary installation of PHP 5.0.4 from http:// www.entropy.ch/software/macosx/php/The first line does not work at all, so I tried it as /usr/local/php5/bin/phpize LDFLAGS="-L/usr/local/php -L/usr/local/php/lib" CPPFLAGS=-I/usr/local/ php5/include And then the rest.No problem, my guess is that #include "php.h" for some reason uses the php4 header file. How do I force phpize, ./configure, #include "php.h" etc, to use the installed php5 files (All residing under / usr/local/php5)? regardsLDFLAGS="-L/usr/local/php -L/usr/local/php/lib" CPPFLAGS=-I/usr/local/ php5/include /usr/local/php5/bin/phpize ./configure [options] LDFLAGS="-L/usr/local/php -L/usr/local/php/lib" CPPFLAGS=-I/usr/local/php5/include make sudo make installFredrik Olsson
It then installs the resulting module in /usr/lib/php/extensions/no-debug-non-zts-20020429/, and that is the extensions_path for my php4 install. So I manually copied my hello.so to /usr/local/php5/lib/, and got wrong version number again. I can not quite see why I should use /usr/local/php/ for LDFLAGS as that path does not exist (The linker also warns about this). So I tried this: /usr/local/php5/bin/phpize LDFLAGS="-L/usr/local/php5 -L/usr/local/php5/lib" CPPFLAGS=-I/usr/local/php5/include ./configure --enable-hello LDFLAGS="-L/usr/local/php5 -L/usr/local/php5/lib" CPPFLAGS=-I/usr/local/php5/include make sudo make install It still tries to install in the php4-directory. So I again manually copied the hello.so. Allas the error remains: peylow$ /usr/local/php5/bin/php -r 'echo hello_world();'PHP Warning: PHP Startup: : Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=0I do not use the entrophy PHP, I build from scratch.PHP compiled with module API=20041030, debug=0, thread-safety=0These options need to matchSEE: http://www.daleenterprise.com/info.phpI checked this page, as I thought it might be a problem with me using a binary install from entopy, and you use this one. But I can not find any way to download and install this one, am I missing something?
-- Dale-- DaleRegards --//Fredrik Olsson