[Haskell-cafe] Haskell on OpenWRT

Patrick Pelletier code at funwithsoftware.org
Tue Apr 12 18:35:03 UTC 2016

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 
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?



More information about the Haskell-Cafe mailing list