[collectd] Yet another Solaris 10 patch: Runtime library path for postgresql plugin
ssevertson at digitalmeasures.com
Wed May 30 17:36:17 CEST 2012
Just added PostgreSQL plugin support to our Solaris 10 x64/GCC build,
and discovered that the resulting postgresql.so library doesn't have a
correctly configured runtime path.
# ldd postgresql.so
libpq.so.5 => (file not found)
libc.so.1 => /lib/64/libc.so.1
libgcc_s.so.1 => /usr/sfw/lib/64/libgcc_s.so.1
libm.so.2 => /lib/64/libm.so.2
I could just add an LDFLAGS environment variable including this path,
but this would be applied to all plugins/binaries.
It appears that the autoconf script is building libpq's LDFLAGS based on
the output of "pg_config --libs":
with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
for dir in $with_libpq_libdir; do
Would it be harmful to other platforms to also add "-R$dir" to the
generated LDFLAGS for this plugin? I've attached a patch against 5.1.0
autoconf script which does so.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 390 bytes
Desc: not available
More information about the collectd