-
Notifications
You must be signed in to change notification settings - Fork 7.3k
node build on arm fails during mksnapshot execution #1566
Comments
I submitted an upstream bug for this at http://code.google.com/p/v8/issues/detail?id=1632 |
Jeroen, two things you'll want to check:
There was a post on the mailing list where this was hashed out but apparently my google fu is weak today because I can't find it. The guy was building for a sheevaplug and ran into the same issue as you. |
I'm following the instructions at http://stackoverflow.com/questions/6788768/cannot-build-node-on-sheevaplug-armv5t-with-debian-squeeze at the moment and am rebuilding as we speak. |
mksnapshot crashes with the following stacktrace: Program received signal SIGILL, Illegal instruction. 0x001ffb44 in v8::internal::ArmUsingHardFloatHelper () (gdb) bt #0 0x001ffb44 in v8::internal::ArmUsingHardFloatHelper () #1 0x00201294 in v8::internal::OS::Setup () #2 0x00284970 in v8::internal::V8::InitializeOncePerProcess () #3 0x00284a04 in v8::internal::V8::Initialize () #4 0x00033474 in v8::Context::New () #5 0x0000ac60 in main () v8 compilation is currently using -mfloat-abi=softfp, instead of "soft" (since the device does not actually have an fpu). trying again. |
@japj: can you test the below feature detection patch? diff --git a/deps/uv/src/ev/config_linux.h b/deps/uv/src/ev/config_linux.h
index b147b59..a13b179 100644
--- a/deps/uv/src/ev/config_linux.h
+++ b/deps/uv/src/ev/config_linux.h
@@ -2,12 +2,7 @@
/* config.h.in. Generated from configure.ac by autoheader. */
#include <linux/version.h>
-
-#define LINUX_VERSION_CODE_FOR(major, minor, patch) \
- (((major & 255) << 16) | ((minor & 255) << 8) | (patch & 255))
-
-#define LINUX_VERSION_AT_LEAST(major, minor, patch) \
- (LINUX_VERSION_CODE >= LINUX_VERSION_CODE_FOR(major, minor, patch))
+#include <features.h>
/* Define to 1 if you have the `clock_gettime' function. */
/* #undef HAVE_CLOCK_GETTIME */
@@ -18,14 +13,26 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#define HAVE_DLFCN_H 1
-/* Define to 1 if you have the `epoll_ctl' function. */
+/* epoll_ctl(2) is available if kernel >= 2.6.9 and glibc >= 2.4 */
+#if LINUX_VERSION_CODE >= 0x020609 && __GLIBC_PREREQ(2, 4)
#define HAVE_EPOLL_CTL 1
-
-/* Define to 1 if you have the `eventfd' function. */
-#define HAVE_EVENTFD LINUX_VERSION_AT_LEAST(2, 6, 22)
-
-/* Define to 1 if you have the `inotify_init' function. */
-#define HAVE_INOTIFY_INIT LINUX_VERSION_AT_LEAST(2, 6, 13)
+#else
+#define HAVE_EPOLL_CTL 0
+#endif
+
+/* eventfd(2) is available if kernel >= 2.6.22 and glibc >= 2.8 */
+#if LINUX_VERSION_CODE >= 0x020616 && __GLIBC_PREREQ(2, 8)
+#define HAVE_EVENTFD 1
+#else
+#define HAVE_EVENTFD 0
+#endif
+
+/* inotify_init(2) is available if kernel >= 2.6.13 and glibc >= 2.4 */
+#if LINUX_VERSION_CODE >= 0x02060d && __GLIBC_PREREQ(2, 4)
+#define HAVE_INOTIFY_INIT 1
+#else
+#define HAVE_INOTIFY_INIT 0
+#endif
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
@@ -60,8 +67,12 @@
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
-/* Define to 1 if you have the `signalfd' function. */
-#define HAVE_SIGNALFD LINUX_VERSION_AT_LEAST(2, 6, 22)
+/* signalfd(2) is available if kernel >= 2.6.22 and glibc >= 2.8 */
+#if LINUX_VERSION_CODE >= 0x020616 && __GLIBC_PREREQ(2, 8)
+#define HAVE_SIGNALFD 1
+#else
+#define HAVE_SIGNALFD 0
+#endif
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1 |
@bnoordhuis if I remember correctly the above patch worked (we talked about this on IRC a while ago). However, it does not yet solve the 'v8 mksnapshot' issue for arm. |
waf is going away Real Soon Now but we'd probably take a gyp patch. Ping back in a couple of days when the gyp stuff (hopefully!) has landed. |
The improved feature detection patch landed in joyent/libuv@0ba44cf. |
any updates @japj or @bnoordhuis? |
Master on ARM builds fine for me. Cross-compiling is still troublesome but that's a toolchain issue. |
For v8 I am currently overruling CCFLAGS with -march=armv5t and armabi:'soft' (this defaults to 'softfp'). I think if this is available through a commandline option to configure-gyp then we can close this issue. |
I think we can close this one. The great thing about gyp is that it generates plain Makefiles that respect CFLAGS and CXXFLAGS. So you run |
@bnoordhuis, as stated, that make command doesn't work, at least with bash. Slightly better, on two lines (which may be what you intended)
However, this still doesn't work for me in v0.6.0. It looks like modifying |
Try it with master, we've replaced waf and scons with gyp now. |
With or without the make flags? ie. should the build system detect the correct flags, or is the override still required? |
With. The configure script doesn't yet honour the CFLAGS and CXXFLAGS environment variables and we can't add a 'does this processor support floating point?' check, it would fail when cross-compiling. |
Hm, I can't start the build. My master is cf2ee19. |
Right, that's one of the TODOs, strip out the -m32 switches from the *.gypi files (probably not that blunt, I want to make it a conditional for the sake of cross-compiling). Until that's fixed, |
https://gist.github.com/509ed97da39c52fca1fe#file_4.1_compile_output.txt Should this be a new issue? |
Yes, please. You can probably hack around it for now by updating the host_arch and target_arch variables in $REPO_ROOT/options.gypi. |
I have a synology DS211j that I am trying to compile node (latest master) on.
Unfortunately this fails during the mksnapshot part of the v8 build with an "Illegal instruction".
The text was updated successfully, but these errors were encountered: