Fix static linking
huffyhenry opened this issue · 4 comments
Currently, running with ld-options: static
yields errors related to libblas (?). Check on other computers.
I can confirm that I get errors, they seem related to lapack. I think you need to specifically install statically linked libraries.
I went on a package installation spree, but didn't manage to fix this.
Would you mind investigating which Ubuntu package contains the required libraries? I'd like to ship a new version very soon and it should be statically linked.
A couple of notes on this. I believe we need to provide these flags:
ghc-options: -O -fPIC -static
ld-options: -static -pthread
In particular -static
on both ghc and ld-options and also -pthread
on ld-options.
If you read the first reply to this issue: NixOS/nixpkgs#6855 you see that the problem may be that Haskell is somehow building the haskell modules in a dynamic fashion because it doesn't know how to do so in a static fashion, but then attempting to link those compiled haskell modules with the statically linked system libraries.
No plans to distribute binaries anymore. Closing.