From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: Re: Build failed on FreeBSD Date: Fri, 24 Jun 2011 01:08:17 -0700 Message-ID: <20110624080817.GA3815@dcvr.yhbt.net> References: <4DA62A21.6020004@mrtech.ru> <4DA62A21.6020004@mrtech.ru> <20110414003056.GA7208@dcvr.yhbt.net> <4E0348F0.6000100@mrtech.ru> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1308902926 29455 80.91.229.12 (24 Jun 2011 08:08:46 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Jun 2011 08:08:46 +0000 (UTC) To: raindrops@librelist.com Original-X-From: raindrops@librelist.com Fri Jun 24 10:08:42 2011 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: raindrops@librelist.com Xref: news.gmane.org gmane.comp.lang.ruby.raindrops.general:35 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qa1RO-0006I6-Aq for gclrrg-raindrops@m.gmane.org; Fri, 24 Jun 2011 10:08:40 +0200 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id D34F321C9F2 for ; Fri, 24 Jun 2011 08:08:37 +0000 (UTC) Troex Nevelin wrote: > On 14/04/2011 03:30, Eric Wong wrote: > > Does replacing MAP_ANON with MAP_ANONYMOUS fix it? > > Replacing MAP_ANON gives the same error but about MAP_ANONYMOUS. I'm not > familiar with C Don't worry, diagnosing problems with build software contributed largely to me learning C back in the day. > Maybe I'm missing some needed libs? You seem to have the needed libraries since mmap() and munmap() are detected correctly. Function checks (like the above) are based on linking the library. Headers are another issue... > -- > [root@billing-local > /usr/local/lib/ruby/gems/1.8/gems/raindrops-0.6.1/ext/raindrops]# make > cc -I. -I. -I/usr/local/lib/ruby/1.8/i386-freebsd8 -I. -DHAVE_MMAP > -DHAVE_MUNMAP -DHAVE_GETPAGESIZE -DHAVE_GCC_ATOMIC_BUILTINS > -D_GNU_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=600 -fPIC -O2 -pipe > -fno-strict-aliasing -fPIC -march=i486 -c raindrops.c > raindrops.c: In function 'init': > raindrops.c:105: error: 'MAP_ANONYMOUS' undeclared (first use in this > function) Can you show me the output of the following two commands? ruby -rmkmf -e 'have_macro("MAP_ANONYMOUS", "sys/mman.h")' ruby -rmkmf -e 'have_macro("MAP_ANON", "sys/mman.h")' If at least one of them succeeds, then it could be somehow the #include paths get mangled at some point afterwards. Then can you show me your sys/mman.h file? It's probably in /usr/include/sys/mman.h, but maybe you have multiple copies of "mman.h". Try searching your system for multiple copies and see if there are differences... Another thing you can try is changing the order of the #includes at the top of ext/raindrops/raindrops.c, maybe try moving the "#include " line to the top of the file. #includes for standard header files are usually order-agnostic, but maybe there's a special case... -- Eric Wong