1

I'm really banging my head off a wall now with this.

I've installed PostgreSQL from the DMG on the Postgres site. I now have version 9.1. I then used the Stack Builder to install the PostGIS extension.

But despite downloading and going through the Builder with no errors there's no indication that it's installed. No template, no PostGIS folder anywhere.

So I've tried installing PostGIS from source. It configures well but make keeps failing for PostGIS 1.5.3 and for 2.0.

The whole readout from terminal is here: http://pastie.org/3685596

I'd really appreciate any help with this as I really need PostGIS installed. It seems to be a compile error with the appropriate libraries not being linked.

Can anyone give any hints?

John H
  • 2,488
  • 1
  • 21
  • 35

1 Answers1

2

I have the following MBP with 10.6.8:

$ uname -a
Darwin yegorow.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 i386 MacBookPro3,1 Darwin
$ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3)
$ /Developer/usr/bin/xcodebuild -version
Xcode 3.2.6
Component versions: DevToolsCore-1809.0; DevToolsSupport-1806.0
BuildVersion: 10M2518

I also have MacPorts, libreadline and libxml2 are located in the MacPorts destination folder, not system wide. I just like such setup.

First I've built PostgreSQL 9.1.3 from sources:

./configure --prefix=$HOME/prj/pg/9.1.3 --with-pgport=9130 --with-python
make
make install

Then I've downloaded and installed GEOS 3.3.2 and PROJ 4.7.0 (make sure to download roj-datumgrid-1.5.zip and unzip it into proj-4.7.0/nad):

./configure --prefix=$HOME/prj/pg/9.1.3
make
make install

Finally, I've obtained the latest postGIS release 1.5.3 and compiled it:

./configure --prefix=$HOME/prj/pg/9.1.3 \
--with-pgconfig=$HOME/prj/pg/9.1.3/bin/pg_config \
--with-geosconfig=$HOME/prj/pg/9.1.3/bin/geos-config \
--with-projdir=$HOME/prj/pg/9.1.3/ \
--with-xml2config=/opt/local/bin/xml2-config
make
make install

I will not describe steps required to create spatially-enabled database. I was building postGIS for the first time in fact. Hope it helps :)

P.S. I can assist in this process if required, let me know.

vyegorov
  • 21,787
  • 7
  • 59
  • 73
  • Thanks for this. I was having trouble compiling postGIS so I have been through these steps. What worked for me was to upgrade to Lion and to do this: http://blog.dotproximity.com/?p=25 – John H Apr 02 '12 at 11:07