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

'cabal install' fails with fresh install of 2014.2.0.0 for Windows, 64bit #139

Closed
vesten opened this Issue Aug 13, 2014 · 20 comments

Comments

Projects
None yet
@vesten
Copy link

vesten commented Aug 13, 2014

Running the installer for 2014.2.0.0 and accepting all defaults on a Windows Vista Enterprise SP2 (work machine, not my fault) machine, then 'cabal update', then 'cabal install cabal-install' results in:

>cabal install cabal-install
  Resolving dependencies...
  Configuring cabal-install-1.20.0.3...
  Failed to install cabal-install-1.20.0.3
  Last 10 lines of the build log ( C:\Users\... ):
  Configuring cabal-install-1.20.0.3...
  setup-Cabal-1.18.1.3-x86_64-windows-ghc-7.8.3.exe: does not exist
  cabal: Error: some packages failed to install:
  cabal-install-1.20.0.3 failed during the configure step. The exception was:
  ExitFailure 1

However,
...\AppData\Roaming\cabal\setup-exe-cache\setup-Cabal-1.18.1.3-x86_64-windows-ghc-7.8.3.exe exists.

Also, uninstalling 64bit and similarly installing 32bit 2014.2.0.0 does not exhibit this problem.

@randen

This comment has been minimized.

Copy link
Contributor

randen commented Aug 13, 2014

Thanks for the report. If you do not mind, I would like to ask some questions and share some suggestions that might give some more info.

One thing that might be useful to try for more info is to use the --verbose option for cabal (or -v) and set it to the highest setting (e.g., -v3). True to the name, it is quite verbose, so redirecting the output to a file is recommended.

I just tried what sounds like the same steps you describe and I had no problem (on x64). However, doing those steps did suggest to me some potential things to examine.

When I did this experiment just now, I brought up a new cmd instance, checked the PATH to make sure it was as expected. I wonder if there is a possible problem with "cabal install cabal-install" on Windows under the following scenario: the cabal.exe which gets newly installed in fact is being installed over top of the currently-running cabal.exe (i.e., same location)?

This could cause a problem with overwriting the existing, presumably open file cabal.exe. In the above situation, this scenario might occur if in fact the cmd instance was created before the HP install and thus had an unmodified PATH (i.e., no directories from the newly installed HP 2014.2.0.0). That is, the PATH update is not reflected in any existing cmd instances but will be evident in any cmd.exe launched after the install. Then, if the use of an older cmd instance is possible, there might also have been an older cabal.exe in the user's cabal directory (i.e., %APPDATA%\cabal\bin\cabal.exe), which is where "cabal install" by default (and with --user) will put packages and binaries.

You may also want to examine whether the cabal config file might be defaulting to putting installs into the global location rather than the user location. The config is %APPDATA%\cabal\config. Doing that could cause some permissions problems.

The "does not exist" message might actually be interpreted as "setup-Cabal-....exe reports the following: something does not exist but we aren't telling you what it is that does not exist" For this particular part of the problem, the -v3 verbosity would very likely reveal more around the time of the error.

edit: Also, note issue #51 which notes that updating cabal.exe should be done with --global, otherwise the PATH settings will not allow the newly installed (in the user area) cabal.exe to be used.

@vesten

This comment has been minimized.

Copy link
Author

vesten commented Aug 13, 2014

Thanks for the response randen. I'll run with '-v3' in a cmd window first
thing in the morning (work machine - no vpn, sry). Just for context, I did
uninstall 2013.2.0.0 so a previous cabal.exe was present. And I'm
reasonably sure I uninstalled 2014 x64, performed a curative reboot, then
re-installed 2014 x64 before I submitted the ticket. Its possible though
that I launched a command window before the env was updated. Again, will
check in the morning.

edit: Almost there. I had a C:\Mingw\bin early in the path. Removing it and running,
>cabal install --global cabal-install [-v3]
completes successfully. Without the --global switch mentioned in issue #51 it fails as described. However if I subsequently,
>cabal install stylish-haskell
for example, it fails with unresolved dependancies such as,
...
*** Chasing dependencies:
Chasing modules from:
*C:\Users\sbigham1\AppData\Local\Temp\exceptions-0.6.1-6108\exceptions-0.6.1\dis
t\setup\setup.hs

C:\Users\sbigham1\AppData\Local\Temp\exceptions-0.6.1-6108\exceptions-0.6.1\dist\setup\setup.hs:1:8:
Could not find module Distribution.Simple' There are files missing in theCabal-1.20.0.2' package,
try running 'ghc-pkg check'.
Locations searched:
C:\Users\sbigham1\AppData\Local\Temp\exceptions-0.6.1-6108\exceptions-0.6.1\Distribution\Simple.hs
C:\Users\sbigham1\AppData\Local\Temp\exceptions-0.6.1-6108\exceptions-0.6.1\Distribution\Simple.lhs
C:\Users\sbigham1\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\Cabal-1.20.0.2\Distribution\Simple.hi
*** Deleting temp files:
Deleting:
*** Deleting temp dirs:
Deleting:
)
...

If I uninstall / re-install HP and do not upgrade cabal-install, other package installs proceed normally.

On Wed, Aug 13, 2014 at 5:33 PM, randen notifications@github.com wrote:

Thanks for the report. If you do not mind, I would like to ask some
questions and share some suggestions that might give some more info.

One thing that might be useful to try for more info is to use the
--verbose option for cabal (or -v) and set it to the highest setting (e.g.,
-v3). True to the name, it is quite verbose, so redirecting the output to a
file is recommended.

I just tried what sounds like the same steps you describe and I had no
problem (on x64). However, doing those steps did suggest to me some
potential things to examine.

When I did this experiment just now, I brought up a new cmd instance,
checked the PATH to make sure it was as expected. I wonder if there is a
possible problem with "cabal install cabal-install" on Windows under the
following scenario: the cabal.exe which gets newly installed in fact is
being installed over top of the currently-running cabal.exe (i.e., same
location)?

This could cause a problem with overwriting the existing, presumably open
file cabal.exe. In the above situation, this scenario might occur if in
fact the cmd instance was created before the HP install and thus had an
unmodified PATH (i.e., no directories from the newly installed HP
2014.2.0.0). That is, the PATH update is not reflected in any existing cmd
instances but will be evident in any cmd.exe launched after the install.
Then, if the use of an older cmd instance is possible, there might also
have been an older cabal.exe in the user's cabal directory (i.e.,
%APPDATA%\cabal\bin\cabal.exe), which is where "cabal install" by default
(and with --user) will put packages and binaries.

You may also want to examine whether the cabal config file might be
defaulting to putting installs into the global location rather than the
user location. The config is %APPDATA%\cabal\config. Doing that could cause
some permissions problems.

The "does not exist" message might actually be interpreted as
"setup-Cabal-....exe reports the following: something does not exist but we
aren't telling you what it is that does not exist" For this particular part
of the problem, the -v3 verbosity would very likely reveal more around the
time of the error.


Reply to this email directly or view it on GitHub
#139 (comment)
.

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Aug 18, 2014

Looks like a Cabal bug. I'll try to look into it in the near future.

@vesten

This comment has been minimized.

Copy link
Author

vesten commented Aug 19, 2014

Thx. If I can feed you anything that helps, just let me know.

On Mon, Aug 18, 2014 at 12:00 PM, Mikhail Glushenkov <
notifications@github.com> wrote:

Looks like a Cabal bug. I'll try to look into it in the near future.


Reply to this email directly or view it on GitHub
#139 (comment)
.

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Aug 22, 2014

This appears to be a duplicate of haskell/cabal#2049, which is fixed in Cabal 1.20.

@vesten

This comment has been minimized.

Copy link
Author

vesten commented Aug 26, 2014

HP 2014.2.0.0 installs Cabal 1.20 . . .
c:\Users\sbigham1>cabal -V
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library

Running 'ghc-pkg check -v' however seems to show an incomplete install . . .
There are problems in package hlint-1.9.3:
Warning: library-dirs: C:\Users\sbigham1\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\hlint-1.9.3 doesn't exist or isn't a directory
Warning: haddock-interfaces: C:\Users\sbigham1\AppData\Roaming\cabal\doc\x86_64-windows-ghc-7.8.3\hlint-1.9.3\html\hlint.haddock doesn't exist or isn't a file
Warning: haddock-html: C:\Users\sbigham1\AppData\Roaming\cabal\doc\x86_64-windows-ghc-7.8.3\hlint-1.9.3\html doesn't exist or isn't a directory
import-dirs: C:\Users\sbigham1\AppData\Roaming\cabal\x86_64-windows-ghc-7.8.3\hlint-1.9.3 doesn't exist or isn't a directory
cannot find any of ["Language\Haskell\HLint.hi","Language\Haskell\HLint.p_hi","Language\Haskell\HLint.dyn_hi"]
cannot find any of ["Language\Haskell\HLint2.hi","Language\Haskell\HLint2.p_hi","Language\Haskell\HLint2.dyn_hi"]
cannot find any of ["Paths_hlint.hi","Paths_hlint.p_hi","Paths_hlint.dyn_hi"]
etc.

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Aug 26, 2014

There are problems in package hlint-1.9.3

This seems unrelated to the issue under discussion. Try reinstalling hlint.

@vesten

This comment has been minimized.

Copy link
Author

vesten commented Aug 26, 2014

Resolved. The last comment trigger the thought, "Why -is- hlint showing errors?" It shouldn't be installed at all. I've uninstalled and re-installed HP then ran 'ghc-pkg check'. So, I uninstalled HP for the eleventy-third time and this time deleted %APPDATA%\cabal and %PROGRAMFILES%\ghc. Re-installed HP,
cabal update . . . . . . . . . . . . . . . . . . . . . OK
cabal install cabal-install --global . . . . . . OK
cabal install hlint . . . . . . . . . . . . . . . . . . .OK
cabal install stylish-haskell . . . . . . . . . . . OK

Cleaning up the additional directories seems to have resolved my issues.

Perhaps the uninstaller could be made to check for these dirs and remove them - or prompt the user to?

Thanks 23Skidoo and randen for your help and patience.

@vesten vesten closed this Aug 26, 2014

@dietertaotesting

This comment has been minimized.

Copy link

dietertaotesting commented Nov 13, 2014

I had the 'setup-Cabal-1.18.1.3-x86_64-windows-ghc-7.8.3.exe: does not exist #143' issue when I tried to install in a MingW console (Github bash in fact). Everything worked fine when I switched to a regular Windows cmd

@tsvetanYordanov

This comment has been minimized.

Copy link

tsvetanYordanov commented Nov 25, 2014

Yep, I was experiencing the same problem occurring in Windows cmd, but I also had my %CYGWIN_HOME%\bin directory appended to the PATH. Removing it from the PATH solved the problem for me.

@Rufflewind

This comment has been minimized.

Copy link
Member

Rufflewind commented Dec 15, 2014

Similar to @tsvetanYordanov, I fixed this problem by moving Haskell Platform\2014.2.0.0\mingw\binto appear before any MinGW- or Cygwin-related paths in the PATH variable.

@mac10688

This comment has been minimized.

Copy link

mac10688 commented Apr 16, 2015

While researching this issue this page kept coming up for me so I'll document my solution for future searchers. I had another gcc in the path (\Programming\IDEs\GnatStudio\bin;) that it was hitting. I guess it was the wrong kind of gcc and something was failing. I removed that from the environment path and everything started working.

To find the issue I had to use - v3 as mentioned above but also, unless I overlooked something, had to clear my tempdata. Then the message was more clear.

@pawelsawicz

This comment has been minimized.

Copy link

pawelsawicz commented May 5, 2015

Had same issue.

I was having Cabal 1.18.x then I updated it by cabal install cabal-install --global and it is working now.
Problem occurred, when I was trying to cabal install alex happy yesod-bin via http://www.yesodweb.com/page/quickstart

@CThuleHansen

This comment has been minimized.

Copy link

CThuleHansen commented Jul 9, 2015

I am having this issue, how do I solve it for win64?

@randen

This comment has been minimized.

Copy link
Contributor

randen commented Jul 9, 2015

CThuleHansen, there seem to be a couple of problems tangled in this one issue, so it is not clear to me which problem here you might be having. Could you review the various problems above and see which one it is that you are having, and possibly try some of the noted work-arounds mentioned in this issue, or please submit a new issue if you are having a problem that sounds like the title of this issue but has different details.

@CThuleHansen

This comment has been minimized.

Copy link

CThuleHansen commented Jul 9, 2015

I downloaded the minimalist ghc and newest cabal.. so kind of abandoned it.
I think it might be tied to cabal 1.18.x. Might've worked witn install --global, but I was not interested in that

@dom96

This comment has been minimized.

Copy link

dom96 commented Jul 29, 2015

Same problem here. No time to investigate unfortunately, I will attempt to install 32bit instead.

@emilbaek

This comment has been minimized.

Copy link

emilbaek commented Aug 13, 2015

Had the same problem. Look if you have gcc installation in your path other than the one that comes with Haskell in my case it was mingw.

@ghost

This comment has been minimized.

Copy link

ghost commented Aug 26, 2015

Thanks @emilbaek !

@23Skidoo

This comment has been minimized.

Copy link
Member

23Skidoo commented Aug 26, 2015

Look if you have gcc installation in your path other than the one that comes with Haskell in my case it was mingw.

This should be fixed in latest cabal-install (and therefore, latest HP).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.