Skip to content

Is there any way to install the package in Windows? #45

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

Closed
etairi opened this issue Jun 22, 2015 · 8 comments
Closed

Is there any way to install the package in Windows? #45

etairi opened this issue Jun 22, 2015 · 8 comments

Comments

@etairi
Copy link

etairi commented Jun 22, 2015

Is it possible to install the package under Windows? I tried using MinGW, and I can run ./configure command. But, what about installation? Clearly, running cabal install won't work.

@hvr
Copy link
Member

hvr commented Jun 23, 2015

I'm afraid it's not supposed to work with GHC/MinGW (it even says so in the package description)...

@etairi
Copy link
Author

etairi commented Jun 23, 2015

I can't even install it with Cygwin, though it says in the docs it works under Cygwin.

@Rufflewind
Copy link
Member

I can't even install it with Cygwin, though it says in the docs it works under Cygwin.

It should work on Cygwin if you use a Cygwin-build of GHC and Cabal. If it doesn't then it should be considered a bug.

@rakesh-k
Copy link

rakesh-k commented Mar 5, 2017

I am on Windows and need to install stack-run which depends on this package. And the unix package installation fails with this error:

cabal: Error: some packages failed to install:
unix-2.7.2.0 failed during the building phase. The exception was:
ExitFailure 1

@RyanGlScott
Copy link
Member

@rakesh-k, sorry, unix simply won't build on Windows.

Long ago, I believe GHC used to have a Cygwin-specific build that would allow you to install POSIX-heavy packages like unix, but that is certainly no longer the case. Nowadays, trying to link against the Cygwin runtime using MinGW-w64 libraries will inevitably lead to horrific linker errors, as the two each define their own, incompatible versions of several primitives (e.g., timer_t).

The workaround is to find an equivalent way to do things on Windows that doesn't require the unix package, I'm afraid. There is a unix-compat package that provides Windows shims for emulating the functionality of much of unix, so it's possible that might work for you.

@RyanGlScott
Copy link
Member

Although now that I look closer, your issue in particular isn't that stack-run depends directly on unix, but rather that it depends on vty, which in turn depends on unix. This is a known issue, and from what I understand, fixing it is much more complicated than swapping out some unix functions for unix-compat ones, unfortunately.

@RyanGlScott
Copy link
Member

@rakesh-k: See also yamadapc/stack-run#6, which tracks the progress to remove stack-run's dependency on vty when built with Windows.

@RyanGlScott
Copy link
Member

Closing since as of e745f0c, unix.cabal literally prevents you from installing unix on Windows due to the aforementioned issues.

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

5 participants