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

Cannot build project under Windows 10 64-bit #41

Closed
typedbyte opened this issue Jul 19, 2017 · 6 comments
Closed

Cannot build project under Windows 10 64-bit #41

typedbyte opened this issue Jul 19, 2017 · 6 comments

Comments

@typedbyte
Copy link

As far as I see, the project (and thus, haskell-ide-engine) cannot be built on Windows 10 64-bit without problems. I build the package text-icu with the help of pacman as described here, but I keep running into a problem:

> stack build
haskell-lsp-0.1.0.0: configure (lib + exe)
Configuring haskell-lsp-0.1.0.0...
haskell-lsp-0.1.0.0: build (lib + exe)
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: C:\Users\DevUser\AppData\Roaming\stack\snapshots\97ce3d2b\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'

--  While building package haskell-lsp-0.1.0.0 using:
      C:\Users\DevUser\AppData\Roaming\stack\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

My current stack version, if it is of any help:

Version 1.4.0, Git revision e714f1dd3fade19496d91bd6a017e435a96a6bcd x86_64 hpack-0.17.0

@wz1000
Copy link
Collaborator

wz1000 commented Jul 19, 2017

Did you run stack exec ... and stack install text-icu in the haskell-ide-engine / haskell-lsp directory?

@wz1000
Copy link
Collaborator

wz1000 commented Jul 19, 2017

Also, try bumping the resolver in stack.yaml (I'm sorry I can't be of much help since I don't run Windows)

@typedbyte
Copy link
Author

These are the steps i did:

git clone https://github.com/alanz/haskell-lsp
cd haskell-lsp
stack exec -- pacman -Sy mingw64/mingw-w64-x86_64-icu
stack install text-icu
stack build

But the error remains. I also tried to use a newer resolver (--resolver nightly-2017-07-19), but without any success.

@alanz
Copy link
Collaborator

alanz commented Jul 19, 2017

I think you need to check the stack/stackage/ghc issue trackers for this issue, it is not strictly a haskell-lsp issue, the library is not installing properly in your environment.

@alanz
Copy link
Collaborator

alanz commented Jul 19, 2017

btw, I see the missing symbol is ucnv_getMaxCharSize_58. The release notes here state that it is upgraded to use version 53

Built and tested against ICU 53.

Perhaps try installing that version with pacman

@typedbyte
Copy link
Author

Thanks for your help, I got it building, although not by using pacman. Here are the steps:

  1. Download ICU4C for Windows 64-bit from the download page here. The newest version (59.1 at the time of writing, direct link here) is just fine.
  2. Extract the archive to some location, lets say C:\icu.
  3. Open a terminal, navigate to C:\icu\bin64
  4. Make a symbolic link: mklink icudt.dll icudt59.dll
  5. Make a symbolic link: mklink icuin.dll icuin59.dll
  6. Make a symbolic link: mklink icuuc.dll icuuc59.dll
  7. Then clone the repository and build it with some additional references to the extracted archive:
git clone https://github.com/alanz/haskell-lsp
cd haskell-lsp
stack build --extra-include-dirs="C:\icu\include" --extra-lib-dirs="C:\icu\lib64" --extra-lib-dirs="C:\icu\bin64"

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