[postgis-users] Error when building from source on mac os x 10.6

William Kyngesburye woklist at kyngchaos.com
Mon Oct 18 07:04:19 PDT 2010


It looks like the different parts of postgis compilation (ie most of it comes from the Postgres make system) don't have the same information about what architectures to compile for.

I always specify these before configuring postgis:

export CFLAGS="-Os -arch i386 -arch x86_64"
export PG_CPPFLAGS="-arch i386 -arch x86_64"
export SHLIB_LINK="-arch i386 -arch x86_64"
export LDFLAGS="-arch i386 -arch x86_64"

Note that you need to know which architectures GEOS, PROJ and Postgres are compiled for.  Use as many -arch flags in each of the above exports as is common to these.  It may be i386 and x86_64, but it could also be only x86_64.  If i386 is the only common arch, you should recompile to get at least x86_64.

On Jul 17, 2011, at 11:42 AM, Gis Mage wrote:

> Hi list!
> I'm trying to build postgis from source on a snow leopard machine.
> So I download the 1.5.3 source, configure like this:
> 
> sudo ./configure --prefix=/opt/postgis --with-pgconfig=/opt/pgsql/bin/pg_config --mandir=/opt/pgsql/man --with-geosconfig=/opt/geos/bin/geos-config --with-projdir=/opt/proj
> 
> and get a successful result:
> 
>  PostGIS is now configured for x86_64-apple-darwin10.7.0
> 
>  -------------- Compiler Info ------------- 
>   C compiler:           gcc -g -O2
>   C++ compiler:         g++ -g -O2
> 
>  -------------- Dependencies -------------- 
>   GEOS config:          /opt/geos/bin/geos-config
>   GEOS version:         3.3.0
>   PostgreSQL config:    /opt/pgsql/bin/pg_config
>   PostgreSQL version:   PostgreSQL 9.1beta3
>   PROJ4 version:        47
>   Libxml2 config:       /usr/bin/xml2-config
>   Libxml2 version:      2.7.3
>   PostGIS debug level:  0
> 
>  -------- Documentation Generation -------- 
>   xsltproc:             /usr/bin/xsltproc
>   xsl style sheets:     
>   dblatex:              
>   convert:              
> 
> Then I do 
> sudo make
> And get an error:
> 
>   "_lwline_free", referenced from:
>       _askml2_inspected_buf in lwgeom_kml.o
>       _askml2_inspected_size in lwgeom_kml.o
> ld: symbol(s) not found for architecture i386
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//ccsIJfa2.out (No such file or directory)
> make[1]: *** [postgis-1.5.so] Error 1
> make: *** [postgis] Error 2
> 
> So I've checked my /var/tmp dir and I really don't have ccsIJfa2.out file.
> What am I doing wrong here?
> 
> _______________________________________________
> 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/

"Oh, look, I seem to have fallen down a deep, dark hole.  Now what does that remind me of?  Ah, yes - life."

- Marvin





More information about the postgis-users mailing list