[postgis-users] compiling problems - requires PostgreSQL, but it is installed

ValiSystem vali.system at free.fr
Mon Jun 4 09:00:03 PDT 2007


On 4 juin 07, at 15:53, Kenton Williams wrote:

> Hello,
>
> I'm trying to compile PostGIS on PCLinuxOS.  I have successfully  
> compiled and installed PostgreSQL and it is operating fine.  I have  
> obtained the PostGIS source and followed the instructions untarring  
> it into the PostgreSQL source code /contrib directory, but I cannot  
> even get ./configure to complete.  I get the error message stating  
> that PostgreSQL is required.
> I'm a little new to all this, so perhaps someone could advise me on  
> what I'm doing wrong?  It would seem that the PDF documentation may  
> be a little older than the versions of PostgreSQL and PostGIS that  
> are available.  Thanks in advance!
>
> -- 
> Kenton Williams
> GIS Analyst
> Penobscot Bay Media
> 32 Washington St., Suite 230
> Camden, ME  04843
> http://www.penbaymedia.com
>

Since you compiled PostgreSQL yourself, i assume that you did not  
used standard paths for installation (which is generally a good idea,  
because it helps to keep track of your custom installations).

PostGIS searches for a postgresql tool called pg_config, which is  
located in the bin directory of your postgresql target installation  
path. If pg_config cannot be found in the standard path (eg typing  
'pg_config' in a terminal returns "command not found"), then postgis  
will complain that postgresql cannot be found.

Hopefully the ./configure script (and that is a standard behavior you  
can find for other source trees) enables you to specify the pg_config  
full path.

take a look at './configure --help'
you will get in the options list these lines :

   --with-pgsql[=ARG]      build for a specific pgsql version
                           [ARG=path to pg_config]

bingo !
try './configure --with-pgsql=/your/path/to/pg_config' and it should  
not complain about a missing PosgreSQL.

Note that you have the same behavior for geos.

Please note that it is a really common way of doing things, here you  
specify the path for a tool, but you also might have to define  
includes and libraries paths.

Regards.







More information about the postgis-users mailing list