Compiling librrd under Cygwin
Marco Atzeri
marco.atzeri@gmail.com
Sat Feb 20 11:35:08 GMT 2021
On 20.02.2021 11:11, Andrey Repin wrote:
> Greetings, All!
>
> I'm trying to match my Cygwin PHP install with native one, and one of the
> steps is to build rrd extension. There's no librrd shipped with Cygwin, so I
> have to build that first.
>
> I've successfully configured it after installing of some -devel packages with
> `./configure --prefix=`, but compiling fails with
>
> rrd_open.c: In function ‘rrd_open’:
> rrd_open.c:166:22: error: ‘MAP_FAILED’ undeclared (first use in this function)
> 166 | char *data = MAP_FAILED;
> | ^~~~~~~~~~
> rrd_open.c:166:22: note: each undeclared identifier is reported only once for each function it appears in
> rrd_open.c:239:32: error: ‘PROT_READ’ undeclared (first use in this function)
> 239 | rrd_simple_file->mm_prot = PROT_READ;
> | ^~~~~~~~~
>
> Configure and make logs attached, as well as list of necessary -devel
> packages.
> I would appreciate any help with this issue.
>
the configure.ac has a test for sys/mman.h
but it is not using in for Cygwin, no idea why
It should be present in all enviroments but it seems they
think ut is only need in some
https://man7.org/linux/man-pages/man2/mmap.2.html
HAVE_SYS_MMAN_H should be defined for a proper include, and
with a proper define, it pass that obstacle.
$ grep MMAN src/rrd_config.h
#define HAVE_SYS_MMAN_H 1
there are later some missing libraries during linking
More information about the Cygwin
mailing list