
Can the network package be cross-compiled? I'm running into problems because the preprocessor cannot handle some of the directives that network uses when it's working in cross-compilation mode. Specifically, this part gives trouble: https://github.com/haskell/network/blob/master/Network/Socket/Types.hsc#L108...
#if __GLASGOW_HASKELL__ < 800 #let alignment t = "%lu", (unsigned long)offsetof(struct {char x__; t (y__); }, y__) #endif
instance Storable In6Addr where
sizeOf _ = #const sizeof(struct in6_addr)
alignment _ = #alignment struct in6_addr
In my first attempt, with ghc-7.10, this failed because the "let" directive is not supported when cross-compiling. Looking at the above code I thought I'd try ghc-8.0, but as it turns out the "alignment" directive is also not supported when cross-compiling... Any ideas? I'm compiling from x86_64 to arm-linux-gnueabihf BTW, to run my haskell program on the raspberry pi (3).