[postgis-users] Re: ver 1.1.5 configure fails on Ubuntu
gdt at ir.bbn.com
Fri Nov 10 13:54:33 PST 2006
I just updated pkgsrc to geos 2.2.3 and postgis 1.1.6.
Because 2.2.3 has --ldflags, I'm no longer worried about configure
being patched for the old --libs. But I'm impressed that you're
maintaining backwards compatibility.
I see your point about --libs having the library and that --ldflags
strk at refractions.net writes:
>> From: gdt
>> This patch (among others not relevant to this issue) is applied to
>> geos 2.0.0. It's kludgy, but it gets -Wl,-R/usr/pkg/lib added like it
>> should be.
> mmm... I'm not sure we want to force that -rpath...
That's a messy issue, and the right behavior is OS dependent. On
NetBSD, the runtime library search path is only /lib and /usr/lib.
/usr/pkg/lib is not in the compiler default path or the runtime path.
So using geos requires "-L/usr/pkg/lib -lgeos" like you'd expect at
link time, but also -R/usr/pkg/lib to put the dir in the binary for
run-time resolution. I realize there are good reason to prefer the
various approaches (Debian with banned rpath and all in /usr/lib,
LD_LIBRARY_PATH, Darwin's use of absolute paths, and NetBSD's -rpath);
my usual meta-approach is to make packages do the right local thing
according to each system's norms. I don't fully understand how to do
this automatically, but using libtool and pkg-config usually seems
best. I'll try to write a pkg-config file for geos (or one for geos
and one for geos_c, since pkg-config results in specifying the
Thus, I'm not asking you to merge the rpath patch into geos, just
telling you what I did.
After my updates today, pkgsrc has just 1 patch for geos (to add the
-R to the output of ldflags/libs), and no patches for postgis. I was
able to load postgis into a fresh db and run the examples in the
README. This is with PostgreSQL 8.1.4 on NetBSD/i386 4.99.3, with gcc
Thanks for all your efforts to make this portable.
More information about the postgis-users