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

add documentation on temporary directory and minimum size for ghc installation #429

Closed
trihella opened this issue Jun 26, 2015 · 3 comments
Milestone

Comments

@trihella
Copy link
Contributor

By default stack puts all its temporary stuff on /tmp on linux. When this directory has not enough space left (typically less than 1GB), stack setup fails on ghc installation (extraction after download) with a huge output like :

...
/usr/bin/tar: ghc-7.8.4/utils/compare_sizes : mkdir impossible: no space left
/usr/bin/tar: ghc-7.8.4/utils/compare_sizes/ghc.mk : open impossible: no such file or directory
/usr/bin/tar: ghc-7.8.4/utils/compare_sizes : mkdir impossible: ...
...

It can be reproduced it by creating a fake (a size limited, here roughly 500MB) tmp dir

$ dd if=/dev/zero of=~/fakefs bs=4096 count=122070 && \
    mkfs.ext4 ~/fakefs && \
    mkdir ~/tmp && mount ~/fakefs ~/tmp
$ TMPDIR=~/tmp stack setup

I spent some time to find the issue and had to run through the code to find out how to change the temporary directory. Then, it would be nice to find easily the following information :

  • The default temporary should have at least 1GB free (to contain extracted GHC)
  • Temporary directory can be changed by setting the environement variable by priority order ( see getTemporaryDirectory ):
    • TMPDIR
    • TMP
    • TEMP
    • USERPROFILE
@snoyberg
Copy link
Contributor

Since you've already looked into this and found the relevant information (thank you!), would you be able to add this as a FAQ entry? If you think there's a better place for this (perhaps Downloads?), that would be great too.

@snoyberg snoyberg added this to the 0.2.0.0 milestone Jun 27, 2015
@trihella
Copy link
Contributor Author

would you be able to add this as a FAQ entry ?

Done ! I think a FAQ entry is sufficient.

@snoyberg
Copy link
Contributor

Awesome, thanks!

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

2 participants