-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Unable to build on SheevaPlug (ARM) #2131
Comments
At this point, I'm stuck. current build process
|
Can you try this patch? It seems v8 needs some guidance on what platform to build for. diff --git a/common.gypi b/common.gypi
index 0a4183b..3db618b 100644
--- a/common.gypi
+++ b/common.gypi
@@ -6,6 +6,7 @@
'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds
'component%': 'static_library', # NB. these names match with what V8 expects
'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way
+ 'v8_target_arch%': '<(target_arch)',
},
'target_defaults': { |
No change, I'm afraid. |
Okay, you'll have to play around with it. v8_target_arch is the key here, deps/v8/tools/gyp/v8.gyp depends on it being set to "arm" to compile the right sources. |
Should options.gypi be setting |
arm
armv5t? Yes. |
I changed
(same result with and without the extra flags on the Current patch is here. I've tried a few different variations of |
I was able to build the latest stable (v0.6.6) on Debian squeeze running in an ARM emulator. I passed Afterwards, I copied the example http server located here http://nodejs.org/docs/v0.2.5/api.html, and tested it:
I'm not sure if that will help with your build, but I thought I would share my experience. |
@philcali can you post the exact steps you took to get it v0.6.6 to build on ARM? |
Absolutely.
|
@philcali I get this error on
Which version of debian are you running? |
I'm running debian squeeze (running in ARM versatile mode, I should mention). When I run a
On a slightly different note, I used this exact emulator with similar build instructions to build a working node executable (v0.6.6) for my android tablet (2.6.36 armv7a device). The steps I used for that is a little bit more complicated and hackish, though. |
I followed @philcali's instructions and was able to build v0.6.6 on a Sheevaplug. Great progress! |
Works perfectly on my Sheevaplug :) |
Sure thing, @paulisimo:
|
Hi Everyone! I've been trying to build node on a Phidget board (emdebian, ARM) for a while now and @philcali has the best/closest guide I've found so far, but I'm still unable to get though
Some additional steps I've needed to add:
I can get though
Any advice?! More details to my install procedure are here [[ https://gist.github.com/1574158 ]] |
@evantahler: You're probably running out of memory, gcc doesn't handle that well. |
@bnoordhuis Thanks for the idea. Some of my earlier problems (not listed here) were due to running out of ram with GCC. That lead me to add a lot of swap space to the system. I've run |
@evantahler On such a constrained system, you might really benefit from setting up a cross-compiler toolchain on a more powerful computer… |
I have finally got 0.6.7 to build and install on sheevaplug. All worked ONCE i had done a full apt-get update / upgrade. Just updating via aptitude was not enough (having 2 package managers the same but different is something i don't fully understand) Anyhow following @philcali process worked once everything was updated. Thanks to @blalor & @jurriaan for your support. |
Why can't this be fixed upstream? |
If by upstream you mean Node or V8, we take patches for Node. V8's issue tracker is here. Alternatively, someone could set up a repo with prepackaged ARM debs. |
Progress!
My steps are all here: https://gist.github.com/1574158 Any advice? |
@evantahler: Run it through gdb and check what the offending instruction is.
|
@bnoordhuis good idea! (and thank you for taking the time to help!) I've copied the whole decompile trace here [[ https://gist.github.com/1574158 ]], but it looks like the source of the problem is:
That seems like a pretty basic operation, so I'm wondering if something went wrong with float flags (everything should have been compiled with software floating point [ softfp ]). |
It sure looks that way. You may need to specify |
Thanks to this comment - With these modifications it went well further. Now I think its nearly completed (35/35). I try to compile 0.6.7 on arm of my synology DS409. Now I get following error, any suggestions? root@srv-dionysius: /root/joyent-node-a9453ba # make
Waf: Entering directory `/root/joyent-node-a9453ba/out'
DEST_OS: linux
DEST_CPU: arm
Parallel Jobs: 1
Product type: program
[35/35] cxx_link: out/Release/src/node_main_5.o out/Release/src/node_5.o out/Release/src/node_buffer_5.o out/Release/src/node_javascript_5.o out/Release/src/node_extensions_5.o out/Release/src/node_http_parser_5.o out/Release/src/node_constants_5.o out/Release/src/node_file_5.o out/Release/src/node_script_5.o out/Release/src/node_os_5.o out/Release/src/node_dtrace_5.o out/Release/src/node_string_5.o out/Release/src/node_zlib_5.o out/Release/src/timer_wrap_5.o out/Release/src/handle_wrap_5.o out/Release/src/stream_wrap_5.o out/Release/src/tcp_wrap_5.o out/Release/src/udp_wrap_5.o out/Release/src/pipe_wrap_5.o out/Release/src/cares_wrap_5.o out/Release/src/tty_wrap_5.o out/Release/src/fs_event_wrap_5.o out/Release/src/process_wrap_5.o out/Release/src/v8_typed_array_5.o out/Release/src/node_signal_watcher_5.o out/Release/src/node_stat_watcher_5.o out/Release/src/node_io_watcher_5.o out/Release/src/platform_linux_5.o out/Release/src/node_crypto_5.o out/Release/deps/http_parser/http_parser_3.o -> out/Release/node
/opt/bin/g++ Release/src/node_main_5.o Release/src/node_5.o Release/src/node_buffer_5.o Release/src/node_javascript_5.o Release/src/node_extensions_5.o Release/src/node_http_parser_5.o Release/src/node_constants_5.o Release/src/node_file_5.o Release/src/node_script_5.o Release/src/node_os_5.o Release/src/node_dtrace_5.o Release/src/node_string_5.o Release/src/node_zlib_5.o Release/src/timer_wrap_5.o Release/src/handle_wrap_5.o Release/src/stream_wrap_5.o Release/src/tcp_wrap_5.o Release/src/udp_wrap_5.o Release/src/pipe_wrap_5.o Release/src/cares_wrap_5.o Release/src/tty_wrap_5.o Release/src/fs_event_wrap_5.o Release/src/process_wrap_5.o Release/src/v8_typed_array_5.o Release/src/node_signal_watcher_5.o Release/src/node_stat_watcher_5.o Release/src/node_io_watcher_5.o Release/src/platform_linux_5.o Release/src/node_crypto_5.o Release/deps/http_parser/http_parser_3.o -o /root/joyent-node-a9453ba/out/Release/node -lz -pthread -rdynamic /root/joyent-node-a9453ba/out/Release/libv8.a /root/joyent-node-a9453ba/out/Release/deps/uv/uv.a -L/opt/lib -L/usr/lib -L/usr/local/lib -Wl,-Bdynamic -lssl -lcrypto -ldl -lutil
Release/src/platform_linux_5.o: In function `node::Platform::GetUptimeImpl()':
/root/joyent-node-a9453ba/out/../src/platform_linux.cc:303: undefined reference to `clock_gettime'
/root/joyent-node-a9453ba/out/../src/platform_linux.cc:303: undefined reference to `clock_gettime'
/root/joyent-node-a9453ba/out/Release/deps/uv/uv.a(linux.o): In function `uv_hrtime':
/root/joyent-node-a9453ba/out/Release/deps/uv/src/unix/linux.c:136: undefined reference to `clock_gettime'
/root/joyent-node-a9453ba/out/Release/deps/uv/uv.a(ares__timeval.o): In function `ares__tvnow':
/root/joyent-node-a9453ba/out/Release/deps/uv/src/ares/ares__timeval.c:48: undefined reference to `clock_gettime'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_sa_restorer_v2@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_sa_restorer_v1@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_rt_sa_restorer_v2@GLIBC_PRIVATE'
/opt/lib/gcc/arm-none-linux-gnueabi/4.2.3/../../../../arm-none-linux-gnueabi/lib/libpthread.so: undefined reference to `__default_rt_sa_restorer_v1@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
Waf: Leaving directory `/root/joyent-node-a9453ba/out'
Build failed: -> task failed (err #1):
{task: cxx_link node_main_5.o,node_5.o,node_buffer_5.o,node_javascript_5.o,node_extensions_5.o,node_http_parser_5.o,node_constants_5.o,node_file_5.o,node_script_5.o,node_os_5.o,node_dtrace_5.o,node_string_5.o,node_zlib_5.o,timer_wrap_5.o,handle_wrap_5.o,stream_wrap_5.o,tcp_wrap_5.o,udp_wrap_5.o,pipe_wrap_5.o,cares_wrap_5.o,tty_wrap_5.o,fs_event_wrap_5.o,process_wrap_5.o,v8_typed_array_5.o,node_signal_watcher_5.o,node_stat_watcher_5.o,node_io_watcher_5.o,platform_linux_5.o,node_crypto_5.o,http_parser_3.o -> node}
make: *** [program] Error 1
root@srv-dionysius: /root/joyent-node-a9453ba # |
@dionysius: With what kernel and glibc version is this? |
Hey @dionysius Using the instructions you linked led me to a similar (indeterminate) error. That's why I took the route of making my changes at the shell level rather than just in the v8 scripts. It looks like you too might be having the same issues where you can get though the v8 compilation, but not node itself. Hopefully my notes above and this https://gist.github.com/1574158 might help |
@bnoordhuis (I'm unsure about the first one | how to find that out?) root@srv-dionysius: /root/joyent-node-a9453ba # ipkg list_installed | grep libc-dev
libc-dev - 2.5-5 - libc development files.
root@srv-dionysius: /root/joyent-node-a9453ba # uname -a
Linux srv-dionysius 2.6.32.12 #1955 Sat Nov 26 14:50:54 CST 2011 armv5tel GNU/Linux @evantahler I will try this. For me it looks really complicated. Lets see what I can figure out and try myself |
@dionysius: glibc 2.5 is positively ancient (as in: over five years old by now). I could probably add a workaround for |
@bnoordhuis you're completely right. I think its waste of time to make a workaround for that. Either my source gets updated or i'll compile that to from scratch. Until then, my issuepart is abandoned. I'll comment once I've more. |
I just wanted to add my thanks to @philcali, his instructions allowed me to build node v0.6.9 on a trimslice (ARMv7). What a great, clear well-written post - thanks, Phil! |
I'm still having problems with |
Ok, so that flag made no difference on some of the math
I guess this is an upstream issue as building the V8 shell results in the same issue. |
@davidarkemp: It's a known V8 bug / toolchain issue: http://code.google.com/p/v8/issues/detail?id=1446 |
2 ^ 3 ^ 4 is the xor operation (https://developer.mozilla.org/en/JavaScript/Reference/Operators/Operator_Precedence), not the exponentiation operation. 0010 ^ 0011 => 0001, 0001 ^ 0100 => 0101. |
@MidLifeXis - my mistake. thanks |
Nice work by everyone here coming up with some solutions and documenting the various issues. I've been down the various roads myself. I agree with comment from @evantahler #2131 (comment) . How can we get something in place with so that we can get the issue assigned and closed ? |
In the process of updating my sheevaplug i decided to rebuild debian on a much larger sd card 2gb -- 16gb to handle putting a rails et al on there. That's all gone fairly well, but once again the nodejs install is a dog. I have been cloning it out of git and getting a lot of this...
This is including @philcali's Having better luck NOT using the git version and using wget instead. Just in case anyone is suffering as I have. |
Following philcall 's instructions I have tried passing
Here is my current system info:
|
@michaelcdillon: You can find the list of architecture names in |
@bnoordhuis Thanks so much! Sorry I'm quite new to this embedded stuff. |
On Sat, Jun 2, 2012 at 7:29 AM, seashorexxx
What does |
@bnoordhuis: Thank you for your reply. Sorry for that I could install node-v6.1.8 successfully and it works without error, then I deleted my post. Thank you gain. |
On Sun, Jun 3, 2012 at 2:13 AM, seashorexxx
No problem. Glad you got it fixed. |
I've tried all of the solutions here, but the Issue above, #3382 still persists. |
The problem is mainly that each ARM device is different in subtle ways, we can't test them all. Either send hardware our way or fix the issue yourself and forward the patch. |
Folks, curious for those still having troubles, have you explored getting off Debian/ARM7 or Ubuntu/ARM7 and onto a distro that both supports your hardware and maintains current packages for Node.js? I can recommend ArchLinuxARM for a variety of PlugComputer platforms ARM5 based, and additionally some non-plugcomputer devices ARM7 based. The guys on the project are into Node and keep a current package as soon as a new release hits the streets. I realize this isn't a solution for anyone who is building their own firmware or stuck on something like the Debian that ships with Plugs, but it is a viable option for people willing to try out some new firmware. Current release |
I have a sheevaplug with debian squeeze. I previously got a 0.6.7-ish node (I'm afraid I can't remember which version exactly) to compile and run without problems, and recently tried to upgrade to 0.8.x. The build works with the following:
however, running
This happens even on the latest checkout of the v0.8 branch (beb7425). Any ideas what I could be doing wrong here? |
@bwrrp Hook up the failing tests to gdb: |
System config info: https://gist.github.com/509ed97da39c52fca1fe#file_0_sysinfo.txt
I'm building from master (cf2ee19).
Initial
make
after configure fails: https://gist.github.com/509ed97da39c52fca1fe#file_4_compile_output.txtPer @bnoordhuis's comment on #1566 I ran:
The build now fails like this:
The text was updated successfully, but these errors were encountered: