raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: raindrops@librelist.com
Subject: Re: Build failed on FreeBSD
Date: Fri, 24 Jun 2011 01:08:17 -0700
Message-ID: <20110624080817.GA3815@dcvr.yhbt.net> (raw)
In-Reply-To: <4E0348F0.6000100@mrtech.ru>

Troex Nevelin <list@mrtech.ru> 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 <sys/mman.h>" 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


  reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-13 22:56 Troex Nevelin
2011-04-14  0:30 ` Eric Wong
2011-06-23 14:08   ` Troex Nevelin
2011-06-24  8:08     ` Eric Wong [this message]
2011-06-25  0:19       ` Eric Wong
2011-06-27 10:00         ` Troex Nevelin

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/raindrops/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110624080817.GA3815@dcvr.yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=raindrops@librelist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox