[rrd-developers] Link issue with libdbi

Martin Sperl rrdtool at martin.sperl.org
Sun Feb 6 16:43:53 CET 2011

Actually I am quite surprised that that you are:
a) link with the absolute path to link the so library and not use "-l rrd"
b) you need to explicitly linkt libdbi again, if your code is not using it.

As for how to detect:
ldd /us/lib/libdbirrd.so
should show you what libraries libdbi links against dynamically - at least on linux...


On 04.02.2011, at 00:26, Bernard Li wrote:

> Hi all:
> [sending back to rrd-developers]
> On Thu, Feb 3, 2011 at 1:24 PM, Tobias Oetiker <tobi at oetiker.ch> wrote:
>> if you have build rrdtool on a system with libdbi installed you may
>> have to link libdbi explicitly when compiling against librrd ...
>> to be safe, just disable libdbi support in configure since you are
>> most likely not going to use it anyway ...
> Thanks Tobi and Martin for their responses.
> I am just working with pre-built binary packages of rrdtool and I
> believe most of them have libdbi enabled.  So it sounds like for
> Ganglia, I will need to add a check to see if librrd was linked with
> libdbi and if so, add -ldbi to the Ganglia Makefile.
> I still have a few queries:
> 1) On Ubuntu/Debian, librrd.so (provided by librrd-dev) links against
> libdbi.so.0 (provided by libdbi0) but librrd-dev does not actually
> require libdbi0-dev that provides libdbi.so -- is this a bug with the
> packaging of librrd-dev?
> 2) What's the best way for Ganglia to programmically check if the
> installed librrd.so is linked against libdbi and subsequently add
> -ldbi to its Makefile?
> For those who are interested in seeing the problem in action, the
> tarballs are here:
> http://therealms.org/oss/ganglia/techpreview/
> ganglia- was bootstrapped on RHEL5, and when built on
> Ubuntu complains about missing /usr/lib/libdbi.so (which is provided
> by libdbi0-dev)
> ganglia- was bootstrapped on Ubuntu and builds fine
> under Ubuntu without libdbi0-dev
> To build, run `./configure --with-gmetad` then do `make` -- it would
> error out while building gmetad.
> Thanks!
> Bernard

More information about the rrd-developers mailing list