-
Notifications
You must be signed in to change notification settings - Fork 88
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
execvp:printf: Argument list too long #9
Comments
Openssl bundled with Node.js source is sometimes causing compilation issues. This is the reason some earlier Node.js releases were actually not built with the bundled openssl and instead linked to shared libopenssl on the target system. Two were built separately and just had package dependency properly set. However, recent Node.js and io.js releases have been building just fine. This applies also to v4.0.0. This error is more an issue of your build host system than the target platform, Node.js itself or the bitbake recipe used. I can confirm that Node.js 4.0.0 bitbake compilation works with x86_64 Ubuntu 14.04 LTS build host and Yocto 1.8 builds. On that platform, there are no issues with long argument lists. If you are using older Yocto (or Yocto based) releases, I can only suggest that you upgrade your build environment. There is one easy thing you should check though: Yocto buildsystems often prefer that the default shell on the build host is set to Other solution is to introduce a conditional which allows building Node.js recipe without bundled openssl and with libopenssl package dependency. I have not (yet) implemented that option into Nodej.s bb recipes. |
Hi Imyller, |
Glad to help. I'm closing this issue as resolved. |
I've still git this error on up to date Linux Mint and Ubuntu installs. There seem to be some sort of patch that might be of help fixing this issue: |
The patch linked applies to ancient Node.js 0.8. I'd suggest you try compiling with recent meta-nodejs and Node.js 4.x or 5.x recipes. |
@imyller I can compile your recipes without any patch or problems when I do it right on top of /. But it fails when I do it on top of my home directory. I mentioned the patch because it might help. But I wasn't able to apply it. |
The real path length issue is with bundled OpenSSL. You can opt to build Node.js recipe with shared OpenSSL using http://www.yoctoproject.org/docs/2.0/ref-manual/ref-manual.html#var-PACKAGECONFIG |
Until now the only way to make this reliably work is by using external OpenSSL. @imyller Maybe we should make the shared OpenSSL the default. The downside would be that who are using older OE versions that don't include OpenSSL 1.0.2 need to disable is explicitly. |
Hello, @imyller if you think it is worth it I can prepare a pull request. |
Any update on this issue? I tried to manually apply the patch provided by @armandciejak to Node 6.3.0 but now I get a "name too long" error. |
I can only recommend to use the OpenSSL bundled with OE instead of the internal one. |
I agree with @bachp Node.js internal OpenSSL has build issues with systems having limited path and/or command line length; especially when OE build path is already long and includes spaces. I haven't yet found simple all-around solution to this and the same issue has been seen outside OE builds too for Node. For my build servers to prevent path related build errors, I use shortest OE path possible (for example |
@imyller : ( sorry for my poor preparation on bitabke & C.) how you do to ".. and use OE openssl instead of Node.js internal." ? PACKAGECONFIG[zlib] = "--shared-zlib,,zlib" " |
Firstly, no - you do not have to modify any The error is caused by too long command line being run in Node.js internal OpenSSL compilation (several hundred source files with full path in one command). It is not easily fixable as it only pops up with some peoples build machines and is dependent on their folder structure, distro version and other settings. At this time I do not have any more tips for you to try than:
sudo update-alternatives --install /bin/sh sh /bin/bash 100
or permanently with
My build servers have user
Docs: http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#var-PACKAGECONFIG For example PACKAGECONFIG_append = " openssl" or in your PACKAGECONFIG_append_pn-nodejs = " openssl" |
My initial tests trying to setup the usage of openssl as a shared library failed while building node 6.3.0, looks like there's a different problem with this. For the time being I just used the --wihtout-inspector option as a workarond to build node wihtout openssl at all (found the solution somewhere on internet) |
I'm probably adding For embedded systems this allows minimizing newest Node.js versions a bit if one does not require the V8 inspector features. I've found no problems when building Node.js without internal OpenSSL using |
Would you like to be more specific? Something that we can fix maybe? |
Im now finishing some other stuff and will have to rebuild node 6.3.0 in 2 or 3 days, will try to build node with shared openssl library and try to clarify my affirmation of "different problem". Sorry for the lack of precission, just did a quick testing a few days ago and build was crashing whilst it was building fine just using the "--wihtout-inspector" option. I'll keep you posted on progress/errors. |
@imyller : /bin/bahs: I use bash since times ago change path: unfortunately bitbake hates the changes of name of directories requesting another global rebuild. this will take 6 hours on my i5 ubuntu 14.04 ... I hope this is the last resource. sudo ulimit: this is simple and fast, I immediately do @jsolla: |
@mgiuncato Thanks. Waiting for your feedback. Generally I'd like to add most common customizations as |
Actually if you are using Ubuntu unmodified you have actually been using mostly bash compatible dash ( from |
For all interested: With todays release of Node.js v6.3.1 there is now new
By default V8 inspector is now disabled for Node.js 6.x builds, but this As usual, use of shared OpenSSL (disables building of internal OpenSSL) can be requested with For more information about how to configure |
i Will try changing with shorter path... stay tuned.. |
Ubuntu 14.04 LTS unmodified install: root@mgmt:~# ulimit -s
8192 You must have modified system default settings for program stack size to get root@mgmt:~# ulimit -Hs
unlimited |
@imyller |
@mgiuncato Good, because default unmodified Ubuntu install is defaulting to root@mgmt:~# readlink -f /bin/sh
/bin/dash |
Big THX for the information povided here! I ran into same issue today. Host: Ubuntu 16.04 LTS adding: |
I believe there is a way to solve this issue even with the bundled OpenSSL, at least on Linux.
To test it you can just create a bbappend file with the following content: I would be really glad if someone could test this solution and confirm it really works. By the way, sorry for bad english or any mistakes, still learning my way around github. |
@alvarez86 Thank you for researching the root cause of this issue! I think the solution to the problem is with modifying It's dangeous/hacky to build to unexpected location. It probably is not universal and won't work in all BitBake environments. Proper solution might be resolving short relative path (instead of absolute path) to build dir and providing that to |
@imyller, my solution does not work, it compiles, but then the installation fails, I still have to find out what's going wrong with it. I will try to see if there's some way to modify only the openssl build, perhaps dealing with the openssl.target.mk file, but I can't promise anything. |
I will register it here just so people can try it, but as @imyller has said, it probably isn't the right solution, Just set builddir_name to ., as in Good luck to anyone that tries this, please let me know how well it works. |
I'll definitely experiment with this. If the build succeeds it should be quite trivial to get install task working. |
Hi. I have the same problem.
in it. I'm using latest mesta-nodejs and meta-nodejs-contrib and I'm trying to build It fails on do_compile task. Any Idea how to fix this? |
@lewicki-pk Did you resolve the issue already: #55 (comment) ? |
More of a workaround than fix, but yes. If somebody gets here from google: change your yocto path to much shorter and this will do. I hope this will be fixed in the newer versions of nodejs and also backported to v6.. |
Not working |
Hi,
I have followed your steps for nodejs_4.0.0 but when I'm doing "bitbake node" it is is giving me the following error.
"Log data follows:
| DEBUG: Executing shell function do_compile
| make -C out BUILDTYPE=Release V=1
| make[1]: Entering directory
/yocto/pi2/poky/rpi-build/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/nodejs/4.0.0-r1.0/node-v4.0.0/out' | make[1]: execvp: printf: Argument list too long | make[1]: *** [/yocto/pi2/poky/rpi-build/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/nodejs/4.0.0-r1.0/node-v4.0.0/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127 | make[1]: Leaving directory
/yocto/pi2/poky/rpi-build/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/nodejs/4.0.0-r1.0/node-v4.0.0/out'| make: *** [node] Error 2
| WARNING: exit code 2 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /yocto/pi2/poky/rpi-build/tmp/work/cortexa7hf-vfp-vfpv4-neon-poky-linux-gnueabi/nodejs/4.0.0-r1.0/temp/log.do_compile.30379)
"
Please help me out to solve this issue as soon as possible.
Thanks ,
Krunal
The text was updated successfully, but these errors were encountered: