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

Stack install failing on windows with unknown symbol ucnv_getMaxCharSize_58'` #56

Closed
freeman42x opened this issue Aug 19, 2017 · 14 comments

Comments

@freeman42x
Copy link

Environment:

  • Windows 10 64 bit
  • MINGW 64 bit
  • stack Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e x86_64 hpack-0.17.1

When running stack install I first got the following error:

Missing C libraries: icuuc, icuin, icudt

To fix it I run: stack exec -- pacman -Sy mingw64/mingw-w64-x86_64-icu

After that the build stopped on another error which seemed to have to do with stack building multiple things at same time.

On running again it passed by that error and it printed the following error:

haskell-lsp-0.1.0.0: build (lib + exe)
Progress: 1/13
--  While building package haskell-lsp-0.1.0.0 using:
  C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe --builddir=.stack-work\dist\ca59d0ab build lib:haskell-lsp exe:lsp-hello --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
Logs have been written to: D:\Sources\haskell-ide-engine\.stack-work\logs\haskell-lsp-0.1.0.0.log

Preprocessing library haskell-lsp-0.1.0.0...
[ 2 of 10] Compiling Language.Haskell.LSP.TH.ClientCapabilities ( src\Language\Haskell\LSP\TH\ClientCapabilities.hs, .stack-work\dist\ca59d0ab\build\Language\Haskell\LSP\TH\ClientCapabilities.o )
ghc.EXE: unable to load package `text-icu-0.7.0.1'
ghc.EXE: addLibrarySearchPath: D:\Users\Razvan\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\ (Win32 error 3): The system cannot find the path specified.
ghc.EXE: C:\sr\snapshots\c7200f2c\lib\x86_64-windows-ghc-8.0.2\text-icu-0.7.0.1-EllpGYmNw3bJ3FIJMPisuJ\HStext-icu-0.7.0.1-EllpGYmNw3bJ3FIJMPisuJ.o: unknown symbol `ucnv_getMaxCharSize_58'

Any suggestions on how to fix it?

StackOverflow reference: https://stackoverflow.com/q/45775326/750216

@freeman42x
Copy link
Author

I think the bug is because it is looking for the path in the wrong drive: D instead of C: ghc.EXE: addLibrarySearchPath: D:\Users\Razvan\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib\ (Win32 error 3): The system cannot find the path specified.

@tonyfloatersu
Copy link

tonyfloatersu commented Aug 20, 2017

I got the same issue and I just follow the same method of #41 to solve the problem in: ghc.EXE: unable to load package 'text-icu-0.7.0.1'. But I failed in compiling with the same error.

@oscarvarto
Copy link

I also hit this (unknown symbol `ucnv_getMaxCharSize_58'). Hopefully the Haskell on Windows experience improves over time.

@freeman42x
Copy link
Author

freeman42x commented Aug 30, 2017 via email

@oscarvarto
Copy link

WSL is not ready for haskell at the moment. Every time I try I hit a different bug. Last time I tried microsoft/WSL#1671 (comment), but didn't work for me.

Therefore, the only thing that has worked for me has been to use a Linux guest in VirtualBox. At the moment I'm using Fedora 26, and it works prety good.

However, Windows is a very important platform... I wish it wouldn't be that hard for Haskell development

@freeman42x
Copy link
Author

I know someone who is a very good Haskell programmer and he said he had no issues with using WSL with Nix. Not saying that this means anything though: it is just another data point.

@oscarvarto
Copy link

@razvan-panda Do you mind sharing a solution if you find any? Maybe your friend could give us some guidance :)

@freeman42x
Copy link
Author

freeman42x commented Aug 30, 2017 via email

@oscarvarto
Copy link

@alanz I'm happy to inform you that I have just successfully installed Haskell Language Server on Windows 10 pro (64 bits) version 1709.

Please, keep going with this project! I'm pretty happy to have a modern development environment for Haskell on Windows with VS Code.

@LukaHorvat
Copy link

Hitting the same issue.

@alanz
Copy link
Collaborator

alanz commented Jan 18, 2018

Are there any windows users who can help with this?

@LukaHorvat
Copy link

The solution in this issue works for me (#41) but it required rebuilding text-icu and it also requires that the symlinked DLLs are somewhere in the PATH when the hie executable is ran. I'm thinking this is a bug either in haskell-lsp or in text-icu.

text-icu doesn't build if the icu lib isn't installed but just installing it via pacman is enough to fix that. It's pretty weird then that I need to symlink those library files to get haskell-lsp building.

@LukaHorvat
Copy link

LukaHorvat commented Mar 8, 2018

I've created a pull request on the text-icu package the fixes this for me. With this change it's enough to install the icu library via pacman. This isn't a haskell-lsp issue but this issue is the first result for unknown symbol 'ucnv_getMaxCharSize_58'

Perhaps someone can do something about getting this merged and maybe a new version pushed to Hackage? It's been 3 years and I feel that text-icu is a pretty integral package.

@jneira
Copy link
Member

jneira commented Feb 20, 2020

I can not reproduce the error with:

  • windows 7 and mingw 64 bits
  • haskell-lsp-0.8.2.0
  • stack Version 2.1.3, Git revision 0fa51b9925decd937e4a993ad90cb686f88fa282 (7739 commits) x86_64 hpack-0.31.2

So it seems the issue was fixed upstream. @LukaHorvat, feel free to reopen if you continue experiencing the issue.

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

6 participants