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

"stack setup" for GHCJS doesn't work on windows due to long paths #1145

Closed
mgsloan opened this Issue Oct 12, 2015 · 6 comments

Comments

Projects
None yet
5 participants
@mgsloan
Collaborator

mgsloan commented Oct 12, 2015

stack setup ought to work with GHCJS + windows now, but I'm running into issues due to long paths. In particularly, it fails during the install step with Setup.hs: does not exist, as it can't move C:\Users\Sloan\AppData\Local\Programs\stack\i386-windows\ghcjs-0.1.0.20150924_ghc-7.10.2\src\.stack-work\install\i386-windows\lts-3.6\7.10.2\lib\i386-windows-ghc-7.10.2\ghcjs-0.1.0.20150924-3v8gJrjhwSs4MId7xBHavX\libHSghcjs-0.1.0.20150924-3v8gJrjhwSs4MId7xBHavX.a to a different location.

What can we do to resolve this?

Maybe place the ghcjs source files relative STACK_ROOT? Then, if they take the suggestion to use the short one, maybe the paths will be short enough... (Though it's only C:\Users\Sloan\AppData\Local\Programs\stack\i386-windows\ vs C:\stack_root\programs...).

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Oct 12, 2015

We probably need to replicate some of the functionality in #1027 for snapshot databases.

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

mgsloan added a commit that referenced this issue Oct 16, 2015

@mantkiew

This comment has been minimized.

mantkiew commented Oct 16, 2015

I am getting a different error for ghcjs installation on Windows (10, 64bit):

PS C:\projects> stack setup ghcjs-0.1.0_ghc-7.10.2
Preparing to install GHCJS to an isolated location.
This will not interfere with any system-level installation.
No sha1 found in metadata, download hash won't be checked.
Downloaded ghcjs-0.1.0.20150924_ghc-7.10.2.
Already downloaded.
Already downloaded.
CreateDirectory "C:\\Users\\<user>\\AppData\\Local\\Programs\\stack\\i386-windows\\ghcjs-0.1.0.20150924_ghc-7.10.2\\src-tmp4796": does not exist (The system cannot find the path specified.)

This path does not seem to be exceeding the 260 characters limit (it's 120 long); however, why does it have \\ instead of \?

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Oct 18, 2015

@mantkiew Thanks for trying this out. I got that too while working on this, it's fixed in d7afc70 (the createTree part)

For me, stack setup now works on windows! Woohoo!

@mgsloan mgsloan closed this Oct 18, 2015

@snoyberg snoyberg removed the in progress label Oct 18, 2015

@mantkiew

This comment has been minimized.

mantkiew commented Oct 27, 2015

Unfortunately, is still does not work for me on Windows (using stack Version 0.1.7.0, Git revision feb57fa i386):

... lots of extracting
Extracting  ghcjs-0.1.0.20150924\include\prim\primop-primop-info-710.hs-incl

Everything is Ok

Folders: 22
Files: 111
Size:       80405075
Compressed: 80502784
C:\Users\<user>\AppData\Local\Programs\stack\i386-windows\ghcjs-0.1.0.20150924_ghc-7.10.2\src-tmp7892\ghcjs-0.1.0\: renameDirectory: does not exist (No such file or directory)

This happens only when doing stack setup OUTSIDE of a project (it fails on Ubuntu as well when outside of a project).

I works inside a project.

mgsloan added a commit that referenced this issue Oct 30, 2015

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Oct 30, 2015

@mantkiew Good catch! This was a stupid mistake, I was using the "wanted" version rather than the selected version for generating the folder name. I've pushed a commit fixing it: 193b285

@CMCDragonkai

This comment has been minimized.

CMCDragonkai commented Feb 14, 2017

You can increase the path size on windows to roughly 32,000 characters by turning on LongPathsEnabled in the registry. See: http://stackoverflow.com/a/42217537/582917

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment