Giter Site home page Giter Site logo

Comments (6)

MirzaSikander avatar MirzaSikander commented on July 4, 2024

Hey guys. I have tried multiple times, but to no avail. Any help would be appreciated. Thanks

from monitor-core.

MirzaSikander avatar MirzaSikander commented on July 4, 2024

I was able to compile ganglia on MacOSX. If somebody else is looking, here is how you do it

  1. Download ganglia from the main website. My version is 3.6.0
  2. Extract and open file libmetrics/darwin/metrics.c
  3. You need to make two edits to this file. Just add the lines with the + at the start.

FIRST EDIT:
--- libmetrics/darwin/metrics.c.orig 2010-03-16 17:10:25.000000000 +0100
+++ libmetrics/darwin/metrics.c 2010-03-16 20:09:54.000000000 +0100
@@ -11,7 +11,12 @@

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

#include <mach/mach_init.h>

SECOND EDIT:
diff --git a/libmetrics/darwin/metrics.c b/libmetrics/darwin/metrics.c
index 2259d84..7d285a0 100644
--- a/libmetrics/darwin/metrics.c
+++ b/libmetrics/darwin/metrics.c
-446,6 +446,17 cpu_intr_func ( void )
** FIXME
*/
g_val_t
+cpu_steal_func ( void )
+{

  • g_val_t val;
  • val.f = 0.0;
  • return val;
    +}

+/*
+* FIXME
+
/
+g_val_t
cpu_sintr_func ( void )
{
g_val_t val;

  1. follow the rest of the guide here: https://www.deanspot.org/alex/2009/07/25/compiling-ganglia-gmond-and-gmetad-osx-105.html

from monitor-core.

thoo avatar thoo commented on July 4, 2024

How can I edit the second part? I think I did it wrong and it is still not working. Here is the line:

cpu_intr_func ( void )
{
g_val_t val;
val.f = 0.0;
return val;
}

/*
** FIXME
*/
g_val_t
cpu_sintr_func ( void )
{
g_val_t val;
val.f = 0.0;
return val;
}
####################
Thanks,

from monitor-core.

logc avatar logc commented on July 4, 2024

This bug report includes a diff that is probably a copy of this other one, also on Github. The problem is that here it was not formatted as verbatim text, and therefore, the diff is incomplete (e.g. the included files are interpreted as HTML tags and not shown, and the deleted lines in the second are shown as a bullet list).

For the record, here is how it should look like, as far as I can guess:

--- libmetrics/darwin/metrics.c.orig    2010-12-08 08:29:45.000000000 -0600
+++ libmetrics/darwin/metrics.c 2010-12-08 08:30:53.000000000 -0600
@@ -11,7 +11,13 @@

 #include <stdlib.h>
 #include "interface.h"
+
+/* kvm.h is no longer in /usr/include as of osx 10.5 */
+#include "AvailabilityMacros.h"
+#ifndef MAC_OS_X_VERSION_10_5
 #include <kvm.h>
+#endif
+
 #include <sys/sysctl.h>

 #include <mach/mach_init.h>
diff --git a/libmetrics/darwin/metrics.c b/libmetrics/darwin/metrics.c
index 2259d84..7d285a0 100644
--- a/libmetrics/darwin/metrics.c
+++ b/libmetrics/darwin/metrics.c
-446,6 +446,17 cpu_intr_func ( void )
** FIXME
*/
g_val_t 
+cpu_steal_func ( void )
+{

-g_val_t val;
-val.f = 0.0;
-return val; 
+} 
+ 
+/* 
+** FIXME 
+*/ 
+g_val_t 
cpu_sintr_func ( void ) 
{ 
    g_val_t val;

from monitor-core.

logc avatar logc commented on July 4, 2024

... and yes, with those two changes, Ganglia (3.6.1) compiles on my machine (Darwin 14.0.0 with MacPorts toolchain)

from monitor-core.

jbuchbinder avatar jbuchbinder commented on July 4, 2024

This is present in the latest git version.

from monitor-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.