mxcl/homebrew — Issue #8301: including sqlite breaks postgres in gdal/ogr
Author: kueda
Created: 2011-10-26 01:08:47+00:00
State: open

Installing gdal 1.8.1 in OS 10.7.2 with postgres support causes OGR to fail when doing a simple ogrinfo call:

~ > ogrinfo PG:dbname=dbname
ERROR 1: PQconnectdb failed.
could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?

Commenting out

--with-sqlite3=/usr

in the gdal formula fixes the problem but obviously removes sqlite support. I'm guessing that using the system sqlite somehow causes gdal to link against the system postgres instead of homebrew's copy, though I can't imagine why. One fix would be to insist that gdal depends on a homebrew copy of sqlite instead of the system's, but I'm not sure what the homebrew convention is for that kind of decision. Perhaps there is a smarter way to fix this?