[Haskell-cafe] Re: more on FFI build error

Aaron Denney wnoise at ofb.net
Mon Mar 24 02:29:26 EDT 2008


On 2008-03-24, Galchin Vasili <vigalchin at gmail.com> wrote:
> 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

This looks as if only a "struct mq_attr;" definition is found, which
lets opaque types be defined in C -- only pointers to it may be
allocated by the compiler, not the actual struct, nor can sizeof be
taken.  Does your system have both /usr/include/mqueue.h and
/usr/include/bits/mqueue.h

-- 
Aaron Denney
-><-



More information about the Haskell-Cafe mailing list