migamake / json-autotype

Automatic Haskell type inference from JSON input
149 stars 23 forks source link

json-autotype-3.0.0 build is broken because of hard-coded -static flag for ld #23

Closed peti closed 5 years ago

peti commented 5 years ago

Hard-coding non-essential flags like -static in the Cabal file is a really bad idea. The current 3.0.0 release does not compile on any of my machines because of that issue. Note that many distributions don't ship any static libraries (like openSUSE, NixOS, ...) and then attempts to compile the package look like so:

Linking /tmp/json-autotype-3.0.0/dist-newstyle/build/x86_64-linux/ghc-8.6.2/json-autotype-3.0.0/x/json-autotype/build/json-autotype/json-autotype ...
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -lm
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -lrt
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -lutil
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -ldl
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -lgmp
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -lm
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -lrt
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -ldl
/nix/store/n4hb93w6j076xcjw5pm09rdmc09s075b-binutils-2.30/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
mgajda commented 5 years ago

It is commented out for json-autotype version 3.0.1 release.