-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHCup selected combination of cabal / GHC versions does not work on windows #966
Comments
https://gitlab.haskell.org/ghc/ghc/-/issues/21990#note_447802 We will have to backport haskell/cabal#8071 to 3.6 it seems. In the meantime, you can update to |
@lmbollen can you try this:
and then try to build your project again? |
@hasufell
I do still get the same warning and the build still fails unfortunately. |
That can't be. It has to show |
Well, it doesn't.... PS path> ghcup list | findstr "IS"
[ Warn ] New cabal version available. If you want to install this latest version, run 'ghcup install cabal 3.10.2.0'
[ Info ] verifying digest of: gs.exe
IS ghc 9.4.8 recommended,base-4.17.2.1 hls-powered
IS cabal 3.6.2.0-p1 recommended
IS hls 2.5.0.0 latest,recommended
IS stack 2.13.1 latest,recommended
IS ghcup 0.1.20.0 latest,recommended
PS path> ghcup rm cabal 3.6.2.0-p1
[ Warn ] New cabal version available. If you want to install this latest version, run 'ghcup install cabal 3.10.2.0'
[ Info ] verifying digest of: gs.exe
PS path> ghcup list | findstr "IS"
[ Info ] verifying digest of: gs.exe
IS ghc 9.4.8 recommended,base-4.17.2.1 hls-powered
IS hls 2.5.0.0 latest,recommended
IS stack 2.13.1 latest,recommended
IS ghcup 0.1.20.0 latest,recommended
PS path> ghcup -s https://raw.githubusercontent.com/haskell/ghcup-metadata/cabal-3.6.2.0-p2/ghcup-0.0.8.yaml install cabal recommended
[ Info ] verifying digest of: gs.exe
[ Info ] downloading: https://downloads.haskell.org/~ghcup/unofficial-bindists/cabal/3.6.2.1/cabal-install-3.6.2.1-x86_64-mingw64.zip as file C:\ghcup\tmp\ghcup-9f8013f960aa23be\cabal-install-3.6.2.1-x86_64-mingw64.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14.2M 100 14.2M 0 0 52.1M 0 --:--:-- --:--:-- --:--:-- 52.5M
[ Info ] verifying digest of: cabal-install-3.6.2.1-x86_64-mingw64.zip
[ Info ] Unpacking: cabal-install-3.6.2.1-x86_64-mingw64.zip to C:\ghcup\tmp\ghcup-b4d70b3ff48e9cef
[ Info ] Installing cabal
[ Info ] Cabal installation successful
[ Info ] This is a distributor release to fix https://github.com/haskell/security-advisories/blob/main/advisories/hackage/cabal-install/HSEC-2023-0015.md
[ ... ] The applied downstream patches can be viewed here: https://github.com/hasufell/cabal/tree/cabal-install-v3.6.2.1
[ ... ] Upstream PR: https://github.com/haskell/cabal/issues/9451
[ ... ] You can alternatively update to 3.10.2.0.
[ ... ]
PS path> ghcup list | findstr "IS"
[ Warn ] New cabal version available. If you want to install this latest version, run 'ghcup install cabal 3.10.2.0'
[ Info ] verifying digest of: gs.exe
IS ghc 9.4.8 recommended,base-4.17.2.1 hls-powered
IS cabal 3.6.2.0-p1 recommended
IS hls 2.5.0.0 latest,recommended
IS stack 2.13.1 latest,recommended
IS ghcup 0.1.20.0 latest,recommended Let me know if I'm missing something :) |
Please run |
Now I do get p2, but I still get the warning and failed build: PS path> ghcup list | findstr "IS"
[ Warn ] New cabal version available. If you want to install this latest version, run 'ghcup install cabal 3.10.2.0'
[ Info ] verifying digest of: gs.exe
IS ghc 9.4.8 recommended,base-4.17.2.1 hls-powered
IS cabal 3.6.2.0-p2 recommended
IS hls 2.5.0.0 latest,recommended
IS stack 2.13.1 latest,recommended
IS ghcup 0.1.20.0 latest,recommended
PS path> cabal clean
PS path> cabal build
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.6.2.0 supports
'ghc' version < 9.4): C:\ghcup\bin\ghc.exe is version 9.4.8
Resolving dependencies...
Build profile: -w ghc-9.4.8 -O1
In order, the following will be built (use -v for more details):
- clash-prelude-1.8.1 (lib) (requires build)
- parsers-0.12.11 (lib) (requires build)
- my-clash-project-0.1 (lib) (first run)
- trifecta-2.1.3 (lib) (requires build)
- my-clash-project-0.1 (test:test-library) (first run)
- my-clash-project-0.1 (test:doctests) (first run)
- clash-lib-1.8.1 (lib) (requires build)
- clash-ghc-1.8.1 (lib) (requires build)
- my-clash-project-0.1 (exe:clashi) (first run)
- my-clash-project-0.1 (exe:clash) (first run)
Starting parsers-0.12.11 (lib)
Starting clash-prelude-1.8.1 (lib)
Building parsers-0.12.11 (lib)
Building clash-prelude-1.8.1 (lib)
Failed to build parsers-0.12.11.
Build log (
C:\cabal\logs\ghc-9.4.8\parsers-0.12.11-646c18156e7e431ca0bcddc5dc3e70d2e4e5f445.log
):
Preprocessing library for parsers-0.12.11..
Building library for parsers-0.12.11..
[1 of 8] Compiling Text.Parser.Combinators ( src\Text\Parser\Combinators.hs, dist\build\Text\Parser\Combinators.o )
[2 of 8] Compiling Text.Parser.Char ( src\Text\Parser\Char.hs, dist\build\Text\Parser\Char.o )
ghc-9.4.8.exe: C:\cabal\store\ghc-9.4.8\hashable-1.4.3.0-6aa150cfd98536d070af2d7c96a3cc42751570fb\lib\libHShashable-1.4.3.0-6aa150cfd98536d070af2d7c96a3cc42751570fb.a(#7:LowLevel.o): Not a x86_64 PE+ file.
ghc-9.4.8.exe: Unknown COFF 4 type in getHeaderInfo.
<no location info>: error:
loadArchive "C:\\cabal\\store\\ghc-9.4.8\\hashable-1.4.3.0-6aa150cfd98536d070af2d7c96a3cc42751570fb\\lib\\libHShashable-1.4.3.0-6aa150cfd98536d070af2d7c96a3cc42751570fb.a": failed
[3 of 8] Compiling Text.Parser.Expression ( src\Text\Parser\Expression.hs, dist\build\Text\Parser\Expression.o )
[4 of 8] Compiling Text.Parser.LookAhead ( src\Text\Parser\LookAhead.hs, dist\build\Text\Parser\LookAhead.o )
[5 of 8] Compiling Text.Parser.Permutation ( src\Text\Parser\Permutation.hs, dist\build\Text\Parser\Permutation.o )
[6 of 8] Compiling Text.Parser.Token.Highlight ( src\Text\Parser\Token\Highlight.hs, dist\build\Text\Parser\Token\Highlight.o )
cabal-3.6.2.0-p2.exe: Failed to build clash-prelude-1.8.1 (which is required
by test:test-library from my-clash-project-0.1, test:doctests from
my-clash-project-0.1 and others). The build process terminated with exit code
11
Failed to build parsers-0.12.11 (which is required by exe:clashi from
my-clash-project-0.1 and exe:clash from my-clash-project-0.1). See the build
log above for details. |
You may need to run |
The problem is, I can't reproduce it. I get different errors, possibly due to corrupted toolchain or environment. |
It was indeed the corrupted store. HLS also works with this configuration. |
Thanks for testing |
Oh I do still get the warning. |
Yeah, I didn't bother removing it. It can be ignored |
I'm still in the process of gathering info from upstream whether I've missed something before I release the patch release into ghcup proper.
Meanwhile, the 'develop' channel covers this, you can set it in your config under
|
Related: * haskell/ghcup-hs#966 We bump this, although 'cabal run' is known to be broken on windows: haskell/cabal#9334 However, backporting more patches to 3.6 is not sustainable. Initially, I tried to backport haskell/cabal#8071, but it's not clear whether that is the only thing that causes compatibility issues with GHC 9.4 and might drive us into an awkward situation as well.
I decided it's not worth to do more backports and set cabal-3.10.2.1 as recommended despite a known regression. 3.10.3.0 is supposed to fix that and may come soon. |
On Windows the default combination of versions for cabal and GHC do not support each other.
Reproducing steps:
3.6.2.0-p1
for cabal and9.4.8
for ghc:stack new my-clash-project clash-lang/simple
Try to build it with cabal.
cd my-clash-project
cabal build
The text was updated successfully, but these errors were encountered: