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

Can't install alex? #3681

Closed
LeventErkok opened this issue Dec 20, 2017 · 7 comments
Closed

Can't install alex? #3681

LeventErkok opened this issue Dec 20, 2017 · 7 comments

Comments

@LeventErkok
Copy link

Stack has been acting weirdly on AppVeyor recently. With no config changes on my part, I now get this error message:

cabal install alex
cabal: The program 'ghc' version >=6.11 is required but it could not be found.

But it is itself installing GHC 8.0.2. I'm not quite sure what changed?

Here's the full log: https://ci.appveyor.com/project/LeventErkok/sbv/build/1.0.162

@decentral1se
Copy link
Member

decentral1se commented Dec 20, 2017

Hmmmm, not sure if this is related - #3178. We saw missing build tools before.

You're running on the latest Stack?

@LeventErkok
Copy link
Author

My script literally does this:

curl -ostack.zip -L --insecure http://www.stackage.org/stack/windows-i386

and then runs the stack from there. I presume that gets me the latest stack?

@kadoban
Copy link
Collaborator

kadoban commented Dec 20, 2017

The only things I could see possibly going wrong there don't seem like they could be on stack's end. Like, stack is installing GHC for itself, then clearly that GHC works because it's being used to install cabal-install. But then cabal-install isn't seeing it correctly (or isn't able to run it correctly) after you're setting the PATH.

One thing I could see going wrong is the PATH could wrong somehow, though I'm not seeing a typo. There's the difference of the format that stack exec which ghc is reporting the path to GHC and the one you're setting in PATH, but I assume that has something to do with msys or whatever.

When you look in that directory manually, does the GHC exist where it's supposed to? Does it report its version in a way that looks correct, when you run it manually? Can you get cabal-install to be more verbose about what it's doing? It'd be nice to know if it's not seeing GHC at all, or if it's just balking at some of GHC's output that it doesn't like.

Also, can you just use stack to install alex? Does 'stack install alex' work? Though I assume there's some reason you're using cabal-install instead, I'm not sure what that reason is.

@LeventErkok
Copy link
Author

@kadoban Thanks for looking into this. Unfortunately, I do not have a Windows dev-environment to test these things out; and I only use stack to build on Windows on the AppVeyor CI platform.

Thing is, everything has been quite stable for quite some time. Then about a week ago, failures started to happen and I filed this ticket: #3649. The solution to that was to set the STACK_ROOT env variable. And then recently this problem happened, and I'm stumped as to what's going on. Since nothing has changed on my config/project regarding the build system, and I think AppVeyor machines are the same as well as far as the VM's are concerned, recent changes in stack must be contributing to the issue here.

I understand this is less than helpful, but Windows remains the odd-man out there and the only way I can test things is to use AppVeyor; which gives me the chicken-egg problem.

@decentral1se
Copy link
Member

I also saw #782 (comment)? Did stack install alex work? That should work for now.

@kadoban
Copy link
Collaborator

kadoban commented Dec 20, 2017

Can you just throw bunches of diagnostic commands (and use maximum verbosity on the cabal call) into the CI script or whatever to see what's going on? I'm still having a hard time thinking of what stack could even be doing here to cause this.

@LeventErkok
Copy link
Author

Ah, my bad! I did not realize that stack has moved to GHC 8.2.2. My "regress" script had some GHC 8.0.2 assumptions baked in. Adjusting them for GHC 8.2.2 fixed the problem.

Sorry for the noise.

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