delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/02/20/08:17:42

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 9E9563858D29
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=cs.umass.edu
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=moss AT cs DOT umass DOT edu
Subject: Re: Compiling librrd under Cygwin
To: cygwin AT cygwin DOT com, Andrey Repin <anrdaemon AT yandex DOT ru>
References: <1157566299 DOT 20210220131130 AT yandex DOT ru>
From: Eliot Moss <moss AT cs DOT umass DOT edu>
Message-ID: <1157d50d-e8c7-5eb8-4b17-5ece79fbc9a1@cs.umass.edu>
Date: Sat, 20 Feb 2021 08:17:36 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
Thunderbird/68.12.1
MIME-Version: 1.0
In-Reply-To: <1157566299.20210220131130@yandex.ru>
X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
NICE_REPLY_A, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS,
TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: moss AT cs DOT umass DOT edu
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 11KDHfVg024031

On 2/20/2021 5:11 AM, 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;
>        |                                ^~~~~~~~~
> 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

I didn't check every one of them, but these seem to live in /usr/include/sys/mman.h
in my installation.

Regards - Eliot Moss
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019