On Mon, 21 Feb 2011 00:29:15 +0900
Tadeusz Bochan <tad.bochan / bnpparibas.com> wrote:

> More info ...
> 
> I commented the offending code (see below) and the compile worked.
> But now when I run the command line utility
> MQUEUE=/testq.acore posix-mq-rb create
> the queue is created, but the program crashes with
> 
> /usr/lib/dld.sl: Unresolved symbol: MQ_IO_NIL_P (code) from
> .../posix_mq_ext.sl
> 
> nm posix_mq_ext.sl | grep MQ_IO_NIL  # gives =>
> MQ_IO_NIL_P   |      |undef |code |
> MQ_IO_NIL_P   | 12976|uext  |stub |
> Which tells me that the symbol exists.
> So I haven't a clue as to what is going on.
> Any ideas ??
> 
> Tad
> 
> 
> static VALUE _close(VALUE self)
> {
>         struct posix_mq *mq = get(self, 1);
> 
> /* The if statement doesn't compile - error 1558: The ! operator
> takes a scalar
>         if ( ! MQ_IO_CLOSE(mq) ) {        /* line 712 */
>                 if (mq_close(mq->des) == -1)
>                         rb_sys_fail("mq_close");
>         }
> */
>         mq->des = MQD_INVALID;
> 
>         return Qnil;
> }
> 

The MQ_* capitalized things are indeed macros, and it looks like
they are screwed up on your system. Can you grep for MQ_IO_CLOSE and
MQ_IO_NIL_P in system header files (and maybe compare that to Linux's)?

-- 
  WBR, Peter Zotov