[postgis-users] shp2pgsql problem with Leopard

William Kyngesburye woklist at kyngchaos.com
Sun Dec 30 10:16:09 PST 2007


It works for me with David Techer's note that the table argument is  
required.  For 64bit mode.  In 32bit mode it indeed fails.

I checked the symbol names and getopt is internal.  But, in 32bit mode  
there is one case of Apple's UNIX2003 version in there also:

(__TEXT,__text) external __getopt_internal
(__TEXT,__text) external _getopt
(undefined [lazy bound]) external _getopt$UNIX2003 (from libSystem)
(__TEXT,__text) external _getopt_long

_getopt$UNIX2003 is probably used in shp2pgsql.  In 64bit mode Apple's  
getopt is not there.

It looks like Apple's symbol variant magic is the problem.  See this  
link for backgrond on symbol variants:

http://developer.apple.com/releasenotes/Darwin/SymbolVariantsRelNotes/index.html

Since 64bit OSX is pure UNIX Conforming, it has no need of symbol  
variants, so _getopt = _getopt, and postgis's getopt overrides it.   
But in 32bit mode, _getopt gets transformed to the $UNIX2003 variant  
and is used instead of postgis's, yet postgis's still gets linked into  
the binary.  And on Tiger, getopt doesn't have a variant.

If the two different declarations of getopt are causing the problem, I  
wonder if Apple's getopt will work (it's BSD getopt)?  Or did you  
customize getopt for postgis?

On Dec 30, 2007, at 11:24 AM, Mark Cave-Ayland wrote:
>
> Hi David,
>
> I suspect you may be experiencing this problem here:
> http://postgis.refractions.net/pipermail/postgis-users/2007-December/017893.html 
> . Unfortunately we need someone with some OS X knowledge to work out  
> a solution that can work on all platforms, and devise a patch for  
> it :(
>
>
> Kind regards,
>
> Mark.
>
> -- 
> ILande - Open Source Consultancy
> http://www.ilande.co.uk
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

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




More information about the postgis-users mailing list