I see, naturally it sets me on a recommended ancient version of cabal by default. I suppose I should change my nightly action to always target the latest cabal!
This fixed it indeed
for the full log and relevant code see the action: https://github.com/jappeace/mysql-pure/actions/runs/5847168821/job/15855691680
[19 of 19] Linking D:\\a\\mysql-pure\\mysql-pure\\dist-newstyle\\build\\x86_64-windows\\ghc-9.9.20230719\\mysql-pure-1.0.1\\t\\test\\build\\test\\test.exe
ld.lld: error: undefined symbol: ghczuwrapperZC0ZChashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014dZCDataziHashableziLowLevelZChashablezufnvzuhashzuoffset
>>> referenced by D:\\a\\mysql-pure\\mysql-pure\\dist-newstyle\\build\\x86_64-windows\\ghc-9.9.20230719\\mysql-pure-1.0.1\\t\\test\\build\\test\\test-tmp\Aeson.o:(Aeson_zdsunsafeInsert_info)
>>> referenced by D:\\a\\mysql-pure\\mysql-pure\\dist-newstyle\\build\\x86_64-windows\\ghc-9.9.20230719\\mysql-pure-1.0.1\\t\\test\\build\\test\\test-tmp\AesonBP.o:(AesonBP_zdsunsafeInsert_info)
>>> referenced by libHSscientific-0.3.7.0-9c26fdadaef9fd2f16ba6ee856a64e157441e137.a(Scientific.o):(scientificzm0zi3zi7zi0zm9c26fdadaef9fd2f16ba6ee856a64e157441e137_DataziScientific_zdwzdchashWithSalt_info)
>>> referenced 31 more times
ld.lld: error: undefined symbol: hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziLowLevel_hashInt_closure
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashableInt_closure)
ld.lld: error: undefined symbol: ghczuwrapperZC1ZChashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014dZCDataziHashableziLowLevelZChashablezufnvzuhash
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashable2ConstzuzdcliftHashWithSalt2_info)
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_hashPtr1_info)
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdwzdchashWithSalt_slow)
>>> referenced 1 more times
ld.lld: error: undefined symbol: hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziLowLevel_hashWord64_closure
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashableWord64_closure)
ld.lld: error: undefined symbol: hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziLowLevel_hashInt64_closure
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashableInt64_closure)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ghc-9.9.20230719.exe: `clang.exe' failed in phase `Linker'. (Exit code: 1)
for the full log and relevant code see the action: https://github.com/jappeace/mysql-pure/actions/runs/5847168821/job/15855691680
[19 of 19] Linking D:\\a\\mysql-pure\\mysql-pure\\dist-newstyle\\build\\x86_64-windows\\ghc-9.9.20230719\\mysql-pure-1.0.1\\t\\test\\build\\test\\test.exe
ld.lld: error: undefined symbol: ghczuwrapperZC0ZChashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014dZCDataziHashableziLowLevelZChashablezufnvzuhashzuoffset
>>> referenced by D:\\a\\mysql-pure\\mysql-pure\\dist-newstyle\\build\\x86_64-windows\\ghc-9.9.20230719\\mysql-pure-1.0.1\\t\\test\\build\\test\\test-tmp\Aeson.o:(Aeson_zdsunsafeInsert_info)
>>> referenced by D:\\a\\mysql-pure\\mysql-pure\\dist-newstyle\\build\\x86_64-windows\\ghc-9.9.20230719\\mysql-pure-1.0.1\\t\\test\\build\\test\\test-tmp\AesonBP.o:(AesonBP_zdsunsafeInsert_info)
>>> referenced by libHSscientific-0.3.7.0-9c26fdadaef9fd2f16ba6ee856a64e157441e137.a(Scientific.o):(scientificzm0zi3zi7zi0zm9c26fdadaef9fd2f16ba6ee856a64e157441e137_DataziScientific_zdwzdchashWithSalt_info)
>>> referenced 31 more times
ld.lld: error: undefined symbol: hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziLowLevel_hashInt_closure
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashableInt_closure)
ld.lld: error: undefined symbol: ghczuwrapperZC1ZChashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014dZCDataziHashableziLowLevelZChashablezufnvzuhash
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashable2ConstzuzdcliftHashWithSalt2_info)
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_hashPtr1_info)
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdwzdchashWithSalt_slow)
>>> referenced 1 more times
ld.lld: error: undefined symbol: hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziLowLevel_hashWord64_closure
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashableWord64_closure)
ld.lld: error: undefined symbol: hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziLowLevel_hashInt64_closure
>>> referenced by libHShashable-1.4.3.0-73561cc11921500ffd11ee07915504d9d369014d.a(Class.o):(hashablezm1zi4zi3zi0zm73561cc11921500ffd11ee07915504d9d369014d_DataziHashableziClass_zdfHashableInt64_closure)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ghc-9.9.20230719.exe: `clang.exe' failed in phase `Linker'. (Exit code: 1)
For someone else I made an example flake to create a cabal dev shell that build dependencies:
{
description = "My Haskell project";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
wasm.url = "tarball+https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/master/ghc-wasm-meta-master.tar.gz";
};
outputs = { self, nixpkgs, flake-compat, wasm }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in
{
inherit pkgs;
inherit wasm;
devShell.x86_64-linux = pkgs.mkShell
{
packages = [
(pkgs.writeShellScriptBin "ghc" "exec -a $0 ${wasm.packages.x86_64-linux.wasm32-wasi-ghc-9_6}/bin/wasm32-wasi-ghc $@")
(pkgs.writeShellScriptBin "ghc-pkg" "exec -a $0 ${wasm.packages.x86_64-linux.wasm32-wasi-ghc-9_6}/bin/wasm32-wasi-ghc-pkg $@")
wasm.packages.x86_64-linux.cabal
wasm.packages.x86_64-linux.wasm32-wasi-ghc-9_6
];
};
};
}
You may want to add this (or something similar), to your project as an example. It's not obvious at all.
Furthermore this paritucular setup also completely ignores the existing haskell infrastructure in nixpkgs (eg haskellPackages.shellFor
), it'd be nice if there was support for that as well.
Hi, for anyone using nixos 22.11 we added the patch to ghc 9.4.4 on nixos-22.11 here https://github.com/SupercedeTech/nixpkgs/tree/add-new-ghc945
it's under haskell.packages.ghc945
.
A proper 945 release would be prefered, this completly breaks our main application, but with the patch it works as expected.
Please enable this by default.
It's useful in combination with -Wunused-packages
which gives false negatives if a modules fails to compile, but later on modules use the unused-package.
If the errors are grouped the user is likely able to put those two together.
Hi, is this the same issue as spotted here: https://www.reddit.com/r/haskell/comments/nxz72g/debugging_ghc_hanging_on_compile/h1kk28s/
We've had this problem as well for a single module where we just disabled strictdata. Should we upgrade to ghc 9? We're on ghc 8.10.4 now.