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

ghcup-0.1.19.0 is busted on windows #745

Closed
hasufell opened this issue Jan 13, 2023 · 8 comments
Closed

ghcup-0.1.19.0 is busted on windows #745

hasufell opened this issue Jan 13, 2023 · 8 comments

Comments

@hasufell
Copy link
Member

Users report on windows the ghcup binary fails to start with libstdc++-6.dll is missing.

$ ldd x86_64-mingw64-ghcup-0.1.19.0.exe
        ntdll.dll => /c/Windows/SYSTEM32/ntdll.dll (0x7ffb81bd0000)
        KERNEL32.DLL => /c/Windows/System32/KERNEL32.DLL (0x7ffb80350000)
        KERNELBASE.dll => /c/Windows/System32/KERNELBASE.dll (0x7ffb7f470000)
        ADVAPI32.dll => /c/Windows/System32/ADVAPI32.dll (0x7ffb80410000)
        msvcrt.dll => /c/Windows/System32/msvcrt.dll (0x7ffb81880000)
        sechost.dll => /c/Windows/System32/sechost.dll (0x7ffb810d0000)
        RPCRT4.dll => /c/Windows/System32/RPCRT4.dll (0x7ffb813b0000)
        GDI32.dll => /c/Windows/System32/GDI32.dll (0x7ffb80f70000)
        win32u.dll => /c/Windows/System32/win32u.dll (0x7ffb7f890000)
        gdi32full.dll => /c/Windows/System32/gdi32full.dll (0x7ffb7fb00000)
        msvcp_win.dll => /c/Windows/System32/msvcp_win.dll (0x7ffb7fa60000)
        ucrtbase.dll => /c/Windows/System32/ucrtbase.dll (0x7ffb7f8f0000)
        USER32.dll => /c/Windows/System32/USER32.dll (0x7ffb81600000)
        ole32.dll => /c/Windows/System32/ole32.dll (0x7ffb801e0000)
        combase.dll => /c/Windows/System32/combase.dll (0x7ffb804c0000)
        SHELL32.dll => /c/Windows/System32/SHELL32.dll (0x7ffb80820000)
        SHLWAPI.dll => /c/Windows/System32/SHLWAPI.dll (0x7ffb80fa0000)
        WS2_32.dll => /c/Windows/System32/WS2_32.dll (0x7ffb81810000)
        libstdc++-6.dll => not found
        dbghelp.dll => /c/Windows/SYSTEM32/dbghelp.dll (?)
        WINMM.dll => /c/Windows/SYSTEM32/WINMM.dll (?)

Probably due to text-2.0 forcing us to link against libstdc++-6.dll.

@Bodigrim @mpickering @bgamari how are distributors supposed to ship portable binaries with text-2.0?

@hasufell hasufell changed the title ghcup-0.1.19.0 is busted ghcup-0.1.19.0 is busted on windows Jan 13, 2023
@hasufell
Copy link
Member Author

I was able to hack around it by adding C:\ghcup\ghc\9.2.5\mingw\bin to my windows Path.

@mpickering
Copy link
Contributor

I think for now, the best thing to do is build text without depending on C++ as (by setting flag -simdutf).

@hasufell
Copy link
Member Author

@hasufell
Copy link
Member Author

That didn't work, second try: https://github.com/haskell/ghcup-hs/actions/runs/3913314508

@hasufell
Copy link
Member Author

hasufell commented Jan 13, 2023

@mpilgrem a big fat warning to you. I'm not sure how or if stackage deals with this or if it's still pre text-2.0. Using simdutf on text-2.0 (which is the default), will make all your binaries non-portable.

@mpilgrem
Copy link
Contributor

@hasufell, thanks for the heads-up. Stack is currently built with GHC 9.2.5 and text-1.2.5.0 (which comes with GHC 9.2.5), but I am keen to move it on to GHC 9.4 (GHC 9.4.4 comes with text-2.0.1) as soon as there is a Stackage LTS Haskell for GHC 9.4.

@mpilgrem
Copy link
Contributor

Actually, the current Stack is also buildable with GHC 9.4.4 (Stackage nightly-2023-01-13, dependency on text-2.0.1). I don't know what I am doing 'wrong' but it builds fine, and the built executable runs fine, on Windows 11.

@hasufell
Copy link
Member Author

Actually, the current Stack is also buildable with GHC 9.4.4 (Stackage nightly-2023-01-13, dependency on text-2.0.1). I don't know what I am doing 'wrong' but it builds fine, and the built executable runs fine, on Windows 11.

GHC has disabled simdutf when it's used as a boot library. I built text-2.0 with GHC 8.10.7.

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

No branches or pull requests

3 participants