-
Notifications
You must be signed in to change notification settings - Fork 711
cabal install should change directory before building a local package #1236
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
Couldn't reproduce (both 0.14 and the git version work fine):
|
Hm. It doesn't work here. Transcript enclosed below. I'll try fresh from git and report back.
|
Maybe it was just a 1.16 bug? |
Hm. I can't build the given package at all with cabal-install from git, though it seems to be a different problem.
I have changed from "documentation: True" to "documentation: False" in ~/.cabal/config and added --disable-documentation, but this error persists. I'll try again in a few days, and when I can build the package from within the directory, I'll let you know if I can build from outside the directory. |
Oh, and I just noticed the "use --force to override" suggestion; --force doesn't fix it, either. |
Strange. Maybe it's a configuration issue? I tried toggling various settings (like |
|
For the record, I can't reproduce either -- it installs fine for me with both 1.16 and HEAD cabal-install. Can you try running |
Okay, I've split off the discussion of the problem I'm having with the most recent version from git into issue 1241. For the following, I'll report what happens with non-git cabal-install.
|
Hmm, odd how the output just stops after calling
Note also that if I try running this command directly, I get an error about
so it seems like I wonder if the |
Just sat down with Brent. Some things we discovered:
|
When using cabal-install to install a local package (by which I mean one which is unpacked and sitting in a directory on the hard drive), cabal should cd into the directory the package is in before attempting to configure/build it, so that local resources are available via relative paths. I've put a minimal package which demonstrates the problem at http://dmwit.com/tmp.tar.gz; unpack the tar and compare the output of the following two commands:
The former succeeds; the latter fails.
This is biting me in gtk2hs, where I sometimes wish to re-install several packages with a command like "cabal install ./cairo ./gtk" rather than the more unwieldy and fragile "cd cairo && cabal install --force-reinstalls && cd ../gtk && cabal install && cd ..".
The text was updated successfully, but these errors were encountered: