Discussion:
[collectd] Installing collectd on Solaris hosts
Jean-Paul Blaquiere
2011-01-09 13:48:30 UTC
Permalink
I've been trying to get collectd working on a series of Solaris and Ubuntu hosts. The Ubuntu ones are easy (apt-get install collectd)
but, because I need to build it from source on Solaris, I am having some issues, and am feeling a little ... frustrated.

I have cloned the source out of the git repository, and have collectd built, and running on the host I built it on, however, getting it installed on any other host is proving difficult.

I've tried a couple of methods, first, rsync /opt/collectd from the build host onto other hosts. That gives me a whole heap of libtool errors
- lt_dlopen (/opt/collectd/lib/collectd/syslog.so) failed: file not found
- etc etc etc

Method two is to copy the build directory across to a new host, and run 'make install.' However, the Makefile then for some reason calls gcc, and others, which don't exist on a production server. (development tools? Not on my watch) and attempts to rebuild the entire collectd app, before it gets around to installing it.

I'm obviously missing something ....
I think the easiest way is to work out how to make libtool realise that there's a bunch of libraries associated with collectd, but I have no idea how to make that happen.

The other question, is, what process is followed for building the Solaris packages as listed on the website? That would be really useful information to have publicly available.


Any ideas to help resolve this happily accepted.


/jp
--
Jean-Paul Blaquiere
jeanpaul at blaquiere.id.au
Florian Forster
2011-01-09 14:14:30 UTC
Permalink
Hi,
Post by Jean-Paul Blaquiere
I've tried a couple of methods, first, rsync /opt/collectd from the
build host onto other hosts.
installing into a directory and copying that directory is the way to go
(unless a package is available, of course). It's likely that you need to
copy to the same directory on the target host.
Post by Jean-Paul Blaquiere
That gives me a whole heap of libtool errors
- lt_dlopen (/opt/collectd/lib/collectd/syslog.so) failed: file not found
Assuming that the file "syslog.so" actually exists at that path (would
have been an interesting information), this very likely means that a
shared library the plugin is linked with wasn't found. You can verify
this by running

$ ldd /opt/collectd/lib/collectd/syslog.so

and looking for any dependencies not found. If you copy the binaries it
is very important that the *same* libraries exist on the target host and
that they have the same (or a compatible) SONAME version and that they
are found at the same location (or are in the standard search path).
Post by Jean-Paul Blaquiere
- etc etc etc
What other errors do you get?
Post by Jean-Paul Blaquiere
Method two is to copy the build directory across to a new host, and
run 'make install.'
That won't do any good. Either you copy the binaries (as described
above) or you build on the target host directly. Copying a dirty build
directory will only cause trouble.
Post by Jean-Paul Blaquiere
I think the easiest way is to work out how to make libtool realise
that there's a bunch of libraries associated with collectd, but I have
no idea how to make that happen.
I don't understand what you mean by that? The plugins *are* linked with
their dependencies, that's what libtool is for.
Post by Jean-Paul Blaquiere
The other question, is, what process is followed for building the
Solaris packages as listed on the website? That would be really
useful information to have publicly available.
See: <http://www.sunfreeware.com/pkgadd.html>

Best regards,
?octo
--
Florian octo Forster
Hacker in training
GnuPG: 0x0C705A15
http://octo.it/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20110109/fc084bcf/attachment.pgp>
Jean-Paul Blaquiere
2011-01-09 14:33:12 UTC
Permalink
Thank you for the ldd check. I had neglected to run that one, assuming that I had the right libraries installed already.
It picked up the fact that I did not have the gcc3 run time libraries installed on my prod zones, only the gcc4 run times. collectd is referencing the gcc3 libraries. added them and it appears to be fixed.
Thank you.

broken system:
[root at gytha collectd]# ldd /opt/collectd/lib/libcollectdclient.so
libc.so.1 => /lib/libc.so.1
libgcc_s.so.1 => (file not found)
libm.so.2 => /lib/libm.so.2
[root at gytha collectd]#

working system:
[root at evadne collectd]# ldd /opt/collectd/lib/libcollectdclient.so
libc.so.1 => /lib/libc.so.1
libgcc_s.so.1 => /opt/csw/lib/libgcc_s.so.1
libm.so.2 => /lib/libm.so.2
[root at evadne collectd]#
Post by Florian Forster
See: <http://www.sunfreeware.com/pkgadd.html>
ahhh just the thing. Midnight reading. thank you.


./jp
--
Jean-Paul Blaquiere
jeanpaul at blaquiere.id.au
Loading...