[Xapian-discuss] Running two versions of Xapian on one server

Olly Betts olly at survex.com
Fri Dec 15 15:48:47 GMT 2006


On Fri, Dec 15, 2006 at 08:15:25AM +0000, Francis Irving wrote:
> How can I build/install a new version of Xapian, so I explicitly
> tell Perl and/or PHP to use it? I'm wondering if something like
> I just build it, and set LD_LIBRARY path to the appropriate place
> of the build tree when calling Perl?

This part is easy - you just specify the location of the xapian-config
script for the appropriate installation of xapian-core when building the
bindings using XAPIAN_CONFIG.  E.g. for xapian-bindings:

./configure XAPIAN_CONFIG=/usr/local/newxapian/bin/xapian-config

And for Search::Xapian (assuming sh, bash, or compatible shell):

XAPIAN_CONFIG=/usr/local/newxapian/bin/xapian-config perl Makefile.PL

You don't need to set LD_LIBRARY_PATH at all (not even at run time)
since we use libtool to do the linking, and libtool will automatically
set an rpath when linking against libraries which aren't in the ld.so
search path.

As James says, the tricky part is to get both versions working with
PHP and Perl.

For PHP, you could probably achieve this by not loading xapian.so in
php.ini, but instead use the PHP "dl" function to load a particular
xapian.so.

Cheers,
    Olly



More information about the Xapian-discuss mailing list