[rrd-users] RRDs.pm problem.

Bernard Li bernard at vanhpc.org
Thu Nov 6 08:32:45 CET 2008


Hi Cox:

Instead of the symlink, you could also add
/usr/local/rddtools-[version]/lib to your LD_LIBRARY_ PATH.  But I
suppose both methods work just as well.

Cheers,

Bernard

On Mon, Nov 3, 2008 at 5:08 PM, Guilherme Cox <cox at computer.org> wrote:
> Update about my problem.
>
> The problem is an unresolved shared link.
>
> root at saturn:/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/RRDs# ldd RRDs.so
>        linux-gate.so.1 =>  (0xffffe000)
>        librrd.so.4 => not found
>        libc.so.6 => /lib/tls/libc.so.6 (0xb7f76000)
>        /lib/ld-linux.so.2 (0xb80a3000)
>
>
> That's because /usr/local/rddtools-[version]/lib is not a OS library repository.
>
> My solution was:
>
> root at saturn:/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/RRDs# ln -s
> /usr/local/rrdtool/lib/librrd.so.4 /usr/local/lib/librrd.so.4
> root at saturn:/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/RRDs# ldconfig
> root at saturn:/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/RRDs# ldd RRDs.so
>        linux-gate.so.1 =>  (0xffffe000)
>        librrd.so.4 => /usr/local/lib/librrd.so.4 (0xb8024000)
>        libc.so.6 => /lib/tls/libc.so.6 (0xb7f08000)
>        libxml2.so.2 => /usr/local/lib/libxml2.so.2 (0xb7dee000)
>        libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0xb7dbd000)
>        libm.so.6 => /lib/tls/libm.so.6 (0xb7d9a000)
>        libpangocairo-1.0.so.0 =>
> /usr/local/lib/libpangocairo-1.0.so.0 (0xb7d90000)
>        libpango-1.0.so.0 => /usr/local/lib/libpango-1.0.so.0 (0xb7d4e000)
>        libcairo.so.2 => /usr/local/lib/libcairo.so.2 (0xb7ce4000)
>        libgobject-2.0.so.0 => /usr/local/lib/libgobject-2.0.so.0 (0xb7ca8000)
>        libgmodule-2.0.so.0 => /usr/local/lib/libgmodule-2.0.so.0 (0xb7ca4000)
>        libglib-2.0.so.0 => /usr/local/lib/libglib-2.0.so.0 (0xb7bd0000)
>        /lib/ld-linux.so.2 (0xb8076000)
>        libdl.so.2 => /lib/tls/libdl.so.2 (0xb7bcb000)
>        libz.so.1 => /usr/lib/libz.so.1 (0xb7bb9000)
>        libpangoft2-1.0.so.0 => /usr/local/lib/libpangoft2-1.0.so.0 (0xb7b92000)
>        libfreetype.so.6 => /usr/local/lib/libfreetype.so.6 (0xb7b17000)
>        libfontconfig.so.1 => /usr/local/lib/libfontconfig.so.1 (0xb7aec000)
>        libpixman-1.so.0 => /usr/local/lib/libpixman-1.so.0 (0xb7aaa000)
>        libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7a8a000)
> root at saturn:/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/RRDs#
>
> and finally, to test:
>
>
> root at saturn:/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/RRDs# perl
> -MRRDs -le 'print q(ok!)'
> ok!
>
> I hope it helps others...
>
> regards
>
>
> On Mon, Nov 3, 2008 at 9:19 PM, Guilherme Cox <cox at computer.org> wrote:
>> Hi all,
>>
>> I am trying to compile a version of rrdtool. I need the RRDs.pm too.
>>
>> I tryed the lastest version, 1.3.4, and the 1.2.27.
>>
>> In both versions, when I've tryed to execute the command:
>> root at saturn:/home/cox# perl -MRRDs -le 'print q(ok!)'
>> Can't load '/usr/lib/perl5/site_perl/5.8.7/i486-linux/auto/RRDs/RRDs.so'
>> for module RRDs: librrd.so.4: cannot open shared object file: No such
>> file or directory at /usr/lib/perl5/5.8.7/i486-linux/DynaLoader.pm
>> line 230.
>>  at -e line 0
>> Compilation failed in require.
>> BEGIN failed--compilation aborted.
>> root at saturn:/home/cox#
>>
>> The rrdtool is working, because I can use it with ntop (from
>> ntop.org). However, I need to use the perl module and I can't figure
>> out what I am doing wrong.
>>
>> I saw an email that recommends to use the version 1.2.7, however the
>> error is still happening.
>>
>> I went to rddtool-version/bindings/perl-shared ahd executed the setps
>> described in README file:
>>
>> root at saturn:/home/cox/rrdtool-1.2.27/bindings/perl-shared# perl Makefile.PL
>> Checking if your kit is complete...
>> Looks good
>> Writing Makefile for RRDs
>> root at saturn:/home/cox/rrdtool-1.2.27/bindings/perl-shared# make test
>> cp RRDs.pm blib/lib/RRDs.pm
>> cp ntmake.pl blib/lib/ntmake.pl
>> /usr/bin/perl5.8.7 /usr/lib/perl5/5.8.7/ExtUtils/xsubpp  -typemap
>> /usr/lib/perl5/5.8.7/ExtUtils/typemap  RRDs.xs > RRDs.xsc && mv
>> RRDs.xsc RRDs.c
>> cc -c  -I../../src -fno-strict-aliasing -pipe -I/usr/local/include
>> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=i486 -mcpu=i686
>>  -DVERSION=\"1.2027\" -DXS_VERSION=\"1.2027\" -fPIC
>> "-I/usr/lib/perl5/5.8.7/i486-linux/CORE"  -DPERLPATCHLEVEL=8 RRDs.c
>> Running Mkbootstrap for RRDs ()
>> chmod 644 RRDs.bs
>> rm -f blib/arch/auto/RRDs/RRDs.so
>> LD_RUN_PATH="/usr/local/lib" cc  -shared -L/usr/local/lib RRDs.o
>> -L../../src/.libs/  -lrrd  -o blib/arch/auto/RRDs/RRDs.so   -lm -lpng
>> -lz -lfreetype
>> chmod 755 blib/arch/auto/RRDs/RRDs.so
>> cp RRDs.bs blib/arch/auto/RRDs/RRDs.bs
>> chmod 644 blib/arch/auto/RRDs/RRDs.bs
>> PERL_DL_NONLAZY=1 /usr/bin/perl5.8.7 "-MExtUtils::Command::MM" "-e"
>> "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
>> t/base....Can't load
>> '/home/cox/rrdtool-1.2.27/bindings/perl-shared/blib/arch/auto/RRDs/RRDs.so'
>> for module RRDs: librrd.so.2: cannot open shared object file: No such
>> file or directory at /usr/lib/perl5/5.8.7/i486-linux/DynaLoader.pm
>> line 230.
>>  at t/base.t line 20
>> Compilation failed in require at t/base.t line 20.
>> BEGIN failed--compilation aborted at t/base.t line 20.
>> t/base....dubious
>>        Test returned status 2 (wstat 512, 0x200)
>> DIED. FAILED tests 1-7
>>        Failed 7/7 tests, 0.00% okay
>> Failed Test Stat Wstat Total Fail  Failed  List of Failed
>> -------------------------------------------------------------------------------
>> t/base.t       2   512     7   13 185.71%  1-7
>> Failed 1/1 test scripts, 0.00% okay. 7/7 subtests failed, 0.00% okay.
>> make: *** [test_dynamic] Error 2
>>
>>
>> It seems that it can't find the librrd. I tryed to change Makefile to
>> force the place where I know it's, but it didn't help, I've got the
>> same error.
>>
>> Thanks for any help.
>>
>> Guilherme
>>
>
>
>
> --
> .cox
>
> -- Guilherme Cox
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
>



More information about the rrd-users mailing list