Skip to content

Instantly share code, notes, and snippets.

@aespinosa
Created October 30, 2016 13:18
Show Gist options
  • Save aespinosa/806239d19c4b3be7259e05c5e82c9075 to your computer and use it in GitHub Desktop.
Save aespinosa/806239d19c4b3be7259e05c5e82c9075 to your computer and use it in GitHub Desktop.
ghc -O -static -threaded -optl-static app.hs
with import <nixpkgs> {};
stdenv.mkDerivation {
name = "cpu-app";
enableSharedExecutables = false;
buildInputs = [
(haskellPackages.ghcWithPackages (p: [p.yesod ]))
];
}
[nix-shell:~]$
Linking app ...
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lyaml
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lz
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lrt
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lutil
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -ldl
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lgmp
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lm
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lrt
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -ldl
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lpthread
/nix/store/d61gfhj50bfrrlvp4jzdxmsap3izsvyc-binutils-2.27/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
`cc' failed in phase `Linker'. (Exit code: 1)
[nix-shell:~]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment