Building Sphinx 0.9.9RC1 with PostgreSQL 8.3 support via MacPorts on Mac OS 10.5
Posted January 24th, 2009; 1 comments.
Up until today I was using the version of Sphinx provided by MacPorts, 0.9.8, as a lot of developers probably are. It installed painlessly, but I’m in the process of auditioning several different search engine options for a project and I wanted to make sure I was using the latest in my comparisons. I’m also using a PostgreSQL 8.3 database, which requires specifying a few additional options to configure.
Here are the commands I used to install Sphinx 0.9.9RC1 (run inside the Sphinx source directory after you download it):
export LDFLAGS="-L/usr/lib" ./configure --with-pgsql --with-pgsql-includes=/opt/local/include/postgresql83/ \ --with-pgsql-libs=/opt/local/lib/postgresql83/ make sudo make install
The first line ensures that make can find the system iconv libraries. Otherwise, it’s a pretty straight forward process.
Update
A simpler solution is to make sure that the pg_config executable can be found on your path. Add /opt/local/lib/postgresql83/bin/ to your path, and then you can simply use:
export LDFLAGS="-L/usr/lib" ./configure --with-pgsql make sudo make install
Thanks! How timely for me.
My gotcha was: configure when mysql is not installed. I had to add the –without-mysql option to configure, and voila!