I'm running Drupal 7.15 on a nginx server with PHP 5.3.13 and php-fpm under CentOS 6.2 (x64).
I would like to test xapian efficiency as a backend to search_api for my website of ~500.000 nodes.

After reading the readme i got as far as:
# yum install xapian-core-libs xapian-core
This downloaded the version 1.2.7 of xapian from Epel repository.
Also, just to be sure, I installed xapian bindings of the same version:
# yum install xapian-bindings
But trying to enable search_api_xapian with drush i got the following error:

# drush en search_api_xapian
Module search_api_xapian doesn't meet the requirements to be enabled. [error]
(Currently using Xapian bindings You need to install Xapian bindings version >= 1.0.2. include_once(): Failed opening 'xapian.php' for inclusion (include_path='.:/usr/share/pear:/usr/share/php'))

Ok, i had to link the xapian.php (which i found in /usr/share/php5) to my /usr/share/php folder:
# ln -s /usr/share/php5/xapian.php /usr/share/php/xapian.php
Now drush said:

# drush en search_api_xapian
Module search_api_xapian doesn't meet the requirements to be enabled. [error]
(Currently using Xapian bindings You need to install Xapian bindings version >= 1.0.2. dl(): Dynamically loaded extensions aren't enabled)

Ok, I went to /etc/php.ini to enable dynamic extensions:
# vi /etc/php.ini
Found enable_dl = Off, replaced it with enable_dl = On and restarted nginx: # service nginx restart
Drush was still ruthless:

# drush en search_api_xapian
Module search_api_xapian doesn't meet the requirements to be enabled. [error]
(Currently using Xapian bindings You need to install Xapian bindings version >= 1.0.2. dl(): Unable to load dynamic library '/usr/lib64/php/modules/xapian.so' - /usr/lib64/php/modules/xapian.so: undefined symbol: zend_error_noreturn)

I found that my issue is discussed here: link1 and link2
The suggested way is to downgrade from xapian 1.2.7 to 1.2.5.
So i downloaded and extracted both xapian-core-1.2.5 and xapian-binding-1.2.5

# wget http://oligarchy.co.uk/xapian/1.2.5/xapian-core-1.2.5.tar.gz 
# wget http://oligarchy.co.uk/xapian/1.2.5/xapian-bindings-1.2.5.tar.gz 
# tar xvfz xapian-core-1.2.5.tar.gz
# tar xvfz xapian-bindings-1.2.5.tar.gz

Now trying to ./configure said, that i need a working C++ compiler.
Though i had gcc in /usr/bin/gcc, i also had to install g++:
# yum install gcc-c++
And also the missing uuid-dev, libuuid-devel or e2fsprogs-devel package "required for brass, chert and flint" (what-what?). Anyway:
# yum install libuuid-devel
Now finally i could configure and install xapian core and bindings:

# ./configure
# make
# make install

While making xapian core I also ran into some errors with -fPIC, you can read this, if you encounter the same problem.
But i still get the same errors and I'm unable to make the xapian-core.
Maybe building 1.2.5 from source wasn't such a good idea?
Could anyone please stir me in the right direction?

P.S. I understand, that my issue is not directly connected with the development of this module.
But i'm sure that others faced the same issues and it might prevent people from using xapian as a search backend.
Let's make the installation instructions more lucid.

Comments

Ace Cooper’s picture

Issue summary: View changes

minor spelling checks

Ace Cooper’s picture

Issue summary: View changes

minor changes

Ace Cooper’s picture

Issue summary: View changes

more minor changes

Ace Cooper’s picture

Issue summary: View changes

and one more

marvil07’s picture

Status: Active » Closed (outdated)

Please re-open if needed, using the last xapian stable version from your distro should be enough.