I do not have root access to the computer I'm working with, so I cannot simply use a package manager to install the programs I need. As such, I've been compiling them from source. I've compiled Apache and PHP successfully and have a wiki hosted. I would now like to use SphinxSearch with the MediaWiki setup.
I am using SQLite for the database, and there are instructions for using SphinxSearch with SQLite, which requires SphinxSearch to be compiled with libexpat.
I have been trying for a while to get SphinxSearch to compile with XML support, but I just can't seem to get it. The only help I've found online says to install libexpat and libexpat-dev like so
apt-get install libexpat libexpat-dev
However, since I'm not root, I can't simply install like that. So I compiled libexpat from source:
wget http://sourceforge.net/projects/expat/files/expat/2.1.0/expat-2.1.0.tar.gz/download
tar xf expat-2.1.0.tar.gz
cd expat-2.1.0/
./configure --prefix=${BASE_PATH}/expat-2.1.0
make
make install
Which compiles libexpat perfectly fine. Next, I've added the libexpat to the LD_LIBRARY_PATH
and C_INCLUDE_PATH
like so:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${BASE_PATH}/expat-2.1.0/lib"
export C_INCLUDE_PATH="$C_INCLUDE_PATH:${BASE_PATH}/expat-2.1.0/include"
Then I go to compile Sphinx:
wget http://sphinxsearch.com/files/sphinx-2.2.7-release.tar.gz
tar xf sphinx-2.2.7-release.tar.gz
cd sphinx-2.2.7-release
./configure --prefix=${BASE_PATH}/sphinx-2.2.7 --without-mysql --with-libexpat
However, the output from configure gives:
...
checking whether to compile with re2 library support... no
checking whether to compile with RLP library support... no
checking for libexpat... checking for library containing XML_Parse... no
not found
configure: WARNING: xmlpipe2 will NOT be available
checking for libiconv... checking for library containing iconv... none required
found
checking for iconv() arg types... char **
...
So, do you know how to can get Sphinx to find a library containing "XML_Parse"?
UPDATE: So I was able to resolve it by compiling in a VM (see my posted answer below for more details), but that's a rather lengthy solution to what should be a simple problem. As such, if someone posts a better solution, I'll mark that as the best answer.