[postgis-devel] module linking issues
Bryce L Nordgren
bnordgren at gmail.com
Wed Jun 29 07:05:20 PDT 2011
On Tue, Jun 28, 2011 at 11:08 AM, Sandro Santilli <strk at keybit.net> wrote:
> On Tue, Jun 28, 2011 at 08:58:54AM -0600, Bryce L Nordgren wrote:
> > On Mon, Jun 27, 2011 at 1:31 AM, Sandro Santilli <strk at keybit.net>
> wrote:
> >Wait a sec.
> First of all, "make check" should be done _before_ "make install".
>
My foggy memory seems to recall that make check tried to connect to a
running database server, so I've been avoiding it (until I can get the
server installed and running). I have yet to wrap my head around the postgis
testing system, which seems to rely pretty heavily on SQL.
> Second: running psql -f rtpostgis-2.0.sql is "enabling" a database,
> not installing; the library needs to be installed before enabling
> the database.
>
I'm building this as a package under ArchLinux. The binaries (including
libs) have been installed in the prescribed places before I attempt to run
the server, much less create the database and load types/functions from
postgis-2.0.sql, spatial_ref_sys.sql, and rtpostgis-2.0.sql. The installed
system is still trying to access the postgis shared library in my build
directory (which is gone) at the rtpostgis-2.0 step. Here's what happens
when I attempt to "enable" a database:
psql:rtpostgis-2.0/rtpostgis.sql:39: NOTICE: type "raster" is not yet
defined
DETAIL: Creating a shell type definition.
psql:rtpostgis-2.0/rtpostgis.sql:39: ERROR: could not load library
"/usr/lib/postgresql/rtpostgis-2.0.so": /home/bnordgr
en/build/local/postgis-svn/src/trunk-build/postgis/postgis-2.0.so: cannot
open shared object file: Permission denied
.....
That said, I'm not sure you can dynamically link to other libraries ...
> ...
>
> Or, revert to statically linking liblwgeom, which is what postgis
> shared library does.
>
liblwgeom is already statically linked to raster. I created a dependency
from raster to postgis (which did not previously exist), and postgis exists
only as a shared library. Mark's proposed solution was to move the needed
code out of postgis and into liblwgeom, to exploit this existing static
link. Doing so would create a dependency from liblwgeom to postgresql, which
may not be compatible with the design goals of liblwgeom (waiting on an
answer now).
I guess the fundamental issue is: how does one postgresql module depend on
another? Postgis is dynamically linked because postgresql makes it be
dynamically linked, right?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110629/97953ad2/attachment.html>
More information about the postgis-devel
mailing list