Skip to content
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

Fails to build with GHC-9.2.8 on windows #271

Closed
hasufell opened this issue Jan 20, 2024 · 6 comments
Closed

Fails to build with GHC-9.2.8 on windows #271

hasufell opened this issue Jan 20, 2024 · 6 comments

Comments

@hasufell
Copy link

Failed to build vty-6.0.
Build log (
C:\cabal\logs\ghc-9.2.8\vty-6.0-c9d29843e440fbb3ee329f6ea71598a3854ca906.log
):
Preprocessing library for vty-6.0..
Building library for vty-6.0..
[ 1 of 24] Compiling Graphics.Text.Width ( src\Graphics\Text\Width.hs, dist\build\Graphics\Text\Width.o )
[ 2 of 24] Compiling Graphics.Vty.Attributes.Color240 ( src\Graphics\Vty\Attributes\Color240.hs, dist\build\Graphics\Vty\Attributes\Color240.o )
[ 3 of 24] Compiling Graphics.Vty.Attributes.Color ( src\Graphics\Vty\Attributes\Color.hs, dist\build\Graphics\Vty\Attributes\Color.o )
[ 4 of 24] Compiling Graphics.Vty.Attributes ( src\Graphics\Vty\Attributes.hs, dist\build\Graphics\Vty\Attributes.o )
[ 5 of 24] Compiling Graphics.Vty.DisplayAttributes ( src\Graphics\Vty\DisplayAttributes.hs, dist\build\Graphics\Vty\DisplayAttributes.o )
[ 6 of 24] Compiling Graphics.Vty.Error ( src\Graphics\Vty\Error.hs, dist\build\Graphics\Vty\Error.o )
[ 7 of 24] Compiling Graphics.Vty.Image.Internal ( src\Graphics\Vty\Image\Internal.hs, dist\build\Graphics\Vty\Image\Internal.o )
[ 8 of 24] Compiling Graphics.Vty.Image ( src\Graphics\Vty\Image.hs, dist\build\Graphics\Vty\Image.o )
[ 9 of 24] Compiling Graphics.Vty.Input.Events ( src\Graphics\Vty\Input\Events.hs, dist\build\Graphics\Vty\Input\Events.o )
[10 of 24] Compiling Graphics.Vty.Input ( src\Graphics\Vty\Input.hs, dist\build\Graphics\Vty\Input.o )
[11 of 24] Compiling Graphics.Vty.Config ( src\Graphics\Vty\Config.hs, dist\build\Graphics\Vty\Config.o )
[12 of 24] Compiling Graphics.Vty.Picture ( src\Graphics\Vty\Picture.hs, dist\build\Graphics\Vty\Picture.o )
[13 of 24] Compiling Graphics.Vty.Span ( src\Graphics\Vty\Span.hs, dist\build\Graphics\Vty\Span.o )
[14 of 24] Compiling Graphics.Vty.PictureToSpans ( src\Graphics\Vty\PictureToSpans.hs, dist\build\Graphics\Vty\PictureToSpans.o )
ghc-9.2.8.exe: panic! (the 'impossible' happened)
  (GHC version 9.2.8:
        loadArchive "C:\\ghcup\\ghc\\9.2.8\\mingw\\lib\\gcc\\x86_64-w64-mingw32\\10.2.0\\libstdc++.dll.a": failed

Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

ghc-9.2.8.exe: Could not load `libstdc++-6.dll'. Reason: addDLL: libstdc++-6.dll or dependencies not loaded. (Win32 error 126)

Error: cabal-3.10.2.1.exe: Failed to build vty-6.0 (which is required by
exe:ghcup from ghcup-0.1.20.0). See the build log above for details.        

Maybe related: https://gitlab.haskell.org/ghc/ghc/-/issues/21435

Since GHC-9.4.x is even more busted on windows, it's not an option for me to upgrade.

@Bodigrim
Copy link

@hasufell is your build by chance forcing text>2.0? I don't see any other C++ dependencies in vty's dependency tree.

@hasufell
Copy link
Author

It's very likely this is yet another text instance.

@Bodigrim
Copy link

Bodigrim commented Jan 21, 2024

Yeah, GHC 9.2 does not cope with text>=2 + TemplateHaskell on Windows (which is what's happening in Graphics.Vty.PictureToSpans). Just text works fine, that's why I'm reluctant to prohibit building it with GHC<9.4 altogether.

@hasufell
Copy link
Author

Well, I don't know what to do.

@Bodigrim
Copy link

A tactical solution would be to derive lens manually, so that TemplateHaskell is not enabled. Graphics.Vty.PictureToSpans is the only module depending on TH and there are only two makeLenses, which would not take long to rewrite.

Dunno how @jtdaugherty feels about it though.

jtdaugherty added a commit that referenced this issue Jan 21, 2024
…hich has trouble on Windows and GHC 9.2 (fixes #271)
@jtdaugherty
Copy link
Owner

Happy to work around this. I just pushed 72ce9f6 to get away from the TH dependency in that module. I've just uploaded 6.2 to Hackage which includes this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants