Compile PostGIS 2.0 (SVN)

JP Glutting jpglutting at gmail.com
Sat Aug 27 11:50:44 PDT 2011


Thanks Ryan,

That is very helpful. Installing everything +universal was my idea, and
probably not a good one. My thinking was that perhaps postgis (or part of
it) was trying to compile as i386 and couldn't find the appropriate
framework, as it was only built x86_64 (which is all I was using). So I
built all the dependencies +universal, just in case.

the command: *sudo port install geos +universal
configure.compiler=macports-gcc-4.2 *fails.

*sudo port install geos +universal configure.compiler=gcc-4.2 *works,
thanks! I had that in my notes, but I overlooked it. Thinking about too many
different things at once.

Then I did
export CC=gcc-4.2 (in case it was another compiler issue)
./configure --with-projdir=/opt/local --with-raster --prefix=/opt/local
make

But I got the same error. I will just wait for a new version with a fix, I
guess. I appreciate the tips, as this isn't a macports issue, and you folks
have better things to do with your time.

Cheers,
JP
But I got the same error.






On Sat, Aug 27, 2011 at 7:42 PM, Ryan Schmidt <ryandesign at macports.org>wrote:

> On Aug 27, 2011, at 10:25, JP Glutting wrote:
>
> > I am resurrecting this old thread, because I am having more problems
> compiling the latest version of Postgis 2.0.0SVN (revision 7789) on Lion,
> and it makes sense to keep all the information together. After configuring
> and make-ing as above, I am getting this error:
> >
> > ld: symbol(s) not found for architecture i386
> >
> > The context is:
> >
> >       ...
> >   "_lwgeom_calculate_gbox_geodetic", referenced from:
> >       _compute_geography_stats in geography_estimate.o
> >       _geography_gist_selectivity in geography_estimate.o
> >       _geography_area in geography_measurement.o
> >   "_gserialized_get_type", referenced from:
> >       _geography_bestsrid in geography_measurement.o
> >       _geography_covers in geography_measurement.o
> >       _geography_perimeter in geography_measurement.o
> >   "_lwgeom_calculate_gbox_cartesian", referenced from:
> >       _geography_bestsrid in geography_measurement.o
> >   "_lwgeom_covers_lwgeom_sphere", referenced from:
> >       _geography_covers in geography_measurement.o
> >   "_gserialized_get_gbox_p", referenced from:
> >       _geography_point_outside in geography_measurement.o
> >   "_gbox_pt_outside", referenced from:
> >       _geography_point_outside in geography_measurement.o
> >   "_lwgeom_area_sphere", referenced from:
> >       _geography_area in geography_measurement.o
> >   "_lwgeom_area_spheroid", referenced from:
> >       _geography_area in geography_measurement.o
> >   "_gserialized_datum_get_gbox_p", referenced from:
> >       _compute_geometry_stats in geometry_gist_selectivity.o
> >       _geometry_gist_sel_2d in geometry_gist_selectivity.o
> > ld: symbol(s) not found for architecture i386
> > collect2: ld returned 1 exit status
> > lipo: can't open input file:
> /var/folders/k0/lzz_jzld03d8yg881mnbh7_h0000gp/T//ccgj6uq8.out (No such file
> or directory)
> > make[1]: *** [postgis-2.0.so] Error 1
> > make: *** [all] Error 1
> >
> > Searching for this type of error, I saw that this is often because a
> framework is missing.
>
> That would be a possibility: that the developers omitted an essential
> framework or library from the link line. But the fact that it says the error
> is for architecture i386, when the default build_arch on Lion is x86_64,
> suggests instead that you are building this port universal, but that a
> dependency is not built universal.
>
>
> > I installed the postgis package that is part of Macports, in case this
> brought some other dependency I had missed, and tried to recompile the
> dependencies (proj4, GDAL, GEOS, etc. as universal, in case it was an
> architecture issue). GEOS wouldn't compile as universal.
>
> geos compiles fine universal for me, on Snow Leopard with Xcode 3. Other
> problems were reported already when using llvm-gcc-4.2 or clang, as would
> happen with Xcode 4 and thus on Lion:
>
> https://trac.macports.org/ticket/30309
>
> I've resolved that by forcing the use of gcc-4.2. Has that helped?
>
>
> > I asked on the Postgis list (for a previous version that had the same
> problem), but got no response. Any hints welcome.
>
> Yes, the postgis developers don't seem very responsive; they didn't respond
> to our upstream ticket about the aforementioned problem three weeks ago
> either.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110827/02043a0d/attachment.html>


More information about the macports-users mailing list