Aravindh,

 basically my build on Solaris 8 (gcc-3.3.1, gnu-make-3.80) is as
follows:

unpack tarball
cd into ganglia-3.0.3
CC="gcc -m64" ./configure
make

 That works just fine since 2.5.7. But I never tried Solaris 9.

 Now, looking at the error message, it seems that there is a naming
conflict between srclib/libmetrics/solaris/metrics.c and a system
include file regarding "ncpus". Could you please try the following
patch? This eliminates the unnecessary "ncpus" variable from
"metrics.c". 

 The only strange thing is that we should have the same conflict in
Solaris 8 ..... But maybe it is a problem with gcc-4. Who knows.

Cheers
Martin


[solaris]$ diff -u metrics.c-orig metrics.c
--- metrics.c-orig      2006-04-18 15:37:25.000000000 +0200
+++ metrics.c   2006-04-18 15:39:16.000000000 +0200
@@ -164,7 +164,6 @@

 static struct g_metrics_struct metriclist;
 static kstat_ctl_t *kc=NULL;
-static int ncpus;

 int
 get_kstat_val(g_val_t *val, char *km_name, char *ks_name, char *name)
@@ -361,7 +360,6 @@
    struct timeval thistime;
    double timediff;
    int cpu_states[CPUSTATES];
-   unsigned int ncpus;
    static unsigned long cpu_old[CPUSTATES];
    static unsigned long cpu_now[CPUSTATES];
    static unsigned long cpu_diff[CPUSTATES];
@@ -412,7 +410,6 @@

 /*  END SECTION RIPPED BLATANTLY FROM TOP :) */

-   ncpus = metriclist.cpu_num.uint32;

    for (j = 0; j < CPUSTATES; j++)
       cpu_now[j] = 0;
@@ -620,7 +617,6 @@

    get_kstat_val(&metriclist.cpu_num, "unix","system_misc","ncpus");
    debug_msg("metric_init: Assigning cpu_num value (%d) to
ncpus.",(int)metriclist.cpu_num.uint32);
-   ncpus = metriclist.cpu_num.uint32;

    get_kstat_val(&metriclist.boottime,
"unix","system_misc","boot_time");
    get_kstat_val(&metriclist.cpu_speed,   
"cpu_info","cpu_info0","clock_MHz");
[solaris]$ 

--- [EMAIL PROTECTED] wrote:

> 
> Martin,
> 
> I tried to install with 3.0.3 with the gcc version 4.0 and the gnu
> make
> version 3.81.  I also tried to configure as  u told me but still the
> same error is creeping up.  Can u just summarize if possible how you
> did
> it in Solaris as I am first time user of Solaris.  It would be very
> helpful..
> 
> Thanks and Regards
> 
> ARAVINDH VARADHARAJU (WTO1 - E-Enabling)
> Project Engineer
> Tel       : +91- 80- 2852 0408 Extn.1053
> Mobile : +91- 99860 17606
> 
> "A Smile can take you MILES......! Keep Smiling and Have a Nice Day"
> 
> 
> -----Original Message-----
> From: Martin Knoblauch [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 18, 2006 4:27 PM
> To: Aravindh Varadharaju (WT01 - E-ENABLING);
> [EMAIL PROTECTED]
> Subject: Re: [Ganglia-general] Ganglia 3.0.2 on Solaris 9
> 
> 
> Hi Aravindh,
> 
>  a few questions:
> 
> - which gcc are you using (gcc --version)? I can build 3.0.2 and
> 3.0.3
> on Solaris 8 with gcc-3.3.1.
> - which make (gnu-make is recommended)?
> - On 64-bit platforms configure using:  CC="gcc -m64" ./configure
> 
>  Oh yes, please try 3.0.3. Released yesterday :-)
> 
> Martin
> 
> --- [EMAIL PROTECTED] wrote:
> 
> > Hi all,
> > 
> > I am getting the following error while installing Ganglia 3.0.2 on
> > Solaris 9 machine.  The error is as follows:
> > 
> > #PosixConnector#make
> > make  all-recursive
> > Making all in srclib
> > Making all in libmetrics
> > make  all-recursive
> > Making all in solaris
> > if /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H
> > -I.
> > -I. -I..   -I/tmp/rrdtool/lb/include
> > -I/tmp/rrdtool/lb/include/libart-2.0
> > -I/tmp/rrdtool/lb/include/freetype2
> > -I/tmp/rrdtool/lb/include/libpng  -I.. -I../lib -O3
> -D__EXTENSIONS__
> > -D_POSIX_C_SOURCE=199506L -DHAVE_STRERROR -MT metrics.lo -MD -MP
> -MF
> > ".deps/metrics.Tpo" -c -o metrics.lo metrics.c; \
> > then mv -f ".deps/metrics.Tpo" ".deps/metrics.Plo"; else rm -f
> > ".deps/metrics.Tpo"; exit 1; fi
> > mkdir .libs
> >  gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/tmp/rrdtool/lb/include
> > -I/tmp/rrdtool/lb/include/libart-2.0
> > -I/tmp/rrdtool/lb/include/freetype2
> > -I/tmp/rrdtool/lb/include/libpng -I.. -I../lib -O3 -D__EXTENSIONS__
> > -D_POSIX_C_SOURCE=199506L -DHAVE_STRERROR -MT metrics.lo -MD -MP
> -MF
> > .deps/metrics.Tpo -c metrics.c  -fPIC -DPIC -o .libs/metrics.o
> > metrics.c:167: error: static declaration of 'ncpus' follows
> > non-static
> > declaration
> > /usr/include/sys/cpuvar.h:351: error: previous declaration of
> 'ncpus'
> > was here
> > metrics.c: In function 'percentages':
> > metrics.c:306: warning: pointer targets in assignment differ in
> > signedness
> > *** Error code 1
> > make: Fatal error: Command failed for target `metrics.lo'
> > Current working directory
> > /opt/ganglia/ganglia-3.0.2/srclib/libmetrics/solaris
> > *** Error code 1
> > make: Fatal error: Command failed for target `all-recursive'
> > Current working directory
> > /opt/ganglia/ganglia-3.0.2/srclib/libmetrics
> > *** Error code 1
> > make: Fatal error: Command failed for target `all'
> > Current working directory
> > /opt/ganglia/ganglia-3.0.2/srclib/libmetrics
> > *** Error code 1
> > make: Fatal error: Command failed for target `all-recursive'
> > Current working directory /opt/ganglia/ganglia-3.0.2/srclib
> > *** Error code 1
> > make: Fatal error: Command failed for target `all-recursive'
> > Current working directory /opt/ganglia/ganglia-3.0.2
> > *** Error code 1
> > make: Fatal error: Command failed for target `all'
> > #PosixConnector#pwd
> > /opt/ganglia/ganglia-3.0.2
> > 
> > But the same thing is working fine on Linux....Any idea of how to
> > solve this or any hints that would take me out of this.......
> >
> > 
> > Thanks and Regards
> > 
> > ARAVINDH VARADHARAJU (WTO1 - E-Enabling)
> > Project Engineer
> > Tel       : +91- 80- 2852 0408 Extn.1053
> > Mobile : +91- 99860 17606
> > 
> > "A Smile can take you MILES......! Keep Smiling and Have a Nice
> Day"
> > 
> >
> 
> 
> ------------------------------------------------------
> Martin Knoblauch
> email: k n o b i AT knobisoft DOT de
> www:   http://www.knobisoft.de
> 
> 
> The information contained in this electronic message and any
> attachments to this message are intended for the exclusive use of the
> addressee(s) and may contain proprietary, confidential or privileged
> information. If you are not the intended recipient, you should not
> disseminate, distribute or copy this e-mail. Please notify the sender
> immediately and destroy all copies of this message and any
> attachments.
> 
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of
> viruses. The company accepts no liability for any damage caused by
> any virus transmitted by this email.
> 
> www.wipro.com
> 
> 


------------------------------------------------------
Martin Knoblauch
email: k n o b i AT knobisoft DOT de
www:   http://www.knobisoft.de

Reply via email to