>>> On 3/29/2008 at 11:31 PM, in message <[EMAIL PROTECTED]>, Carlo
Marcelo Arenas Belon <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 29, 2008 at 05:29:15PM -0600, Brad Nicholes wrote:
>> >>> On 3/29/2008 at 2:43 AM, in message <[EMAIL PROTECTED]>, Carlo
>> Marcelo Arenas Belon <[EMAIL PROTECTED]> wrote:
>> > 
>> > g_val_t is a public interface of libganglia and libganglia is used by the
>> > modules so it should be IMHO moved into "ganglia.h" or whathever the public
>> > interface for libganglia is.
>> > 
>> 
>> Right, but that isn't the problem.  If I move g_val_t into ganglia.h then I 
> run into the same apr.h problems that we had before.  Libganglia depends on 
> apr so therefore ganglia.h includes apr.h.
> 
> ganglia.h including apr.h is also a problem (as shown by gstat failing to
> build because of APR) :
> 
> make[3]: Entering directory `gmond/gstat'
> gcc -DHAVE_CONFIG_H -I. -I../..    -D_LARGEFILE64_SOURCE -I../../lib
> -I../../include  -g -O2 -fno-strict-aliasing -Wall -D_REENTRANT -MT gstat.o
> -MD -MP -MF .deps/gstat.Tpo -c -o gstat.o gstat.c
> In file included from ../../lib/ganglia_priv.h:15,
>                  from gstat.c:11:
> ../../include/ganglia.h:7:23: error: apr_pools.h: No such file or directory
> In file included from ../../lib/ganglia_priv.h:15,
>                  from gstat.c:11:
> ../../include/ganglia.h:36: error: expected specifier-qualifier-list before
> 'apr_pool_t'
> make[3]: *** [gstat.o] Error 1
> 
> before the new headers, the public interface for libganglia didn't need any
> apr headers and so now APR_INCLUDES had to be propagated everywhere in the
> ganglia source even if not needed.
> 
>   gstat (r1155)
>   gmetric (r1156)
>   gmetad (r1157)
> 
> IMHO, even if libganglia uses apr internally having it also to require apr
> headers might not be a good idea.
> 
> Carlo

I'll see what I can figure out.  Although I'm not sure that this can be helped. 
 Even before the change, gmetric required APR since one of the first things it 
does is create a Ganglia_pool (typedef struct apr_pool_t * Ganglia_pool).  But 
gstat and gmetad didn't have the same requirement.  I am thinking that in order 
to break the dependancy for gstat and gmetad, we are going to have to break 
down the public header files into more than just three.

Brad


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to