[GRASS5] Re: [GRASSLIST:1960] can't find statvfs.h [r.terraflow on MaxOSX]
Hamish
hamish_nospam at yahoo.com
Wed Dec 10 23:00:16 EST 2003
> > > When building grass57, I get the following errors from main.cc:
> > >
> > > c++ -c -I./IOStream/include -DUSER=\"chris\" -DNODATA_FIX
> > > -D_FILE_OFFSET_BITS=64 -DELEV_FLOAT main.cc -o
> > > OBJ.powerpc-apple-darwin7.0.0/FLOAT/main.o
> > > main.cc:48:25: sys/statvfs.h: No such file or directory
> >
> > r.terraflow fails to compile on MacOSX 10.3 due to a missing
> > sys/statvfs.h.
> >
> > It apparently supplies links to filesystem info.
> >
> > Anyone know what Fink package or otherwise might supply this?
>
> It's unlikely to be in a package; this is OS functionality.
>
> However, it's possible that someone might have written a stand-alone
> statvfs() wrapper, as was done for dlopen/dlsym/dlclose (the dlcompat
> package).
I'll have a poke around.. unfortunately fink doesn't have apt-file to
aid such searches.
> > Or can the dependancy be written out of
> > src.contrib/DUKE/r.terraflow/main.cc
> >
> > main.cc:#include <sys/statvfs.h>
> > main.cc: struct statvfs statbuf;
> > main.cc: statvfs(getenv(STREAM_TMPDIR), &statbuf);
>
> It could be made to use statfs() instead, i.e. change:
..
> Or the check could simply be removed; it's just checking available
> disk space.
>
> However, statfs() is listed as a BSD 4.4 function, so some systems may
> have statvfs() but not statfs(). I can't find any standardisation
> information for statvfs(), so it's possible that some systems may have
> neither.
OSX 10.3 only has /usr/include/sys/stat.h, ie neither.
> Ultimately, configure should check for both; r.terraflow should use
> whichever is available, or disable the check altogether if neither are
> available. Imperfect behaviour in the case of insufficient disk space
> is preferable to failing to compile altogether.
thanks,
Hamish
More information about the grass-dev
mailing list