[Xapian-discuss] Building php5-xapian on Ubuntu 12.04 Server x64
Olly Betts
olly at survex.com
Mon May 21 04:27:00 BST 2012
On Sun, May 20, 2012 at 02:12:00PM +0100, James Aylett wrote:
> On 20 May 2012, at 12:56, Olly Betts wrote:
>
> > I would recommend using the instructions in the FAQ, which are based on
> > those in the first URL, but have a couple of fixes:
> >
> > http://trac.xapian.org/wiki/FAQ/PHP%20Bindings%20Package
>
> This doesn't seem to work at the moment (checked against Ubuntu 12.04
> here), because the PHP smoketest won't run in a VPATH build (checked
> using the 1.2.10 bindings without the debian patches or build system).
> I think in php/Makefile.am the TESTS_ENVIRONMENT needs `$(srcdir)` in
> the `-d include_path=php5` stanza.
Ah, looks like this probably got broken by a backported patch, but works
in a VPATH build from SVN (as the generated sources are then in
builddir) so I didn't notice.
> As a short-term fix, if you do the following before the `debuild`
> line, it seems to build okay:
>
> sed -i 's/include_path=php5$/include_path=$(srcdir)\/php5/' php/Makefile.in
> dpkg-source --commit
>
> (give it a patch name of something like fix-php-buildtests, then just
> save the file it prompts you to edit)
Yes, that should work with suitably recent dpkg.
A slightly simpler option instead of "dpkg-source --commit" is to do:
echo auto-commit >> debian/source/options
That doesn't require the user to pick a patch name, and with older
dpkg where "dpkg-source --commit" isn't supported, the options file
will be ignored, and the patch should just get included anyway.
dpkg should include the change with a generic name automatically.
I'll update the FAQ with that.
It's probably worth noting here that smoketest.php currently fails
with a segmentation fault under PHP 5.4. If you don't try to subclass
Xapian classes in PHP, everything seems fine, but there's an issue
with the director code SWIG generates. I've investigated a bit, but
it isn't clear to me whether it's PHP or SWIG at fault.
Cheers,
Olly
More information about the Xapian-discuss
mailing list