[Haskell-cafe] Compile one static Haskell binary for all x86_64 Linux distributions, is it possible?
Morten Olsen lysgaard
morten at lysgaard.no
Fri Feb 10 18:21:59 CET 2012
I've written a program that converts an XML file from a database into
another XML compatible with another database. Quite standard.
I'm using the mtl library for State and HaXml for XML parsing.
Is it possible to compile this program into a single static binary that
works on all Linux computers that run x86_64.
My development box is an Arch Linux x86_64 running GHC 7.0.3.
I tried with:
ghc --make -static -rtsopts=all -optl-pthread -optl-static Program.hs
When I copy the binary created over to my x86_64 Ubuntu 11.10 desktop
and run it I get:
Program: mkTextEncoding: invalid argument (Invalid argument)
I've googled around and found out this has to do with iconv, but I've
never compiled anything to run on another pc than the development
machine, so I've got no experience in fixing these kinds of problems.
Any help appreciated.
More information about the Haskell-Cafe