Greg Troxel wrote:

Hi Greg,

I'm continuing to work on packaging 1.4.1rc2 for pkgsrc, this time on
NetBSD (to avoid Mac shlib oddness until everything else is ok).  I am
building against postgresql 8.4.

 I have a few observations/questions:

* The postgis library is installed as

-rw-r--r--  1 root  wheel  552868 Dec  9 15:44 /usr/pkg/lib/libpostgis-1.4.a
-rwxr-xr-x  1 root  wheel     926 Dec  9 15:44 /usr/pkg/lib/libpostgis-1.4.la
lrwxr-xr-x  1 root  wheel      23 Dec  9 15:44 /usr/pkg/lib/libpostgis-1.4.so 
-> libpostgis-1.4.so.0.0.0
lrwxr-xr-x  1 root  wheel      23 Dec  9 15:44 /usr/pkg/lib/libpostgis-1.4.so.0 
-> libpostgis-1.4.so.0.0.0
-rwxr-xr-x  1 root  wheel  268310 Dec  9 15:44 
/usr/pkg/lib/libpostgis-1.4.so.0.0.0

which is autoconf default $(libdir) for --prefix=/usr/pkg.  But
pg_config --pkglibdir is

  $ pg_config --pkglibdir
  /usr/pkg/lib/postgresql

and configure was invoked:

  ./configure --enable-rpath --datadir=/usr/pkg/share/postgresql/contrib 
--without -libintl-prefix --without-libiconv-prefix --prefix=/usr/pkg 
--build=i386--netbsdelf --host=i386--netbsdelf --mandir=/usr/pkg/man

Where is it really supposed to go?

* postgis.sql does not get the path to the postgis library substituted.
  I don't get how $$libdir is supposed to be expanded by gmake:

%.sql: %.sql.in
        sed 
's,MODULE_PATHNAME,$$libdir/$...@postgis_major_version@....@postgis_minor_version@,g' 
$< >$@

gmake runs

  sed 's,MODULE_PATHNAME,$libdir/postgis-1.4,g' postgis.sql.in >postgis.sql

which results in the installed postgis.sql trying to load
$libdir/postgis-1.4 like this:

  -- Deprecation in 1.2.3
  CREATE OR REPLACE FUNCTION spheroid_in(cstring)
RETURNS spheroid AS '$libdir/postgis-1.4','ellipsoid_in' LANGUAGE 'C' IMMUTABLE STRICT;
which does not work.  So I think the make rule should use " not ' so
$libdir is expanded, and should say libpostgis instead of postgis.  But
obviously this must work for others, so I suspect there's something odd
about what I'm doing.

No, I think you've misunderstood this. The build system simply replaces MODULE_PATHNAME with $libdir/postgis-1.4. The library string '$libdir/postgis-1.4' is correct because the $libdir substitution is done by PostgreSQL at run-time and not by the build system.

If this doesn't work, perhaps you're either missing a dependency such as PROJ/GEOS or you have multiple installations of PostgreSQL and you're picking up the wrong pg_config? Checking the PostgreSQL server log can help you here.

* top-level make install does not seem to descend into doc.  Is this
  intentional, or am I doing something wrong in packaging?  I didn't
  find this explained in README.postgis, but it doesn't mention docs
  under installation.

Yeah - this is mainly because the documentation has some quite heavy dependencies for example docbook, xslt and all sorts. We figured that people would much rather read the documentation online rather than install half of the known typesetting universe to build the documentation ;)

* in doc, there are some prebuilt man pages in the distribution tarball,
  plus docbook.  docbook is not listed as a dependency in
  README.postgis, but it seems to be.  Should I just add it as a
  dependency?  The other strategy is to prebuild the docs as part of
  'make dist' and have the build system be willing to install those
  built doc bits, but it's not like systems that can handle postgresql
  can't handle the space for xml tools, so this probably doesn't make
  sense.

I think I answered this above...

* liblwgeom does not get installed.  The postgis library has U symbols
  for things in lwgeom.  There is makefile code to pull in objects from
  liblwgeom.a into libpostgis.so, but that doesn't seem to work.
  Clearly I need to look into this further, but would like to know the
  plan so I can understand where my build is going wrong

    Is there supposed to be a liblwgeom.a installed?  Where?

Nope - it's currently a static library and so gets manually linked to everything that needs it. In short, you don't need to worry about this.


HTH,

Mark.

--
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users

Reply via email to