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

Is Windows supported? #46

Closed
Bodigrim opened this issue May 8, 2022 · 12 comments
Closed

Is Windows supported? #46

Bodigrim opened this issue May 8, 2022 · 12 comments

Comments

@Bodigrim
Copy link

Bodigrim commented May 8, 2022

I'm having difficulties to build this package on Windows. Is it supported? Could README please give some instructions? E. g., which MSYS packages to install or what needs to be in PATH.

@Bodigrim
Copy link
Author

@noughtmare might you know the answer? I found jtdaugherty/vty#219 (comment) according to which you had some success in building terminfo on Windows?..

@noughtmare
Copy link

noughtmare commented Jan 19, 2023

I know I succeeded once, but now I can't get terminfo's configure script to find the ncurses library I just installed. It's such a trivial thing that can be solved by providing the path in the right place, but I don't know where that right place is.

If I run ./configure manually in the mingw64 shell then it does find ncurses, but the when cabal runs ./configure it doesn't find it...

@noughtmare
Copy link

noughtmare commented Jan 19, 2023

OK, I can compile it by first installing mingw-w64-x86_64-ncurses with pacman in the mingw64 shell. I think this works in powershell (but I used the mingw64 shell directly, without ghcup run):

ghcup run pacman -- -S mingw-w64-x86_64-ncurses

Then run these commands in powershell in the terminfo directory:

$Env:C_INCLUDE_PATH = "C:\ghcup\msys64\mingw64\include"
$Env:LIBRARY_PATH = "C:\ghcup\msys64\mingw64\lib"
cabal build --extra-include-dirs="C:\ghcup\msys64\mingw64\include\ncursesw"

I've tested this with 9.2.5, there might be problems with 9.4 because of the migration to clang.

@Bodigrim
Copy link
Author

@jtdaugherty how do you feel about adding these instructions to README?

@jtdaugherty
Copy link
Collaborator

@Bodigrim are you thinking they'd go in the README for terminfo?

@Bodigrim
Copy link
Author

I think it would be helpful to have build instructions in README, yes, but you are the boss :)

@jtdaugherty
Copy link
Collaborator

Hm, I didn't realize I had any authority. :) I remember talking about possibly helping out with maintenance on this package a while back but that was as part of an exploration of whether its current maintainer wanted that. I also now find myself without as much time on my hands, so I don't think I'm in a position to contribute much. I'm sorry if that has led to confusion!

With that said, I have basically no experience doing Haskell development on Windows so I cannot tell whether the above steps ought to be repeated in the README as general advice, nor could I say what the generalization of those steps would be or what assumptions they make about the build environment, etc. And since I don't do Windows development (at all, but especially with Haskell), I'm not in a position to test (and thus support) documented Windows instructions. At best I could say "a user found this incantation helpful one time, use at your own risk" which I would personally hesitate to put in the README of a package that I wanted to support.

@Bodigrim
Copy link
Author

Sorry, I probably misread #48 (comment)

@jtdaugherty
Copy link
Collaborator

Hah, yes, I was a little surprised he moved on that so quickly!

@jtdaugherty
Copy link
Collaborator

In the spirit of helpfulness, what if we updated the README with a pointer to this ticket and a statement that while Windows is not officially supported, this ticket might prove useful?

@noughtmare
Copy link

I also feel like my way of making this package work on Windows is not ideal.

As for how general these steps are, I think it should work for anyone who uses Windows with the x86_64 architecture, has installed Haskell with ghcup, and uses the default directories for both ghcup and msys2. Adapting it to other directories should be pretty straightforward, but it is unfortunate that the toolchain doesn't seem to automatically find these installed libraries and includes.

I think a link to this ticket in the README would be a good compromise.

@jtdaugherty
Copy link
Collaborator

Done!

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