Hello, I'm trying to build the xapian bindings to use with php, i've installed using MAMP to make it easier to set up the apache/php/myssql stuff (http://www.mamp.info/en/mamp/index.html), but when I try to configure the bindings, i get this: configure: error: '/usr/bin/php-config --includes' reports '-I/Applications/MAMP/bin/php/php5.3.6/include/php -I/Applications/MAMP/bin/php/php5.3.6/include/php/main -I/Applications/MAMP/bin/php/php5.3.6/include/php/TSRM -I/Applications/MAMP/bin/php/php5.3.6/include/php/Zend -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext/date/lib' but zend.h can't be included from there I made it so its using the php-configure from MAMP, so its reporting the correct paths, those paths did not exist, but I downloaded the header files for the correct php version and stuck them in there, but its still claiming it can't find them. I've tried a lot of things and nothing work =( I read this blog post: http://blog.geertvd.be/2011/04/15/using-xapian-on-os-x-with-mamp/ but he doesn't list a solution, other then just use php 5.2 (which i really don't want to do since i'm using some features that are only in 5.3) Any ideas? ~Mark
On 18 May 2012 09:29, Mark Grandi <markgrandi at gmail.com> wrote:> Hello, I'm trying to build the xapian bindings to use with php, i've > installed using MAMP to make it easier to set up the apache/php/myssql > stuff (http://www.mamp.info/en/mamp/index.html), but when I try to > configure the bindings, i get this: > > configure: error: '/usr/bin/php-config --includes' reports > '-I/Applications/MAMP/bin/php/php5.3.6/include/php > -I/Applications/MAMP/bin/php/php5.3.6/include/php/main > -I/Applications/MAMP/bin/php/php5.3.6/include/php/TSRM > -I/Applications/MAMP/bin/php/php5.3.6/include/php/Zend > -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext > -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext/date/lib' but zend.h > can't be included from there > > > I made it so its using the php-configure from MAMP, so its reporting the > correct paths, those paths did not exist, but I downloaded the header files > for the correct php version and stuck them in there, but its still claiming > it can't find them. I've tried a lot of things and nothing work =( > > I read this blog post: > http://blog.geertvd.be/2011/04/15/using-xapian-on-os-x-with-mamp/ but he > doesn't list a solution, other then just use php 5.2 (which i really don't > want to do since i'm using some features that are only in 5.3) > > Any ideas? ~Mark >Let me start by saying that this is not a solution: i had (the misfortune of trying) to configure apache/php on a mac the other day and i found it considerably easier to use the apache/php installation that comes with OSX than use MAMP. Any time i did anything remotely complicated with MAMP i'd get random segfaults and weird stuff. Additionally, the built-in php is (i think) 5.3.9 or newer, which is a fair bit newer than the MAMP version. Perhaps a 'Mac Person' can provide a better answer?
On Thu, May 17, 2012 at 04:29:09PM -0700, Mark Grandi wrote:> Hello, I'm trying to build the xapian bindings to use with php, i've > installed using MAMP to make it easier to set up the apache/php/myssql > stuff (http://www.mamp.info/en/mamp/index.html), but when I try to > configure the bindings, i get this: > > configure: error: '/usr/bin/php-config --includes' reports > '-I/Applications/MAMP/bin/php/php5.3.6/include/php > -I/Applications/MAMP/bin/php/php5.3.6/include/php/main > -I/Applications/MAMP/bin/php/php5.3.6/include/php/TSRM > -I/Applications/MAMP/bin/php/php5.3.6/include/php/Zend > -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext > -I/Applications/MAMP/bin/php/php5.3.6/include/php/ext/date/lib' but zend.h > can't be included from there > > > I made it so its using the php-configure from MAMP, so its reporting the > correct paths, those paths did not exist, but I downloaded the header files > for the correct php version and stuck them in there, but its still claiming > it can't find them. I've tried a lot of things and nothing work =(I know nothing about MAMP, but I find it hard to believe you're expected to download the headers and install them by hand. A quick web search suggests they are actually in /Applications/MAMP/Library/include - if that's true, then MAMP's packaging is buggy - php-config --includes should point there. I suspect that when MAMP make their packages, they build and install PHP, then move some of the resulting files around without fixing up references to their locations. You should file a bug with MAMP about this. My guess as to why installing the headers by hand didn't work is that you've not copied the headers over correctly. If you look in config.log you can see what happened when configure tried to compile a test file including zend.h.> I read this blog post: > http://blog.geertvd.be/2011/04/15/using-xapian-on-os-x-with-mamp/ but he > doesn't list a solution, other then just use php 5.2 (which i really don't > want to do since i'm using some features that are only in 5.3)That doesn't look like a reliable guide. It says "make sure you download and use the latest stable Xapian version", yet the examples use a *development* version which was over a year old when the post was written, and had been superseded by a stable release nearly a year before. You really should NOT copy files out of .libs either - tell configure where you want to install them (use PHP_EXTENSION_DIR as INSTALL explains) and then use "make install". The extension should by default be installed to somewhere which works, so I suspect this is another instance of MAMP's php-config reporting bad information. Cheers, Olly