2015-09-17 4 views
5

I NodeJS 0.12.2 für Atmel SAMA5D36 unter Verwendung folgender WerkzeugketteNPM -v und node.js Illegal Instruktion über Kreuz werfen kompilierten nodejs0.12.2

export AR=arm-linux-gnueabihf-ar 
export CC=arm-linux-gnueabihf-gcc 
export CXX=arm-linux-gnueabihf-g++ 
export LINK=arm-linux-gnueabihf-g++ 

und konfiguriert und bauen wie folgt

kompilierten Kreuz ./configure --ohne-snapshot --dest-cpu = arm --dest-os = linux --prefix =/home/root/nodejs-v0.12.2

make make installieren DESTDIR =/home/user/Desktop/nodejs_arm/nodebins

Der kompilierte Ordner innerhalb generiert/home/user/Desktop/nodejs_arm/nodebins/home/root

I komprimiert, dass Ordner in ein tar-Datei und übertragen AtmelSAMA5D36 Arm board.I es in/home auf dem Brett unkomprimiert/root-Verzeichnis und

ln -s /home/root/nodejs-v0.12.2/bin/npm /bin/npm 
ln -s /home/root/nodejs-v0.12.2/bin/node /bin/node 

folgende symbolische Verknüpfung erstellt, wenn ich es testen "Knoten -v" und "npm -v",

"Knoten -v" gibt korrekte Ausgabe aber

"mit npm -v "werfen" krank egal Anweisung "Fehler
Gleiches mit" Knoten ".

Allerdings funktioniert kreuz kompiliert nodejs 0.10.40 völlig in Ordnung.

Jede Hilfe wird sehr geschätzt.

Update:

(gdb) run 
Starting program: /usr/bin/node 
[Thread debugging using libthread_db enabled] 
Using host libthread_db library "/lib/libthread_db.so.1". 

Program received signal SIGILL, Illegal instruction. 
0xb6edfec0 in _armv7_neon_probe() from /usr/lib/libcrypto.so.1.0.0 
(gdb) c 
Continuing. 

Program received signal SIGILL, Illegal instruction. 
0xb6edfec8 in _armv7_tick() from /usr/lib/libcrypto.so.1.0.0 
(gdb) c 
Continuing. 
[New Thread 0xb65ca4c0 (LWP 3774)] 
[New Thread 0xb67ca4c0 (LWP 3773)] 
[New Thread 0xb69ca4c0 (LWP 3772)] 
[New Thread 0xb6bca4c0 (LWP 3771)] 

Program received signal SIGILL, Illegal instruction. 
0x0054b504 in v8::internal::ComputeFlagListHash()() 
(gdb) c 
Continuing. 
[Thread 0xb65ca4c0 (LWP 3774) exited] 
[Thread 0xb67ca4c0 (LWP 3773) exited] 
[Thread 0xb69ca4c0 (LWP 3772) exited] 
[Thread 0xb6bca4c0 (LWP 3771) exited] 

Program terminated with signal SIGILL, Illegal instruction. 
The program no longer exists. 
(gdb) q 
# gdb node -e 0 
GNU gdb (GDB) 7.9.1 
Copyright (C) 2015 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law. Type "show copying" 
and "show warranty" for details. 
This GDB was configured as "arm-buildroot-linux-uclibcgnueabihf". 
Type "show configuration" for configuration details. 
For bug reporting instructions, please see: 
<http://www.gnu.org/software/gdb/bugs/>. 
Find the GDB manual and other documentation resources online at: 
<http://www.gnu.org/software/gdb/documentation/>. 
For help, type "help". 
Type "apropos word" to search for commands related to "word"... 
Reading symbols from node... 
(gdb) 
(gdb) run 
Starting program: /usr/bin/node 
[Thread debugging using libthread_db enabled] 
Using host libthread_db library "/lib/libthread_db.so.1". 
[New Thread 0xb64f84c0 (LWP 14382)] 
[New Thread 0xb66f84c0 (LWP 14381)] 
[New Thread 0xb68f84c0 (LWP 14380)] 
[New Thread 0xb6af84c0 (LWP 14379)] 

Program received signal SIGILL, Illegal instruction. 
0x0054b504 in v8::internal::ComputeFlagListHash()() 
(gdb) 
(gdb) run 
The program being debugged has been started already. 
Start it from the beginning? (y or n) y 
Starting program: /usr/bin/node 
[Thread debugging using libthread_db enabled] 
Using host libthread_db library "/lib/libthread_db.so.1". 
[New Thread 0xb653d4c0 (LWP 14531)] 
[New Thread 0xb673d4c0 (LWP 14530)] 
[New Thread 0xb693d4c0 (LWP 14529)] 
[New Thread 0xb6b3d4c0 (LWP 14528)] 

Program received signal SIGILL, Illegal instruction. 
0x0054b504 in v8::internal::ComputeFlagListHash()() 
(gdb) Program received signal SIGILL, Illegal instruction. 
Undefined command: "Program". Try "help". 
(gdb) 0x0054b504 in v8::internal::ComputeFlagListHash()()bt 
Undefined command: "0x0054b504". Try "help". 
(gdb) bt 
#0 0x0054b504 in v8::internal::ComputeFlagListHash()() 
#1 0x007b8a54 in v8::internal::V8::InitializeOncePerProcessImpl()() 
#2 0x009281b0 in v8::base::CallOnceImpl(int*, void (*)(void*), void*)() 
#3 0x007b8ba8 in v8::internal::V8::Initialize()() 
#4 0x0028fc74 in v8::V8::Initialize()() 
#5 0x00897a34 in node::Start(int, char**)() 
#6 0xb6b95634 in __uClibc_main() from /lib/libc.so.1 
#7 0x00000000 in ??() 
Backtrace stopped: previous frame identical to this frame (corrupt stack?) 
(gdb) q 
+0

Können Sie geben das Ergebnis von 'Knoten --v8-options' – Corbin

+0

ersten paar Zeilen der Ausgabe des Knotens --v8-Optionen sind als –

+1

Arm v7 VFP3 hart ARMv7 Ziel folgt = 1 VFP3 = 1 VFP32DREGS = 1 NEON = 0 SUDIV = 0 UNALIGNED_ACCESSES = 1 MOVW_MOVT_IMMEDIATE_LOADS = 0 USE_EABI_HARDFLOAT = 1 –

Antwort

2

Wir hatten ein ähnliches Problem versucht NodeJS 6.1.0 über eine buildroot Werkzeugkette auf SAMA5D31 zu verwenden, und lief in die gleichen "Illegal instruction" Fragen. Schließlich haben wir auf die Version 0.10.45 umgestellt, die in buildroot für ältere Prozessoren (armv5 und älter) enthalten ist.

Bei der Problembehandlung scheint das Problem in den Nodejs- und OpenSSL-Bibliotheken zu liegen, die von Knoten verwendet werden, wo der kompilierte Code versucht, Neon-Anweisungen für Fließkommaoperationen zu verwenden. Der SAMA5D3X-Prozessor meldet sich als armV7, hat aber keine Neon-FPU. Nodejs (und openssl für uns) versuchen jedoch, Neon-Anweisungen zu verwenden, weil sie davon ausgehen, dass es sie als ArmV7 hat. Bis nodejs mit einem Nicht-Neon-ArmV7 umgehen kann, ist es am besten, die Version 0.10.40 oder 0.10.45 des Knotens zu verwenden, bis diese aufgelöst werden kann. Oder ändern Sie die Build-Konfiguration selbst, damit der Knoten mit dem Nicht-Neon-ArmV7 umgehen kann.

Verwandte Themen