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

"Argument list too long" error occurs when building a package with a large dependency set #132

Open
ixmatus opened this issue May 10, 2018 · 1 comment · May be fixed by #136
Open

"Argument list too long" error occurs when building a package with a large dependency set #132

ixmatus opened this issue May 10, 2018 · 1 comment · May be fixed by #136
Labels

Comments

@ixmatus
Copy link
Collaborator

ixmatus commented May 10, 2018

Upstream unsets only NODE_PATH:

... but not NIX_LDFLAGS.

With a large number of deps, these env vars (NODE_PATH and NIX_LDFLAGS) can grow quite large (>128k), such that leaving them exported and attempting to invoke shell commands can lead to misleading "Argument list too long" errors, which actually indicate that kernel-limited env space has been exceeded.

We patch nixfromnpm to unset NIX_LDFLAGS but we think a better solution would instead use something like passAsFile instead of exporting the environment variables.

@ixmatus ixmatus added the bug label May 10, 2018
@adnelson
Copy link
Owner

To be honest I’ve never used passAsFile and am not sure what would be needed to get that to work. Do you think you could make a PR? In any case it might be good to have a test case for this (although it might by necessity take a long time to run).

ixmatus added a commit to ixmatus/nixfromnpm that referenced this issue May 18, 2018
I suspect this doesn't correctly fix adnelson#132 but I did want to open a PR
with our (Awake Security) temporary workaround so that anyone else
with this problem can find the temporary solution and so that we can
discuss whether this suffices or if we want to approach solving this
with the suggested `passAsFile` approach.

Credit for this workaround goes entirely to @intractable (Joel
Stanley).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants