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

Runtime error in windows: "fd:4: hGetLine: end of file" #1527

Open
jneira opened this issue Jun 26, 2019 · 5 comments
Open

Runtime error in windows: "fd:4: hGetLine: end of file" #1527

jneira opened this issue Jun 26, 2019 · 5 comments

Comments

@jneira
Copy link

jneira commented Jun 26, 2019

Hi, i've installed liquidhaskell in windows from source using stack succesfully but when i try to execute it i get a runtime error:

user@system MINGW64 /path/to/haskell-ide-engine
# liquid test/testdata/liquid/Evens.hs
LiquidHaskell Version 0.8.6.0, Git revision f4fe82cd03fbe906379c8ebeac5ec3efae0b4cd8 [develop@f4fe82cd03fbe906379c8ebeac5ec3efae0b4cd8 (Mon Jun 24 10:55:17 2019 +0200)]
Copyright 2013-19 Regents of the University of California. All Rights Reserved.

Targets: test/testdata/liquid/Evens.hs

**** [Checking: test/testdata/liquid/Evens.hs] *********************************

**** DONE:  A-Normalization ****************************************************


**** DONE:  Extracted Core using GHC *******************************************


**** DONE:  Transformed Core ***************************************************

liquid.exe: fd:4: hGetLine: end of file

The file being handled is this one but i've got the same results with test files under https://github.com/ucsd-progsys/liquidhaskell/tree/develop/tests/basic/pos

@jneira
Copy link
Author

jneira commented Jun 26, 2019

Forgot to mention that i've got another error before:

user@system MINGW64 /path/to/haskell-ide-engine
# liquid test/testdata/liquid/Evens.hs
LiquidHaskell Version 0.8.6.0, Git revision f4fe82cd03fbe906379c8ebeac5ec3efae0b4cd8 [develop@f4fe82cd03fbe906379c8ebeac5ec3efae0b4cd8 (Mon Jun 24 10:55:17 2019 +0200)]
Copyright 2013-19 Regents of the University of California. All Rights Reserved.

Targets: test/testdata/liquid/Evens.hs

**** [Checking: test/testdata/liquid/Evens.hs] *********************************

**** DONE:  A-Normalization ****************************************************


**** DONE:  Extracted Core using GHC *******************************************


**** DONE:  Transformed Core ***************************************************

liquid.exe: addLibrarySearchPath: path\to\liquidhaskell\.stack-work\install\d0f5f7d8\share\x86_64-windows-ghc-8.6.5\liquidhaskell-0.8.6.0\include\806 (Win32 error 2): El sistema no puede encontrar el archivo especificado.
liquid.exe: fd:4: hGetLine: end of file

The directory 806 was not created with stack install. After copying the existing folder 710 as 806 the error went out. Note that the error fd:4: hGetLine: end of file already was present.

@ranjitjhala
Copy link
Member

ranjitjhala commented Jun 26, 2019 via email

@jneira
Copy link
Author

jneira commented Jun 26, 2019

@ranjitjhala yeah, i am in mingw64 and i installed z3 with pacman. Before installing z3 i had another error (reproducible simply renaming mingw64/bin/z3.exe):

# liquid test/testdata/liquid/Evens.hs
LiquidHaskell Version 0.8.6.0, Git revision f4fe82cd03fbe906379c8ebeac5ec3efae0b4cd8 [develop@f4fe82cd03fbe906379c8ebeac5ec3efae0b4cd8 (Mon Jun 24 10:55:17 2019 +0200)]
Copyright 2013-19 Regents of the University of California. All Rights Reserved.

liquid.exe: <no location info>: Error: Uh oh.
    LiquidHaskell requires an SMT Solver, i.e. z3, cvc4, or mathsat to be installed.

But maybe the issue could be a defect in the z3 installation...how could i test z3?

@jneira
Copy link
Author

jneira commented Jun 26, 2019

Ok, trying to execute z3 it in a dos console adding /mingw64/bin in path throws an error about a missing procedure in libstdc++-6.dll
Maybe it will be a windows 7 issue, i'll test it in windows 10 later

@jneira
Copy link
Author

jneira commented Jun 26, 2019

Installing z3 from https://github.com/Z3Prover/z3/releases/download/Z3-4.8.5/z3-4.8.5-x64-win.zip has resolved the issue, thanks for the point @ranjitjhala
As improvement the error could had been more informative, but feel free to close the issue.
In case of closing this i would open a new issue about the missing directory with the ghc numeric version.

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

2 participants