[rrd-users] Re: compiling rrdtool on HP-UX 11.0

Lewis, Scott G. SLewis1 at bcbsm.com
Thu May 10 15:30:30 MEST 2001


I chose the longer route (I compiled perl from the source), but rrdttool
finally compiled and is functioning. thanks!!!!

	

-----Original Message-----
From: Jakob Ilves [mailto:jakob.ilves at oracle.com]
Sent: Thursday, May 10, 2001 4:28 AM
To: Scott G. Lewis
Cc: 'ialbury at csc.com.au'; 'rrd-users'; michael_goertz at hp.com
Subject: Re: [rrd-users] Re: compiling rrdtool on HP-UX 11.0


Hello Scott and Michael!

This is a long mail but I hope it's a legible description of what (I
suppose)
are biting you and how that can be fixed.  (BTW, this mail is a reply to two
different mails I've recieved describing the same problem)

"Scott G. Lewis" wrote:

> No I still haven't solved the problem. Any one else out there have any
ideas
> yet!!!!

(Ok, here we talk about building rrdtool for HP-UX 11.00 where everything
goes
great until that "ld: can't find library for -lrrd_private" error mesage...)

Probably your Perl installation don't know that you use gcc and not the HP C
compiler.  Those two compilers (and their associated tools) both use
different
flags for controlling some vital features and the flags suitable for
building
with the HP C compilier are provided to gcc, causing some problems.  This is
how
it happens:

When configure is run it investigates your system and generates a number of
Makefiles adopted to your system's specific environment.  In order to create
the
Makefile for the Perl module RRDs.sl the configure program runs a small Perl
program (Makefile.PL) which writes the Makefile.  The grunt job of creating
this
Makefile is done by a function called "WriteMakefile" which is part of the
ExtUtils::MakeMaker module.  The latter module is part of the Perl
environment
itself and as the Perl environment "remembers" by the help of another
module,
Config,  the flags etc for the C development environment it (the Perl
environment) was built under. "WriteMakefile" uses those flags when building
the
Makefile for RRDs.sl.

Think of it, it's a smart feature.  It makes sure that the RRDs.sl module is
built with a Makefile which uses the same compiler/linker etc flags which
was
used when Perl was built.  (As the environment worked to build Perl, so it
will
work to building RRDs.sl).  The problem is when you use a precompiled
version of
Perl, which was built in an environment completely different from the system
Perl runs on.  "WriteMakefile" will remember the wrong environment and not
produce a proper Makefile causing errors which at times might be very
misleading
symptoms considering the original cause of the problem.

So, how to fix this to make rrdtool build?  It has to be fixed as it will
not
only bite your attempts to build RRDs.sl, other packages with Perl modules
might
fail as well.  I know of two solutions:

The first one is to download the entire Perl distribution and build it on
your
machine, using the same environment as you use for building rrdtool (gcc,
gnu
make etc).

The second one is less disruptive and that is to edit the file Config.pm
which
contains the parameters which controls "WriteMakefile".  It's located in

/opt/perl5/lib/5.6.1/PA-RISC1.1/Config.pm  (replace "/opt/perl5" with
whatever
you use as your "Perl root").

It's fairly obvious what the variables do but I don't remember the exact
details
of which to edit.  However, ensure that cc is set by cc='gcc' (and not
cc='cc'),
osname='hpux', osvers='11.00'.  (Yes, the Perl precompiled for HP-UX 11.00
had
osvers='10.20' in it...)

A quick way to identify what variables to change is to run configure and
then
check if some vital variables such as CCFLAGS, LDFLAGS etc are different in
two
Makefiles rrdtool-1.0.33/src/Makefile (where the variables are OK) and
rrdtool-1.0.33/perl-shared/Makefile (where the variables might be goofy and
must
be tweaked by editing Config.pm).

I've used both methods at different occasions and both helped.

So, this is a Perl thing and not a rrdtool thing.  The only thing Tobi can
do to
eliviate this is to make the configure script in advance check the Perl
environment to see if it's properly setup to generate Makefiles for shared
Perl
modules or not and if not, provide a description of what's wrong and suggest
how
to fix it.  (Tobi started some work with configure to fix this and some
other
problems but I still haven't tested those patches to configure he sent me.
Being
too busy... :-/ )

Did you compile the Perl on the box yourself or have you used the
precompiled
binary for HP-UX 11.00 available on the HP-UX porting and archiving center?
If
you use the precompiled version of Perl, you use a version which was built
using
the HP C development tools.  If you've built the Perl environment from
source
and still see this problem, then I don't know what bites you.

I admit that this situation in spite of being fully logical is remarkably
counter intuitive.  Normally downloading and installing a precompiled
version of
a software packet is a GOOD thing.  And the cool feature "WriteMakefile"
normally also is a good thing...  Well, well, computers should be a
challenge at
times, shouldn't they ;-).

Hope this helps and best regards

/IlvJa

>
> I am getting the following error compiling rrdtool-1.0.33
>
> ld: Can't find library for -lrrd_private
> *** Error exit code 1
>
> Any ideas????????
>
> -----Original Message-----
> From: ialbury at csc.com.au [mailto:ialbury at csc.com.au]
> Sent: Wednesday, May 09, 2001 12:28 AM
> To: slewis1 at bcbsm.com; jmetelonis at bdo.com
> Subject: compiling rrdtool on HP-UX 11.0
>
> I am having the same problem(s) with the rrd_private shared library, did
> you ever get over this problem or get any usefull help?
> I can edit the Makefile to drop the "-a shared" from the LDDLFLAGS and
> complet the "make" but I then experience other problems on the "make
> install".
>
> thanks.
>
> Ian Albury
> __________________________________________________
> CSC
> Level 3, 151 Clarence Street, Sydney NSW 2000
> Ph: +61 2 8296 2695    Email: ialbury at csc.com.au
>
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
                (Jakob Ilves) <jakob.ilves at oracle.com>
             {Oracle Global IT, Network Management Group}
[Office as well as mobile phone: +46/8/477 3666 | Fax: +46/8/477 3572]




--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list