Closed
Description
When I try x-compiling my project for mingwW64
, Nix starts building ghc 9.0.1 from source. It eventually fails with
"/nix/store/zkqns63kcaf2a29nlargv1q40s1c5ank-ghc-8.8.4/bin/ghc" -static -O -H64m -Wall -package-db libraries/bootstrapping.conf -this-unit-id ghc-heap-9.0.1 -hide-all-packages -i -ilibraries/ghc-heap/. -ilibraries/ghc-heap/dist-boot/build -Ilibraries/ghc-heap/dist-boot/build -ilibraries/ghc-heap/dist-boot/build/./autogen -Ilibraries/ghc-heap/dist-boot/build/./autogen -Ilibraries/ghc-heap/. -optP-include -optPlibraries/ghc-heap/dist-boot/build/./autogen/cabal_macros.h -package-id base-4.13.0.0 -package-id ghc-prim-0.5.3 -package-id rts -Wall -XHaskell2010 -XNoImplicitPrelude -no-user-package-db -rtsopts -fno-warn-deprecated-flags -c libraries/ghc-heap/cbits/HeapPrim.cmm -o libraries/ghc-heap/dist-boot/build/cbits/HeapPrim.o
In file included from compiler/cbits/genSym.c:1:0: error:
includes/Rts.h:29:10: error:
fatal error: windows.h: No such file or directory
29 | #include <windows.h>
| ^~~~~~~~~~~
|
29 | #include <windows.h>
| ^
compilation terminated.
`cc' failed in phase `C Compiler'. (Exit code: 1)
In file included from compiler/cbits/cutils.c:6:0: error:
includes/Rts.h:29:10: error:
fatal error: windows.h: No such file or directory
29 | #include <windows.h>
| ^~~~~~~~~~~
|
29 | #include <windows.h>
| ^
compilation terminated.
`cc' failed in phase `C Compiler'. (Exit code: 1)
In file included from compiler/cbits/keepCAFsForGHCi.c:1:0: error:
includes/Rts.h:29:10: error:
fatal error: windows.h: No such file or directory
29 | #include <windows.h>
| ^~~~~~~~~~~
|
29 | #include <windows.h>
| ^
compilation terminated.
`cc' failed in phase `C Compiler'. (Exit code: 1)
I x-compiled with:
nix-build -A projectCross.mingwW64.hsPkgs.my-project.components.exes.demo
Seems due to https://gitlab.haskell.org/ghc/ghc/-/issues/18143 / https://gitlab.haskell.org/ghc/ghc/-/issues/17146 ?
Using 9.0.1 natively works fine, however.
Metadata
Metadata
Assignees
Labels
No labels