[Xapian-discuss] PHP bindings on a Mac

Richard Boulton richard@lemurconsulting.com
Wed, 26 May 2004 12:26:28 +0100

Francis Irving wrote:
> One of our developers would like to install the Xapian PHP bindings on
> a Mac OS X laptop, where he runs our site locally.
> This is the error message, which happens during "make" (NOT
> configure):
> checking for g++... g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether g++ accepts -g... yes
> checking how to run the C++ preprocessor... g++ -E
> checking for cin in -lstdc++... no
> configure: error: cannot run /bin/sh ./config.sub
> make[3]: *** [xapian/php_xapian.la] Error 1
> make[2]: *** [all] Error 2
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> It seems that the ./configure didn't make the file
> php4/xapian/config.sub.  It isn't there at all.

I wouldn't expect configure to make the file.  In general, it will be 
found in the distributed files, or created by an invocation of 
"automake" (with the -a parameter).

In this case the file isn't found in the distribution because the 
php4/xapian/ directory is created as part of the build process.  I 
believe that the phpize tool is responsible for creating the config.sub 
file.  It could be that you have a buggy version of this tool (or it 
could be that my understanding is flawed).  Firstly, I recommend 
checking that you've got the latest version of this installed, and check 
further up your output log to see if it reported any errors.

If all else fails, you could simply try copying config.sub from 
somewhere else (eg, the top source directory of the xapian-bindings 
tarball) to the appropriate location.  config.sub is a generic file - 
copying it should work (but there may be other missing files).