On Fri, Mar 14, 2008 at 05:33:14PM -0700, Bernard Li wrote:
> On 3/14/08, Bernard Li <[EMAIL PROTECTED]> wrote:
> 
> > Got the following error w/ make:
> >
> >  make[4]: Entering directory `/root/code/ganglia/libmetrics/tests'
> >  /bin/sh ../libtool --mode=link --tag=CC gcc  -g -O2   -o test-metrics
> >  -static test-metrics.o ../libmetrics.la ../../lib/libganglia.la -lnsl
> >  -lresolv
> >  gcc -g -O2 -o test-metrics test-metrics.o  ../.libs/libmetrics.a
> >  ../../lib/.libs/libganglia.a /usr/lib/libexpat.a -lconfuse
> >  /usr/lib/libapr-1.a -ldl -lpthread -lnsl -lresolv
> >  gcc: /usr/lib/libapr-1.a: No such file or directory
> >  make[4]: *** [test-metrics] Error 1
> >  make[4]: Leaving directory `/root/code/ganglia/libmetrics/tests'
> >  make[3]: *** [all-recursive] Error 1
> >  make[3]: Leaving directory `/root/code/ganglia/libmetrics'
> >  make[2]: *** [all] Error 2
> >  make[2]: Leaving directory `/root/code/ganglia/libmetrics'
> >  make[1]: *** [all-recursive] Error 1
> >  make[1]: Leaving directory `/root/code/ganglia'
> >  make: *** [all] Error 2

this is a bug, "test-metrics" shouldn't be built unless "make check" was
requested, and so this wouldn't happen.

> >  I should be dynamically linking, why is it looking for libexpat.a and
> >  libapr-1.a explicitly instead of doing -lexpat and -lapr-1?

test-metrics needs to be statically linked so it can be run on tree without
being installed.

> >  Obviously I was able to build Ganglia on this box before, so this is
> >  caused by a code change (also, FYI, the apr-devel package from Fedora
> >  does *not* include libapr-1.a, only libapr-1.la).
> 
> Did a bit of poking, here are the contents of libganglia.la:
> 
> # Libraries that this one depends upon.
> dependency_libs=' -lnsl
> /usr/lib/gcc/i386-redhat-linux/3.4.6/../../..//libexpat.la -lconfuse
> /usr/lib/libapr-1.la -ldl -lpthread'
> 
> Note that it says libapr-1.la not libapr-1.a -- so somewhere this got
> replaced...

libtool does that, but your libapr is probably incorrectly build
(--enable-static and libapr.a was deleted).

Carlo

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ganglia-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to