Compiling librrd under Cygwin

Andrey Repin anrdaemon@yandex.ru
Sat Feb 20 10:11:30 GMT 2021


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;
      |                                ^~~~~~~~~
rrd_open.c:251:37: error: ‘MAP_PRIVATE’ undeclared (first use in this function)
  251 |         rrd_simple_file->mm_flags = MAP_PRIVATE;
      |                                     ^~~~~~~~~~~
rrd_open.c:265:41: error: ‘MAP_SHARED’ undeclared (first use in this function)
  265 |             rrd_simple_file->mm_flags = MAP_SHARED;
      |                                         ^~~~~~~~~~
rrd_open.c:266:41: error: ‘PROT_WRITE’ undeclared (first use in this function)
  266 |             rrd_simple_file->mm_prot |= PROT_WRITE;
      |                                         ^~~~~~~~~~
rrd_open.c:424:12: warning: implicit declaration of function ‘mmap’ [-Wimplicit-function-declaration]
  424 |     data = mmap(0, rrd_file->file_len,
      |            ^~~~
rrd_open.c:424:12: warning: nested extern declaration of ‘mmap’ [-Wnested-externs]
rrd_open.c:424:10: warning: assignment to ‘char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  424 |     data = mmap(0, rrd_file->file_len,
      |          ^
rrd_open.c:576:9: warning: implicit declaration of function ‘munmap’ [-Wimplicit-function-declaration]
  576 |         munmap(data, rrd_file->file_len);
      |         ^~~~~~
rrd_open.c:576:9: warning: nested extern declaration of ‘munmap’ [-Wnested-externs]
make[1]: *** [Makefile:1060: librrdupd_la-rrd_open.lo] Error 1
make[1]: Leaving directory '/c/arc/cygwin/software/librrd/rrdtool-1.7.2/src'
make: *** [Makefile:503: install-recursive] Error 1


Configure and make logs attached, as well as list of necessary -devel
packages.
I would appreciate any help with this issue.


-- 
With best regards,
Andrey Repin
Saturday, February 20, 2021 11:59:12

Sorry for my terrible english...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logs.tar.xz
Type: application/octet-stream
Size: 19696 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20210220/2ba42bda/attachment-0001.obj>


More information about the Cygwin mailing list