Building static executables with Stack

To build static executables for command line or server applications from Haskell for Mac projects on both OS X and Linux (e.g., to deploy to hosts without a Haskell toolchain), please follow the instructions in this article.

Have more questions? Submit a request

7 Comments

  • 0
    Avatar
    Can Akçura

    Now getting excited . Does the article means that we can develop an executable in Haskell for mac that can run in Raspberry pi  without the need of haskell environment to be installed there too ? Can you please describe a little bit dependent system libraries that is needed for newbies?

  • 0
    Avatar
    Manuel Chakravarty

    I believe, the main problem in compiling for Raspberry Pi is that this involves cross-compiling (i.e., the compiler running on an Intel architecture needs to generate ARM code for the Raspberry Pi). As far as I know, Stack does not have build in support for cross-compilation. So, I am sorry, I don't think there is an easy way to get this working.

  • 0
    Avatar
    Eric Zoerner

    This is possible with Docker, but instead of the Haskell environment you would need to have Docker installed on the Pi (or whatever the target machine is).

  • 1
    Avatar
    Henner Hinze

    The link to the article is broken. Is it still relevant?

  • 0
    Avatar
    Manuel Chakravarty

    Henner, yes, sorry, my blog platform provider dropped the ball and now I will have to set up a new blog. I am planning to do that, but haven't found the time yet.

  • 0
    Avatar
    Alessandro Mecca

    @Manuel, over 9 months later the link is still broken.

  • 0
    Avatar
    Arsca

    Could you please fix the link.

Please sign in to leave a comment.
Powered by Zendesk