Cannot build libraries via nix generic-builder
Closed this issue · 4 comments
dfordivam commented
While building libraries using nix, it errors out during linking due to WebGHC/ghc#7
I think it is due to -staticlib
flag.
This flag might be redundant as the libraries built via cabal
(without -staticlib) seem to work fine.
ElvishJerricco commented
Hm. I don't see -staticlib
being passed anywhere in generic-builder
. Is this a generic-builder
thing or a Cabal
thing?
dfordivam commented
I think is the one causing this.
generic-builder.nix
# --enable-static does not work on windows. This is a bug in GHC.
# --enable-static will pass -staticlib to ghc, which only works for mach-o and elf.
assert hostPlatform.isWindows -> enableStaticLibraries == false;
ElvishJerricco commented
That's just an assertion. It can't change what actually happens in the build.
ElvishJerricco commented
Oh but I see what you mean now. We need to make sure we're not passing --enable-static
to cabal