-
Notifications
You must be signed in to change notification settings - Fork 29.1k
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
Build fails when the path to the build root is too long #9137
Comments
The patch looks okay to me. Maybe not great but it's not terrible either. We would have rejected it in the past due to our 'upstream first' policy but in the case of gyp that has been relaxed somewhat since upstream has largely abandoned it, effectively making us the maintainers. You should file a pull request if you want to see the patch merged. I can't guarantee it actually gets merged but we will at least consider it, it won't be rejected outright. I wonder though, what does |
Should I open a PR against the node repo, node-gyp, or both? |
That's only with really old kernels, though. On non-ancient kernels it's capped at 1/4th of the stack size.
The length of a single argument is restricted to 128 kB but that shouldn't be a problem because you're never going to have a path that long.
node |
Unfortunately, the patch I found doesn't work after all. I'll send PR as soon as I've found a working solution. |
Some build targets (especially the embedded OpenSSL) would use very long ar command lines (in the case of OpenSSL, containing more than 600 object files). This would often exceed the argument list limit for common stack size settings when building in directories with long paths. Fix this by writing the object list to a file first and referring to it in the ar command. Based-on-patch-by: Amy Fong <amy.fong@windriver.com> Fixes: nodejs#9137
I've reworked the patch from OpenEmbedded for my own needs and it works fine with version 4.4.3. |
Known nodejs bug[1] has proposed fix [2] applied directly here. [1] nodejs/node#9137 [2] https://github.com/riedonetworks/meta-nodejs/commits/dora/recipes/nodejs/files/0001-fix-execvp-printf-argument-list-too-long.patch Author: Kazuhiko Shiozaki <kazuhiko@nexedi.com> Date: Fri Apr 14 13:28:30 2017 +0200 component/perl-Encode-HanExtra: call shebang enc2xs script directly. perl/bin/enc2xs can be a shell script that calls enc2xs.shebang so we cannot call it explicitly with perl like "/path/to/perl /path/to/enc2xs" but simply calling "/path/to/enc2xs" is enough and safe.
Known nodejs bug[1] has proposed fix [2] applied directly here. [1] nodejs/node#9137 [2] https://github.com/riedonetworks/meta-nodejs/commits/dora/recipes/nodejs/files/0001-fix-execvp-printf-argument-list-too-long.patch
This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that. |
But is it fixed? "inactive" could just mean that nobody with the ability to do anything about the issue is willing to do anything. That doesn't mean it's actually fixed though. |
No, it is not fixed.
In this case, I think it means exactly that along with:
That's correct. Believe me, if I could have closed this with "Fixed!" instead of "This issue has been inactive," I totally would have done that. I promise! 😆 Mostly what this needs is someone with the interest and the time to write a fix that will not be a maintenance burden or code smell. I suspect if you or anyone else were inclined to give it a try, we can find an experienced contributor on the project (perhaps @bnoordhuis?) who would be willing to answer questions that arise, review code after its written, and generally provide reasonable amounts of assistance. Since obviously this is still causing problems for some small-but-very-real number of users, I'll re-open it and add a |
#9141 shows fixing this in GYP is not exactly trivial. A one-liner that sets That said, if you hit this issue while building node.js, you'll probably hit it sooner or later with another project too. |
@bnoordhuis Perhaps we can consider this a documentation issue and add a note to a troubleshooting guide (or even right in BUILDING.md) explaining what to do when it arises? |
Note that setting |
Met the same problem today.
I dont need node-v4.4.5 package, but I dont know where to disable it. I unkecked all .js from menuconfig. Changed root directory from: And that solved my problem :) |
…ry path Add the patch: https://github.com/NeoRaider/node/commit/56342b1d56e4270d1587e2e92f74a88e3802e866.patch from nodejs/node#9137 Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Should this issue remain open? As pointed out, there's really not much we can do in Node.js for this |
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
When statically linking quictls/openssl 3.0.0alpha17 there are a number of architectures that error with the following message: execvp: printf: Argument list too long This commit adds a patch provided in nodejs#9137 to see if this will address this issue. Refs: nodejs#9137 (comment)
this patch is awesome! the build works with 16 jobs. |
with this patch, shortening build 1:30 hours to 10 minutes |
@nxhack suggests, that i should instead of patching the build, just increase the build is runinng now. will let you if this modification is works. |
This is a different issue from what is being discussed in this thread. |
why is it different? |
As I pointed out elsewhere in my discussion with you, you need to separate the two events.
The need to increase file descriptors is only relevant for the latest binutils. |
gotcha. there are 2 issues here, one is the node build and the binutils... my binutils are lower. so that is not the problem for me. binutils-common/stable,now 2.35.2-2 amd64 [installed,automatic]
binutils-x86-64-linux-gnu/stable,now 2.35.2-2 amd64 [installed,automatic]
binutils/stable,now 2.35.2-2 amd64 [installed] |
Thank you. This fixes the issue "printf: Argument list too long" we have at build time with nodejs 16.x! |
Trying to build nodejs fails with the message
when the path to build directory is too long. We've hit this issue in OpenWrt/LEDE, but googling has turned up a lot of other people with the same issue.
I've found this patch to circumvent the issue in the OpenEmbedded patchwork: https://patchwork.openembedded.org/patch/72811/
Unfortunately, there is no further discussion and I have no idea why it is marked as superseded. I don't know the gyp code at all, so I can't tell if the patch is okay like this, but unconditionally using the filename
ar-file-list
seems a bit weird to me...The text was updated successfully, but these errors were encountered: