[postgis-users] Building SVN version of PostGIS on Mac OS X Leopard

William Kyngesburye woklist at kyngchaos.com
Wed Aug 20 11:17:02 PDT 2008

On Aug 20, 2008, at 12:47 PM, Robert Rainthorpe wrote:

> On Wednesday, August 20, 2008, at 06:33PM, "Robert Rainthorpe" <rob.rainthorpe at mac.com 
> > wrote:
>> William, that worked a treat. I haven't tested the build yet, but  
>> at least it completed!
> I've started testing things now and get the following error:
> /usr/local/src/postgis-svn/lwgeom postgres$ psql -f lwpostgis.sql -d  
> NewGIS
> psql:lwpostgis.sql:55: NOTICE:  type "spheroid" is not yet defined
> DETAIL:  Creating a shell type definition.
> psql:lwpostgis.sql:55: ERROR:  could not load library "/usr/local/ 
> pgsql/lib/lwpostgis.so": dlopen(/usr/local/pgsql/lib/lwpostgis.so,  
> 10): no suitable image found.  Did find:
> 	/usr/local/pgsql/lib/lwpostgis.so: mach-o, but wrong architecture

Ah!  That's because my Postgres binary is running 64bits, but a  
default compile builds 32bits.  Your new postgis is 32bits, so  
Postgres can't load it.

First, wait for Mark to update the SVN snapshot with some fixes for  
all this.

Then, do this to configure and compile postgis:

export PG_CPPFLAGS="-arch x86_64"
export SHLIB_LINK="-arch x86_64"
export PG_LIBS="-arch x86_64"
./configure --with-pgconfig=/usr/local/pgsql/bin/pg_config \
--mandir=/usr/local/pgsql/man \
config \
--with-projdir=/Library/Frameworks/PROJ.framework/unix \
CFLAGS="-arch x86_64"

William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>

The equator is so long, it could encircle the earth completely once.

More information about the postgis-users mailing list