[Haskell-cafe] Haskell on OpenWRT

Tomas Carnecky tomas.carnecky at gmail.com
Tue Apr 12 18:54:45 UTC 2016


ncurses is the only library.

Not sure how I managed to configure the crosscompiler to produce static
binaries, maybe it was an option which I had to pass to GHC. In any case,
here's a docker image which includes instructions how I build the cross
compiler: https://github.com/wereHamster/onion-omega/tree/master/xt, and
here's a docker image which builds on top of that to compile a
cross-compiling GHC:
https://github.com/wereHamster/onion-omega/tree/master/ghc.


On Tue, Apr 12, 2016 at 8:35 PM Patrick Pelletier <code at funwithsoftware.org>
wrote:

> On 4/10/16 1:03 PM, Tomas Carnecky wrote:
> > crosstools-ng can be configured so that the compiler always produces a
> > static build (run ct-ng menuconfig, and look through the options. The
> > UI should be familiar if you've ever used the Linux kernel menuconfig
> > facility).
>
> I decided to try your approach, but I'm running into a few problems.
>
> First, where in the UI is the option to make the compiler produce a
> static build?  Under "Toolchain Options", there is an option to link the
> toolchain itself statically, but that's not the same thing. I've gone
> through all the menus, and can't find anything else about static linking.
>
> Second, what libraries did you have to build for the target before you
> could get ghc to compile?  I've been trying to build the ghc
> cross-compiler, but ghc seems to insist on having ncurses on the
> target.  So now I've gone down the rabbit hole of building ncurses for
> the target.  Currently the build of ncurses is failing with:
>
> x86_64-unknown-linux-musl-gcc -DHAVE_CONFIG_H -I. -I../include -DNDEBUG
> -O2 --param max-inline-insns-single=1200 -c ../ncurses/lib_gen.c -o
> ../objects/lib_gen.o
> In file included from ./curses.priv.h:325:0,
>                   from ../ncurses/lib_gen.c:19:
> _20591.c:843:15: error: expected ')' before 'int'
> ../include/curses.h:1631:56: note: in definition of macro 'mouse_trafo'
>   #define mouse_trafo(y,x,to_screen) wmouse_trafo(stdscr,y,x,to_screen)
>                                                          ^
> make[1]: *** [../objects/lib_gen.o] Error 1
> make[1]: Leaving directory `/home/ppelletier/src/ncurses-6.0/ncurses'
> make: *** [all] Error 2
>
> I'm sure I can figure it out, but I'm worried about how many more
> libraries might be needed in addition to ncurses.  Did you just have to
> slog through all of this, or am I doing something wrong?
>
> Thanks,
>
> --Patrick
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20160412/1fd93345/attachment.html>


More information about the Haskell-Cafe mailing list