On Arch Linux, installed Haskell libraries are dynamically linked by default.
So to make anything compile in ghc, I have to use the -dynamic
flag, otherwise it doesn't even discover the libraries.
However, I would like to produce statically linked binaries that I can distribute to other systems.
Is there any way to produce a statically linked binary from dynamic/shared libraries with ghc?
I tried -optl-static
from this related post but that led to countless "undefined reference" errors.
cabal v2-build
default to static linking? – arrowdwindres
on Windows, but I don't know how you'd tellcabal
/the linker to find them there. – Ari Fordsham