Re: storage size of 'test_array' isn't constant is Posix.hsc

Nathan Hüsken <[email protected]> Wed, 09 Jan 2013 14:20:44 +0100
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <[email protected]>
Seems to be something wrong with offsetof in anroid ndk.
A quick hack fix for me was replacing offsetof with __builtin_offsetof
in all occurences in utils/hsc2hs/CrossCodegen.hs

On 01/09/2013 12:55 AM, Nathan H=FCsken wrote:
> Hey,
> =

> when trying to build ghc for android, I get this error in
> libraries/haskeline/./System/Console/Haskeline/Backend/Posix.hsc
> =

> Posix.hsc: In function '_hsc2hs_test15':
> Posix.hsc:75:39: error: invalid application of 'sizeof' to incomplete
> type 'struct winsize'
> Posix.hsc: In function '_hsc2hs_test19':
> Posix.hsc:78:32: error: invalid use of undefined type 'struct winsize'
> Posix.hsc: In function '_hsc2hs_test21':
> Posix.hsc:79:32: error: invalid use of undefined type 'struct winsize'
> =

> looking at the android ndk header files, winsize is defined in termios.h.
> If I try to include termios.h (by removing the ifdefs around it) I get
> in libraries/haskeline/./System/Console/Haskeline/Backend/Posix.hsc
> =

> Posix.hsc: In function '_hsc2hs_test15':
> Posix.hsc:78:20: error: storage size of 'test_array' isn't constant
> Posix.hsc: In function '_hsc2hs_test17':
> Posix.hsc:79:20: error: storage size of 'test_array' isn't constant
> =

> looking at the file, I have to admit I have no Idea what is going on.
> =

> Thanks!
> Nathan
> =

> _______________________________________________
> Cvs-ghc mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/cvs-ghc
> =