fjvallarino/monomer

How to create statically linked binaries?

Closed this issue · 4 comments

I tried this in my stack.yaml:

    extra-libraries:
    - GLEW
    - GLU
    - GL
    - SDL2
    ghc-options:
    - -fwarn-incomplete-patterns
    - -threaded
    - -static
    - -fPIC
    - -optl-static
    - -optl-pthread

However I run into problems, see https://pastebin.com/pTq6SeSz

Any suggestions?

When I first published the library, there was a mention to statically linking the required dependencies and mainly having issues with OpenGL.

Some time ago, there was also this issue related to this topic.

I have not tried it yet myself, but it does not seem possible to link everything statically.

Okay, I managed to get something done using AppImage. Will try to create some binaries for windows next.
I may write a blog post once I have everything together.

Awesome!

Could you share your blog post when you publish it? Thanks!