[rrd-developers] make 1.3 trunk build on OS/X

Ian Holsman lists at holsman.net
Mon Sep 3 02:18:26 CEST 2007


D. Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On Sep 1, 2007, at 01:07:56, Ian Holsman wrote:
>
>> Hi Tobi + friends,
>>
>> I just pulled the latest trunk onto my macbook pro (Darwin Aeaea.local
>> 8.10.3 Darwin Kernel Version 8.10.3: Wed Jun 27 23:29:36 PDT 2007;
>> root:xnu-792.23.3~1/RELEASE_I386 i386 i386)
>>
>>
>> and I ran into several issues with the code.
>>
>> 1. compile issue in rrd_getopt
>>
>> Index: src/rrd_getopt.c
>> ===================================================================
>> --- src/rrd_getopt.c    (revision 1194)
>> +++ src/rrd_getopt.c    (working copy)
>> @@ -190,7 +190,7 @@
>>     of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
>>     `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
>>
>> -static const enum {
>> +static /*const*/ enum {
>>      REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
>>  } ordering;
>
> This should not be required.
without it this is what happens
Aeaea:/src/rrd/trunk/src ianholsman$ make rrd_getopt.o
gcc -DHAVE_CONFIG_H -I. -I..  -DRRD_DEFAULT_FONT=\""DejaVu Sans 
Mono,Bitstream Vera Sans Mono,monospace,Courier"\" 
-DNUMVERS=1.299907080300 -D_THREAD_SAFE -INONE/include/cairo 
-I/usr/local/include/cairo -I/usr/local/include/libpng12 
-I/usr/local/include/freetype2 -I/usr/local/include   
-I/usr/local/include/pango-1.0 -I/usr/local/include/cairo 
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include 
-I/usr/local/include/freetype2 -I/usr/local/include 
-I/usr/local/include/libpng12    -g -O2 -D_GNU_SOURCE 
-fno-strict-aliasing -Wall -std=c99 -pedantic -Wundef -Wshadow 
-Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations 
-Wnested-externs -Winline -Wold-style-definition -W  -fno-common -DPIC 
-MT rrd_getopt.o -MD -MP -MF .deps/rrd_getopt.Tpo -c -o rrd_getopt.o 
rrd_getopt.c

...
rrd_getopt.c:363: warning: old-style function definition
rrd_getopt.c:377: error: assignment of read-only variable 'ordering'
rrd_getopt.c:380: error: assignment of read-only variable 'ordering'
rrd_getopt.c:383: error: assignment of read-only variable 'ordering'
rrd_getopt.c:385: error: assignment of read-only variable 'ordering'
...
make: *** [rrd_getopt.o] Error 1

so i'm not sure
>
>>
>> 2. the madvise call wasn't being properly detected. it should have put
>> #undef _POSIX_C_SOURCE
>> in rrd_config.h, as madvise and mincore are only defined if the
>> following is true
>>
>> #ifndef _POSIX_C_SOURCE
>> int     madvise(void *, size_t, int);
>> int     mincore(const void *, size_t, char *);
>> int     minherit(void *, size_t, int);
>> #endif
>
> I suspect that a dependancy you already configured/installed defines 
> POSIX_C_SOURCE cause in an un-altered build my header has "/* #undef 
> _POSIX_C_SOURCE */".

maybe, the machine I'm building on is pretty clean (I've only had it for 
2 weeks, so haven't had much of a chance to corrupt it yet). The only 
things i've installed on it is the prereqs for rrdtool, and updated gnu  
lib/auto* tools to stop MakeMakefile complaining.
this is a straight ./MakeMakefile;./configure;make .. nothing too fancy.

I don't have /* undef _POSIX_C_SOURCE */ in my rrd_config.h.in file, or 
rrd_config.h. in fact doing a grep of all the prereqs/source I can't 
find POSIX_C_SOURCE defined in any of them. So I'm a bit confused on 
this point.
>
> I do a few other things in the environment to get the optimum build 
> and build everything in 10.4.0 as universal (dual architecture) with a 
> little "-D" magic to compensate for the endian and a couple of other 
> defined value differences.

please share?
>
>
>
>>
>>
>>
>> regards
>> Ian
>
> - -- Dale
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (Darwin)
>
> iD8DBQFG2Qu5gKKwRgpESgMRAvY7AJsEOd2PA0PTqrhuDaqEkVxh2jFv6ACeMK1R
> zLYFtiRfSmtEc9U1bidB8uk=
> =usJD
> -----END PGP SIGNATURE-----
>



More information about the rrd-developers mailing list