-
Notifications
You must be signed in to change notification settings - Fork 711
cabal install with and without -j use different Cabal libraries #1244
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
Comments
Possibly related: #1076. |
snoyberg tells me that he does have Cabal-1.16.0.3 installed (in both global and user dbs) so it's not simply a case of the Cabal lib available to compile the Setup.hs being different to the one that cabal-install is built against. So perhaps it is an issue with the setup-exe-cache. |
@dcoutts |
Couldn't reproduce:
Trying to build a package that uses Does this happen with all packages or just sometimes? Maybe there's something peculiar to the package you're trying to build? From the code I see that this error happens when the version of |
I can reproduce this only by using
|
Steps to reproduce on my machine.
I cannot reproduce this with |
I've tried coming up with a reproducing case for when Cabal-1.16.0.3 is installed, but I can't quite figure out what the steps needed are. The one time I got it to happen this morning, the steps went something like:
But even this doesn't seem to reproduce it reliably. |
@kosmikus I can reproduce this, but only with Cabal-1.16. With the TOT version, however, I get a different error:
which seems to be related to #1241. I believe that the first error (the Cabal-1.16 one) is triggered by the fact that
However, I'm not quite sure what we should do here: the root cause of the problem is user configuration (the version of Cabal that cabal-install was compiled with isn't installed), and the error message looks fine to me. Will be looking into why a different error message is printed in the TOT version. |
BTW, now that we support cross-compilation, shouldn't this line also include
? |
I still have this problem. When I run Questions:
|
Update: My problem went away with a cabal clean in Update 2: My problem didn't go away at all, it was just that after a |
@nh2 Remove the |
I still have problems with this: After I cabal install from my cabal source code,
What is going on here? The exact procedure: I'm installing a cabal 1.17.1 after wiping
This wrong cached cabal is then used when I use If I run the installation with
EDIT: I finally believe to have figured that out. When deciding which version of the Cabal library to use to compile a I think this is wrong: It is incredibly confusing if you go into a project that you have last compiled some time ago, you do This is especially bad if you Why was this introduced? Why does |
Also, that binary in The comment in the code says |
Third, why do all packages I install use the same |
All packages with Ideally, the Git version of Cabal would be also tagged with the revision SHA-1, so that we could distinguish between e.g.
The logic could probably be improved, but one thing to keep in mind is that the version of Cabal that
Just run |
Thanks for your explanation!
How would that help though? My two versions (
Granted, that makes sense. However, for a user who just runs cabal build it is very unclear and it went unnoticed for me for many hours although I was hacking on cabal. Maybe a warning like |
Well, at least the cached setup exe for Cabal-1.17-a1c2ef won't be used when Cabal-1.17-e4f5d8 is requested.
This could be useful, though perhaps not at the default verbosity. |
Using GHC 7.4.2 and cabal-install 1.16.0.2. When I run
cabal install -j
followed bycabal build
in a project, the result is:However,
cabal install
followed bycabal build
works fine.The text was updated successfully, but these errors were encountered: