Compile PostGIS 2.0 (SVN)

JP Glutting jpglutting at gmail.com
Mon Apr 25 10:53:32 PDT 2011


Thanks Ryan, that was what I needed to do. It seems to configure correctly,
and when I run make I get this series of errors:

In file included from shp2pgsql-core.c:15:
shp2pgsql-core.h:17:21: error: libintl.h: No such file or directory
shp2pgsql-core.c: In function ‘GenerateLineStringGeometry’:
shp2pgsql-core.c:348: warning: implicit declaration of function ‘gettext’
shp2pgsql-core.c:348: warning: incompatible implicit declaration of built-in
function ‘gettext’
shp2pgsql-core.c: In function ‘GeneratePolygonGeometry’:
shp2pgsql-core.c:642: warning: incompatible implicit declaration of built-in
function ‘gettext’
shp2pgsql-core.c: In function ‘ShpLoaderOpenShape’:
shp2pgsql-core.c:848: warning: incompatible implicit declaration of built-in
function ‘gettext’
shp2pgsql-core.c:859: warning: incompatible implicit declaration of built-in
function ‘gettext’
shp2pgsql-core.c:879: warning: incompatible implicit declaration of built-in
function ‘gettext’
shp2pgsql-core.c:885: warning: incompatible implicit declaration of built-in
function ‘gettext’
shp2pgsql-core.c:1004: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c:1053: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c: In function ‘ShpLoaderGetSQLHeader’:
shp2pgsql-core.c:1277: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c:1294: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c: In function ‘ShpLoaderGetSQLCopyStatement’:
shp2pgsql-core.c:1404: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c: In function ‘ShpLoaderGenerateSQLRowStatement’:
shp2pgsql-core.c:1452: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c:1531: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c:1542: warning: incompatible implicit declaration of
built-in function ‘gettext’
shp2pgsql-core.c:1636: warning: incompatible implicit declaration of
built-in function ‘gettext’
make[1]: *** [shp2pgsql-core.o] Error 1
make: *** [all] Error 1

Could be that it has a dependency on a newer version of a library? I know
GEOS 3.2 (current Macports version) is not recommended for this, I think I
can live without ST_MakeValid and ST_ValidReason for a while.

Cheers,
JP

On Mon, Apr 25, 2011 at 6:29 PM, Ryan Schmidt <ryandesign at macports.org>wrote:

>
> On Apr 25, 2011, at 11:14, JP Glutting wrote:
>
> > I am having some trouble trying to compile the latest PostGIS code (
> http://postgis.refractions.net/download/). I need the raster support in
> the new version. I can't seem to get the code to compile on OS X, using
> Macports for the dependencies. So far, configure is complaining about not
> finding the PROJ.4 install directory. I have installed postgresql90,
> postgresql90-server and proj with the -k switch to keep the source code (I
> actually reinstalled proj with "sudo port -kf upgrade proj", which I think
> reinstalls and leaves the source code - please correct me if I am wrong).
>
> Yes it does, but it would also rebuild all of proj's dependencies, if it
> had any. It doesn't, so you didn't experience this, but for future
> reference, if you're going to use the -f flag to force a port to rebuild,
> you almost certainly also want to use the -n flag to tell MacPorts to only
> rebuild this port, not also all of its dependencies.
>
>
> > Using user-specified proj directory:
> /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_proj/work/proj-4.7.0/
> > checking proj_api.h usability... yes
> > checking proj_api.h presence... yes
> > checking for proj_api.h... yes
> > checking for pj_get_release in -lproj... no
> > configure: error: could not find libproj - you may need to specify the
> directory of a PROJ.4 installation using --with-projdir
> >
> > when running
> > sudo ./configure
> --with-projdir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_proj/work/proj-4.7.0/
> >
> > I also tried
> > sudo ./configure
> --with-projdir=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_proj/work/proj-4.7.0/src
> >
> > and
> >
> > sudo ./configure --with-projdir=/opt/local/include
> >
> > But it keeps getting stuck on pj_get_release, which seems to be the way
> of determining the release version of PROJ.4 - it is in the proj_api.h file,
> but it seems like configure can't find it or use it properly.
> >
> > I'm not sure what (if anything) I can do to get around this. Any ideas?
>
> If you look in the existing postgis (1.5.2) portfile you'll see it uses the
> configure argument:
>
> --with-projdir=/opt/local
>
>
> https://trac.macports.org/browser/trunk/dports/databases/postgis/Portfile?rev=72647#L51
>
> I wouldn't expect you to need to keep the source of any of the
> dependencies, but merely to have the compiled result installed into prefix
> /opt/local.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20110425/f1e90fc5/attachment.html>


More information about the macports-users mailing list