[postgis-devel] module linking issues

Bryce L Nordgren bnordgren at gmail.com
Wed Jun 29 07:35:33 PDT 2011


On Wed, Jun 29, 2011 at 2:13 PM, Sandro Santilli <strk at keybit.net> wrote:

> The ERROR you printed above suggests
> your added linking is performed trough an -rpath switch or something
> similar
> encoding the builddir path into the rtpostgis-2.0.so file. You should
> either
> not do that and let the system know where to find postgis-2.0.so OR you
> should
> set that path to be the installation path, rather than the build path.
>
> Note that using an -rpath makes it harder (if possible at all) to run the
> regress testing using the just-built postgis library rather than the system
> installed one...
>

The linking line in question is:

gcc -march=x86-64 -mtune=generic -O2 -pipe -Wall -Wmissing-prototypes
-Wpointer-arith -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -fwrapv -fpic -shared -o rtpostgis-2.0.so rt_pg.o
-L/usr/lib -Wl,--hash-style=gnu -Wl,--as-needed  -Wl,--as-needed
-Wl,-rpath,'/usr/lib',--enable-new-dtags  -L/usr/lib  -lgeos_c -lproj -lxml2
-lz -lm ../rt_core/librtcore.a
/home/bnordgren/build/local/postgis-svn/src/trunk-build/liblwgeom/liblwgeom.a
-Wl,-rpath-link,/home/bnordgren/build/local/postgis-svn/src/trunk-build/postgis
-L/home/bnordgren/build/local/postgis-svn/src/trunk-build/postgis -l:
postgis-2.0.so -L/usr/lib -lgdal

This is actually the third iteration, and the first two tries had no
-rpath-link. The "-rpath=/usr/lib" was actually supplied by pg_config and I
don't think I can get rid of it without seriously messing with the build
system. I doubt that's my problem anyway, since that's actually where I want
it to look.

On my first try, I rather simplistically listed the path to the
postgis-2.0.so file with no special command line options at all. Everything
I've tried seems to remember where postgis-2.0.so was at the time it was
linked.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20110629/58701ccd/attachment.html>


More information about the postgis-devel mailing list