nodejs 0.10.x on yocto1.3

1,271 views
Skip to first unread message

Erwin Schaefer

unread,
Apr 2, 2013, 10:30:01 AM4/2/13
to nod...@googlegroups.com
Hello,

I'm trying to compile nodejs 0.10.x for the beaglebone (using the yocto1.3 branch of the angstrom "setup-scripts" repository)
As a baseline, I am using the nodejs_0.8.18.bb recipe available in the "recipes-devtools/nodejs" directory (I've just edited the .patch file). For information, node 0.8.18 builds fine under yocto 1.3.

However, compilation fails for nodejs 0.10.x:
[...]

/armcap.o ../deps/openssl/openssl/crypto/armcap.c
|   arm-angstrom-linux-gnueabi-gcc  -march=armv7-a     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8 --sysroot=/data/oe13/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/sysroots/beaglebone '-DL_ENDIAN' '-DPURIFY' '-D_REENTRANT' '-DOPENSSL_NO_HEARTBEATS' '-DOPENSSL_NO_ASM' '-DENGINESDIR="/dev/null"' '-DOPENSSLDIR="/etc/ssl"' '-DTERMIOS' -I../deps/openssl -I../deps/openssl/openssl -I../deps/openssl/openssl/crypto -I../deps/openssl/openssl/crypto/asn1 -I../deps/openssl/openssl/crypto/evp -I../deps/openssl/openssl/crypto/md2 -I../deps/openssl/openssl/crypto/modes -I../deps/openssl/openssl/crypto/store -I../deps/openssl/openssl/include  -Wall -Wextra -Wno-unused-parameter -pthread -Wno-missing-field-initializers -Wno-old-style-declaration -O2 -fno-strict-aliasing -fno-tree-vrp  -MMD -MF /data/oe13/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.10.2-r0/node-v0.10.2/out/Release/.deps//data/oe13/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.10.2-r0/node-v0.10.2/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/armcap.o.d.raw -O2 -pipe -g -feliminate-unused-debug-types -c -o /data/oe13/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.10.2-r0/node-v0.10.2/out/Release/obj.target/openssl/deps/openssl/openssl/crypto/armcap.o ../deps/openssl/openssl/crypto/armcap.c
| make[1]: execvp: printf: Argument list too long
| make[1]:
| make[1]: execvp: printf: Argument list too long
| make[1]: *** [/data/oe13/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.10.2-r0/node-v0.10.2/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127
| *** [/data/oe13/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.10.2-r0/node-v0.10.2/out/Release/obj.target/deps/openssl/libopenssl.a] Error 127
| make[1]: Leaving directory `/data/oe13/setup-scripts/build/tmp-angstrom_v2012_12-eglibc/work/armv7a-vfp-neon-angstrom-linux-gnueabi/nodejs-0.10.2-r0/node-v0.10.2/out'

[...]

When I use the same recipe (and ajust the patch file, to remove a "-rdynamic" flag in common.gypi and add an "'arm-neon%': 1" in the variables in deps/v8/build/common.gypi), it builds OK in the "master" branch of "setup-scripts".

I'm not aware of how yocto1.3 differs from "master" in terms of compile / build, but there may be something in nodejs 0.10.x build environment that yocto1.3 doesn't like.

Have you got any ideas?

Thanks in advance,

Erwin

Erwin Schaefer

unread,
May 22, 2013, 12:45:52 PM5/22/13
to nod...@googlegroups.com
Hello,

I contacted Martin Jansa (maintaining nodejs recipes on openembedded), and he could build nodejs 0.10.x perfectly on his machine.

Then, I ran into this stackoverflow post, where a person runs into the same problem (linking libopenssl.a, but on Centos 6.3), with the same error message ("argument list too long")

http://stackoverflow.com/questions/16012280/error-during-nodejs-installation-on-centos-6-3

For the record, I can build nodejs 0.10.x perfectly on my Fedora 18 machine.

Could nodejs build fail in specific environments?

Thanks for your hints,

Best regards,

Erwin

mscdex

unread,
May 22, 2013, 1:29:19 PM5/22/13
to nodejs
On May 22, 12:45 pm, Erwin Schaefer <mamahuhusoftw...@gmail.com>
wrote:
> Could nodejs build fail in specific environments?

I would compare versions of make, bash, and coreutils (especially the
last two) in the places where it works and doesn't work.

Ben Noordhuis

unread,
May 22, 2013, 2:04:17 PM5/22/13
to nod...@googlegroups.com
Try raising `ulimit -s` unless your kernel is < 2.6.23, in that case
you're out of luck.

On Linux, the maximum size of the argument list is 25% of the stack
size. The default stack size on most server/desktop systems is 8192
kB but it's probably less (maybe a lot less) on embedded systems.

Erwin Schaefer

unread,
May 23, 2013, 5:35:26 AM5/23/13
to nod...@googlegroups.com
Hello, and thanks for your inputs.

I've tried to rise ulimit -s to the maximum possible (i.e. 16384 on my Fedora 18 x86-64), but to no avail.
I guess openembedded (which runs on my Fedora 18) uses a reasonnable stack size for building, if not the "ulimit -s" one (have to check). After all, it is for this reason that we cross-compile!

When branch "master" of openembedded switched to yocto 1.3/gcc 4.7, a lot of extra tune features began appearing in the compile lines (at least for my target, the beaglebone). And since openssl seems to use more than 600 source files, I can understand that this may overflow the size of the argument list...

Best regards,

Erwin





--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com
To unsubscribe from this group, send email to
nodejs+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

---
You received this message because you are subscribed to a topic in the Google Groups "nodejs" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nodejs/D6Xzd4OHV-o/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to nodejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



nicova...@gmail.com

unread,
Feb 6, 2014, 10:35:25 AM2/6/14
to nod...@googlegroups.com
Hi all,

I was trying to compile node-js for Intel Quark architecture, using Yocto when I got the same error.
Indeed, it's quite explicit and a simple way to avoid an argument list too long is to reduce path length.
To solve my problem, I renamed a folder, whose name was 50 character long...
And of course, it works now.

About the initial post, I see two long paths, they could be shorten, renaming or using links maybe.
This answer comes late, but it could help people who still need that tip.

Nicolas
Reply all
Reply to author
Forward
0 new messages