-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Large files within source tree causes build to run out of memory #358
Comments
As a workaround, you could use |
Bonus feature: hole detection to avoid spurious reads. |
I don't think there are many realistic use cases where a Nix source file contains holes... |
It would be nice if it printed out the file name |
Agreed, the file name would be most handy. |
We have 50 instances of |
Why does it even read the files into memory at once? I assume the hash can be computed with constant space. |
For the record, we found the cause: it was a |
Until this is fixed in Nix see https://nixos.org/wiki/How_to_add_files_to_the_nix-store#Large_files |
There might be permission problem. |
dead link, and it looks like this page does not exist on https://nixos.wiki/? |
Is there any way to make |
take a look at |
I think this is it, in case anyone lands here from google search. |
I am also experiencing this problem while trying to install Mathematica. Here's the old Wiki page on archive.org in case anyone else is searching for it: https://web.archive.org/web/20160829175307/https://nixos.org/wiki/How_to_add_files_to_the_nix-store |
This is addressed by #619. |
Looks as a solution for me: https://stackoverflow.com/a/39493330/3195266 |
If the size of a file or a sufficient number of files in a nix-build exceeds the amount of memory available, Nix runs out of memory and gives up. For example, given this simple build:
where huge.bin is a very huge file, nix will first warn:
before eventually running out of memory.
The above was tested with
The text was updated successfully, but these errors were encountered: