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

D. Walsh info at daleenterprise.com
Sat Sep 1 08:50:33 CEST 2007


-----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.

>
> 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 */".

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.

>
> I couldn't get it to build properly until I put the #includes in
> rrd_open.c directly

I didn't have to do this but the trunk might contain a faulty update.

I also build as a framework to resolve linking issues because of the  
runtime paths and the "-twolevel_namespace" issues, it should really  
be using the non-pic objects and "-flat_namespace -undefined  
dynamic_lookup" as well as "-bind_at_load" linker flags due to the  
compound library dependancies but not essential if you're never going  
to link anything (third party code) against the libraries.

> 3. fdatasync is not defined

This is a recent CVS introduction and was more than likely just an  
omission mistake, you can add it to the header file and it will be  
happy.

>
>
>
> 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