First Last Prev Next    No search results available
Details
: build of 3.05 fails under leopard
Bug#: 168
: Ganglia Monitoring System
: build
Status: ASSIGNED
Resolution:
: Macintosh
: MacOS X
: 3.0.x
: P2
: normal

:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Dan Gunter <dkgunter@lbl.gov>
Assigned To: Bernard Li <bernard@vanhpc.org>
:

Attachments


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2007-12-14 13:11
On Mac OS X 10.5 (Leopard), ganglia-3.0.5.tar.gz fails to build. Both failures
are easily worked around, but of course it would be nice not to:

1) problem: kvm.h, referenced from libmetrics/darwin/metrics.c,
   is no longer in /usr/include
   solution: comment out #include kvm.h

2) problem: apr.h has the wrong setting for APR_HAS_SENDFILE, see text
   solution: do what the error message says and set the flag properly

--- ugly error text ---
Making all in network_io/unix
ganglia-3.0.5/srclib/apr/network_io/unix
/bin/sh ganglia-3.0.5/srclib/apr/libtool --silent --mode=compile gcc -g -O2  
-DHAVE_CONFIG_H -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp  
-I../../include -I../../include/arch/unix -I../../include/arch/unix  -c
sendrecv.c && touch sendrecv.lo
sendrecv.c:965:2: error: #error APR has detected sendfile on your system, but
nobody has written a
sendrecv.c:966:2: error: #error version of it for APR yet. To get past this,
either write apr_sendfile
sendrecv.c:967:2: error: #error or change APR_HAS_SENDFILE in apr.h to 0.
--- end error text ---
------- Comment #1 From Bernard Li 2008-03-21 14:20:46 -------
For 1), I am not sure whether starting with Leopard, KVM is no longer supported
by Darwin -- if so, the following patch would fix the problem:

Index: libmetrics/darwin/metrics.c
===================================================================
--- libmetrics/darwin/metrics.c (revision 1004)
+++ libmetrics/darwin/metrics.c (working copy)
@@ -11,7 +11,12 @@

 #include <stdlib.h>
 #include "interface.h"
+
+/* kvm.h is no longer in /usr/include for Leopard */
+#ifndef MAC_OS_X_VERSION_10_5
 #include <kvm.h>
+#endif
+
 #include <sys/sysctl.h>

 #include <mach/mach_init.h>

But I don't know Darwin enough to confirm this -- hopefully someone more
knowledgeable can comment on this.
------- Comment #2 From rcobb@quantcast.com 2008-07-15 14:59:04 -------
I've tried the patch suggested, but it doesn't quite work. stdlib.h does not
include AvailabilityMacros.h. I 
do get a compile if I #include "AvailabilityMacros.h" before the #ifndef
suggested.
------- Comment #3 From Bernard Li 2010-06-25 18:00:57 -------
For problem 1), see also bug 258:

http://bugzilla.ganglia.info/cgi-bin/bugzilla/show_bug.cgi?id=258

First Last Prev Next    No search results available