-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Cross compiled Node.js v4.4.5 LTS for ARM7, but node threw illegal instruction error #7343
Comments
Can you try this?
Please post the output of the disassemble command. |
Thank you so much for fast reply - Floating point emulationAt least one emulation must be selectedCONFIG_FPE_NWFPE is not setCONFIG_FPE_FASTFPE is not setCONFIG_VFP is not set./configure --without-snapshot --dest-cpu=arm --dest-os=linux --with-arm-float-abi=soft --with-arm-fpu=vfp --without-dtrace --without-etw /admin1-> ulimit -c unlimited warning: core file may not match specified executable file. warning: File "/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. warning: File "/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available. #0 0x4901e284 in ?? () |
I believe v8 has been requiring VFP when compiling for ARM for some time now. You may be out of luck. It's actually kind of rare to find an armv7 CPU without VFP (and NEON) these days. |
The offending instruction (vpush) is indeed a floating point instruction, so yes, looks like we've found the culprit. Brian is correct that FPU support is mandatory now. You could try installing a kernel with FPU emulation support but it's probably going to be unbearably slow. YMMV. Good luck. |
Hey Brian and Ben, |
@lijunqin You cannot compile V8 without VFP. Support for compiling without VFP was removed years ago, and even then that support wasn't thoroughly tested IIRC. |
Thank you so much for your time, Brian. Appreciate that - |
@lijunqin "Tweaking" v8 as far as removing the VFP requirement is probably not as easy as you're making it out to be, unless maybe you're already a v8 expert. Even if you managed to accomplish this, it means you'd have to maintain a (presumably non-trivial) patch on top of v8 going forward. IMHO a more feasible solution is to just obtain better hardware if you want to run node on ARM. |
@lijunqin I don't want to discourage you but you're up for a gargantuan task; it's not something you'll be able to accomplish in a few days, let alone hours. You could try building node.js v0.10. I think that version is old enough that it nominally supports nofpu mode but, like Brian says, it was never well-tested so YMMV. |
Big Thanks to Brian and Ben. |
Nope, that pretty much sums it up. IMO, the path of least resistance is to upgrade to VFP-capable hardware. |
Hello Ben and Brian,
CONFIG_FPE_NWFPE is not setCONFIG_FPE_FASTFPE is not setCONFIG_VFP is not set |
Sorry, that's a subject I don't know enough about to give informed advise. You may be able to get away with a user-space library that traps the SIGILL and emulates the instruction. I don't know of such a library for ARM, however. Interesting side project: it's probably relatively straightforward to write a library that offloads the actual emulation to compiler-rt. |
Hello Brian and Ben, |
@lijunqin after the end of life date the project will not be offering support or security updates. one of the biggest factors here is that the openssl branch the 0.x series relies on will be end of life, and will not be receiving updates. Due to that, we cannot in good faith continue to release the 0.x series of Node. TLDR; do not expect any support from the project after those dates |
Hello Ben, Brian and Myles |
@lijunqin It's not completely out of the question but it will be an ongoing cost for your company. The upstream V8 project has no interest in maintaining nofpu support so it would have to be maintained in perpetuity by whoever steps up, possibly out of tree if upstream does not want to accept the changes. If you're still interested, shoot me an email. My company (IBM) has the requisite expertise in-house, we maintain V8's s390 backend and co-maintain the ppc backend. |
Hello Ben, |
is there any one have way to do it? |
cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 1 (v7l)
BogoMIPS : 1594.16
Features : half thumb fastmult edsp tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x4
CPU part : 0xc09
CPU revision : 1
processor : 1
model name : ARMv7 Processor rev 1 (v7l)
BogoMIPS : 1598.25
Features : half thumb fastmult edsp tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x4
CPU part : 0xc09
CPU revision : 1
Hardware : NPCMX50 Chip family
Revision : 0000
Serial : 0000000000000000
node gets illegal instructions
/usr/bin/node
Illegal instruction (core dumped)
The /proc/cpuinfo does not show any FPU.
Is that the cause of this issue ?
How can I cross compile V4.4.5 without FPU ?
AS=arm-poky-linux-gnueabi-as
LDFLAGS=-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
AR=arm-poky-linux-gnueabi-ar
OECORE_TARGET_SYSROOT=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
TARGET_PREFIX=arm-poky-linux-gnueabi-
XDG_SESSION_ID=7634
M4=m4
HOSTNAME=G9-dfvsmdev-CentOS7
TERM=xterm
SHELL=/bin/bash
NM=arm-poky-linux-gnueabi-nm
HISTSIZE=1000
OECORE_DISTRO_VERSION=1.8
CPPFLAGS=
SSH_CLIENT=10.238.17.91 53798 22
PERL5LIB=/home/dfvsmdev/perl5/lib/perl5:
QTDIR=/usr/lib64/qt-3.3
OLDPWD=/home/dfvsmdev/workspace/natasha2dell/delldrb
QTINC=/usr/lib64/qt-3.3/include
PERL_MB_OPT=--install_base /home/dfvsmdev/perl5
SSH_TTY=/dev/pts/1
QT_GRAPHICSSYSTEM_CHECKED=1
OECORE_SDK_VERSION=1.8
GDB=arm-poky-linux-gnueabi-gdb
USER=dfvsmdev
PKG_CONFIG_SYSROOT_DIR=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
CXXFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -mfloat-abi=soft
CONFIG_SITE=/opt/poky/1.8/site-config-armv7a-poky-linux-gnueabi
CPP=arm-poky-linux-gnueabi-gcc -E -march=armv7-a --sysroot=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
CCACHE_PATH=/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:
MAIL=/var/spool/mail/dfvsmdev
PATH=/usr/bin:/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin:/opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi:/usr/lib64/qt-3.3/bin:/home/dfvsmdev/perl5/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/dfvsmdev/.local/bin:/home/dfvsmdev/bin
LD=arm-poky-linux-gnueabi-ld --sysroot=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
PWD=/home/dfvsmdev/workspace/natasha2dell/delldrb/node-v4.4.5
STRIP=arm-poky-linux-gnueabi-strip
LANG=en_US.UTF-8
MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
LOADEDMODULES=
KDEDIRS=/usr
OECORE_NATIVE_SYSROOT=/opt/poky/1.8/sysroots/x86_64-pokysdk-linux
CONFIGURE_FLAGS=--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
KCFLAGS=--sysroot=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
CXX=arm-poky-linux-gnueabi-g++ -march=armv7-a --sysroot=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HISTCONTROL=ignoredups
OBJCOPY=arm-poky-linux-gnueabi-objcopy
SHLVL=1
HOME=/home/dfvsmdev
CFLAGS= -O2 -pipe -g -feliminate-unused-debug-types -mfloat-abi=soft
PERL_LOCAL_LIB_ROOT=:/home/dfvsmdev/perl5
LOGNAME=dfvsmdev
QTLIB=/usr/lib64/qt-3.3/lib
SSH_CONNECTION=10.238.17.91 53798 10.238.25.57 22
OECORE_ACLOCAL_OPTS=-I /opt/poky/1.8/sysroots/x86_64-pokysdk-linux/usr/share/aclocal
MODULESHOME=/usr/share/Modules
PKG_CONFIG_PATH=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi/usr/lib/pkgconfig
LESSOPEN=||/usr/bin/lesspipe.sh %s
ARCH=arm
RANLIB=arm-poky-linux-gnueabi-ranlib
CROSS_COMPILE=arm-poky-linux-gnueabi-
CC=arm-poky-linux-gnueabi-gcc -march=armv7-a --sysroot=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
XDG_RUNTIME_DIR=/run/user/1000
DISPLAY=localhost:11.0
QT_PLUGIN_PATH=/usr/lib64/kde4/plugins:/usr/lib/kde4/plugins
OBJDUMP=arm-poky-linux-gnueabi-objdump
SDKTARGETSYSROOT=/opt/poky/1.8/sysroots/armv7a-poky-linux-gnueabi
PERL_MM_OPT=INSTALL_BASE=/home/dfvsmdev/perl5
BASH_FUNC_module()=() { eval
/usr/bin/modulecmd bash $*
}
_=/usr/bin/env
[dfvsmdev@G9-dfvsmdev-CentOS7 node-v4.4.5]$ ./configure --without-snapshot --dest-cpu=arm --dest-os=linux --with-arm-float-abi=soft --with-arm-fpu=vfp --without-dtrace --without-etw
creating ./icu_config.gypi
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'arm_float_abi': 'soft',
'arm_fpu': 'vfp',
'arm_thumb': 0,
'arm_version': '7',
'asan': 0,
'gas_version': '2.24',
'host_arch': 'arm',
'icu_small': 'false',
'node_byteorder': 'little',
'node_install_npm': 'true',
'node_prefix': '/usr/local',
'node_release_urlbase': '',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'false',
'node_shared_zlib': 'false',
'node_tag': '',
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_lttng': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'openssl_fips': '',
'openssl_no_asm': 0,
'target_arch': 'arm',
'uv_parent_path': '/deps/uv/',
'uv_use_dtrace': 'false',
'v8_enable_gdbjit': 0,
'v8_enable_i18n_support': 0,
'v8_no_strict_aliasing': 1,
'v8_optimized_debug': 0,
'v8_random_seed': 0,
'v8_use_snapshot': 'false',
'want_separate_host_toolset': 0}}
creating ./config.gypi
creating ./config.mk
The text was updated successfully, but these errors were encountered: