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

William Kyngesburye woklist at kyngchaos.com
Wed Aug 20 08:40:45 PDT 2008

On Aug 20, 2008, at 10:14 AM, Mark Cave-Ayland wrote:

> William Kyngesburye wrote:
>> Even if it's renamed (404 on that email link Mark), it will still  
>> try to link the installed liblwgeom.so instead of the internal  
>> liblwgeom.a, at compile time.  Unless you mean liblwgeom.a ->  
>> libpostgis.a?
> Ah sorry. I misunderstood your first email :(
>> I'll give my -search_paths_first idea a try later and let you know  
>> how it goes.
> Okay thanks. It would be a shame if we had to rename liblwgeom, but  
> it could be the path of least resistance...

Ugh, much trouble.

I see that you're now using PGXS to let postgres handle the .c and .so  
make rules.  LDFLAGS wasn't added to this, and neither was CFLAGS.

So, my usual method for compiling a postgres extension with pgxs to  
insert some custom flags I need (for a universal build on OSX) is to  
set PG_CPPFLAGS and SHLIB_LINK.  Postgis doesn't add to these, so I  
can't do that now.  Could these be changed to += assignments?

Hardwiring -search_paths_first into SHLIB_LINK in the lwgeom makefile  
doesn't help.  pgxs puts -L/usr/local/pgsql/lib after our custom  
SHLIB_LINK flags, so it is always searched before our local ../ 
liblwgeom path.

Instead of "-L../liblwgeom -llwgeom", "./liblwgeom/liblwgeom.a"  
works.  This is fine since liblwgeom is always built as a static  

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

"Time is an illusion - lunchtime doubly so."

- Ford Prefect

More information about the postgis-users mailing list