[Haskell-cafe] more on FFI build error

Galchin Vasili vigalchin at gmail.com
Sun Mar 23 22:44:18 EDT 2008


line #102 ...

   allocaBytes (#const sizeof(struct mq_attr)) $ \ p_attrs -> do

definition of struct mq_attr on Linux ...

  struct mq_attr
{
  long int mq_flags;    /* Message queue flags.  */
  long int mq_maxmsg;   /* Maximum number of messages.  */
  long int mq_msgsize;  /* Maximum message size.  */
  long int mq_curmsgs;  /* Number of messages currently queued.  */
  long int __pad[4];
};



build errors received ....

vigalchin at ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs build
Preprocessing library unix-2.2.0.0...
MQueue.hsc: In function 'main':

MQueue.hsc:102:0:
     error: invalid application of 'sizeof' to incomplete type 'struct
mq_attr'

MQueue.hsc:102:0:
     error: invalid application of 'sizeof' to incomplete type 'struct
mq_attr'

MQueue.hsc:102:0:
     error: invalid application of 'sizeof' to incomplete type 'struct
mq_attr'
compiling dist/build/System/Posix/MQueue_hsc_make.c failed
comma


???

Kind regards, vasili
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080323/159662a3/attachment.htm


More information about the Haskell-Cafe mailing list