The machine architecture is not the same as what you archs you compile for, though GCC does default to x86_64.
Anyways... Did you try setting only "-arch x86_64", without i386? P.S. Are you compiling everything yourself for any paricular reason? Have you tried my PostGIS package? On Jul 19, 2011, at 4:00 AM, Gis Mage wrote: > Hi, again! > > Thanks for your clues, but that didn't help. > I still have the same error. > I've exported and double checked theese variables. > I've rebuilt GEOS and PROJ with this flags. > > My arch is: > uname -m > x86_64 > > I still get the same > "ld: symbol(s) not found for architecture i386" > error. > > But it fires up in a different place now: > > "_lwline_free", referenced from: > _LWGEOM_addpoint in lwgeom_functions_basic.o > _LWGEOM_envelope in lwgeom_functions_basic.o > _LWGEOM_line_from_mpoint in lwgeom_functions_basic.o > _BOX2DFLOAT4_to_LWGEOM in lwgeom_box2dfloat4.o > ld: symbol(s) not found for architecture i386 > collect2: ld returned 1 exit status > lipo: can't open input file: /var/tmp//cccyfTRP.out (No such file or > directory) > make[1]: *** [postgis-2.0.so] Error 1 > make: *** [all] Error 1 > > Is there still a library built for a different arch? > How to check that out? > > > 2011/7/18 William Kyngesburye <[email protected]> > 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? > > ----- William Kyngesburye <kyngchaos*at*kyngchaos*dot*com> http://www.kyngchaos.com/ "We are at war with them. Neither in hatred nor revenge and with no particular pleasure I shall kill every ___ I can until the war is over. That is my duty." "Don't you even hate 'em?" "What good would it do if I did? If all the many millions of people of the allied nations devoted an entire year exclusively to hating the ____ it wouldn't kill one ___ nor shorten the war one day." <Ha, ha> "And it might give 'em all stomach ulcers." - Tarzan, on war _______________________________________________ postgis-users mailing list [email protected] http://postgis.refractions.net/mailman/listinfo/postgis-users
