<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "/bugzilla3/bugzilla.dtd">

<bugzilla version="3.0.4.1-2+lenny2"
          urlbase="http://bugzilla.ganglia.info/cgi-bin/bugzilla/"
          maintainer="THE MAINTAINER HAS NOT YET BEEN SET"
>

    <bug>
          <bug_id>215</bug_id>
          
          <creation_ts>2008-10-17 06:54</creation_ts>
          <short_desc>Missing c99 compile flag on Solaris</short_desc>
          <delta_ts>2009-11-30 03:42:13</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Ganglia Monitoring System</product>
          <component>build</component>
          <version>3.1.x</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Solaris</op_sys>
          <bug_status>ASSIGNED</bug_status>
          
          
          
          
          
          <priority>P2</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jesse Becker">hawson@gmail.com</reporter>
          <assigned_to name="Carlo Marcelo Arenas Belon">carenas@sajinet.com.pe</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who name="Jesse Becker">hawson@gmail.com</who>
            <bug_when>2008-10-17 06:54:48</bug_when>
            <thetext>Building ganglia on Solaris 10 requires an additional compile flag. 
Specifcally, &quot;-std=gnu99&quot; needs to be added to CFLAGS.

The full build error:

[beckerjes@kronos:~/ganglia/ganglia-3.1.1]$ gmake
gmake  all-recursive
gmake[1]: Entering directory `/home/beckerjes/ganglia/ganglia-3.1.1&apos;
Making all in lib
gmake[2]: Entering directory `/home/beckerjes/ganglia/ganglia-3.1.1/lib&apos;
if gcc -DHAVE_CONFIG_H -I. -I. -I..    -I.. -I. -I../include/
-D_LARGEFILE64_SOURCE   -I/usr/local/ganglia/include -I/usr/local/apr/include
-fno-strict-aliasing -Wall -D__EXTENSIONS__ -D_POSIX_C_SOURCE=200112L
-DHAVE_STRERROR -MT getopt1.o -MD -MP -MF &quot;.deps/getopt1.Tpo&quot; -c -o getopt1.o
getopt1.c; \
then mv -f &quot;.deps/getopt1.Tpo&quot; &quot;.deps/getopt1.Po&quot;; else rm -f
&quot;.deps/getopt1.Tpo&quot;; exit 1; fi
In file included from /usr/include/iso/ctype_iso.h:30,
                 from /usr/include/ctype.h:18,
                 from getopt.h:34,
                 from getopt1.c:25:
/usr/include/sys/feature_tests.h:336:2: #error &quot;Compiler or options invalid;
UNIX 03 and POSIX.1-2001 applications      require the use of c99&quot;
gmake[2]: *** [getopt1.o] Error 1
gmake[2]: Leaving directory `/home/beckerjes/ganglia/ganglia-3.1.1/lib&apos;
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/home/beckerjes/ganglia/ganglia-3.1.1&apos;
gmake: *** [all] Error 2


The ./configure command is uninteresting:  
LDFLAGS=-L/usr/local/rrdtool-1.2.19/lib
CFLAGS=-I/usr/local/rrdtool-1.2.19/include ./configure --enable-status
--with-libapr=/usr/local/apr --with-gmetad --prefix=/usr/local/ganglia</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Carlo Marcelo Arenas Belon">carenas@sajinet.com.pe</who>
            <bug_when>2008-10-18 20:44:02</bug_when>
            <thetext>the C99 flag is meant to be added by configure when evaluating the
AC_PROG_CC_STDC, but version 2.59 of autoconf that is used to bootstrap the
release package didn&apos;t, generating this problem.

re-bootstrapping the package with a newer version of the autotools (as provided
by Solaris 10) could be used to solve the problem.

as indicated before, adding :

  CFLAGS=&quot;-std=c99&quot;

is a usable workaround as well until the bootstrapping could be done for
releases with something less obsolete than CentOS 4</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Carlo Marcelo Arenas Belon">carenas@sajinet.com.pe</who>
            <bug_when>2009-04-12 01:52:54</bug_when>
            <thetext>to avoid a bug in Solaris headers while building libmetrics it would be better
to use instead :

  CFLAGS=&quot;-std=gnu99&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who name="Carlo Marcelo Arenas Belon">carenas@sajinet.com.pe</who>
            <bug_when>2009-11-30 03:42:13</bug_when>
            <thetext>ommitted revision 2125 for trunk</thetext>
          </long_desc>
      
    </bug>

</bugzilla>