-
Notifications
You must be signed in to change notification settings - Fork 1.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
'pub get' fails on Raspberry Pi 2 model B with Illegal instruction #24855
Comments
Raspberry Pi is not an officially supported platform for the Dart SDK, so closing this issue. I recommend you take a look at the Fletch project: https://github.com/dart-lang/fletch |
There is no reason why the SDK should not work on an Raspberry Pi which is ARMv7. I don't have a Raspberry Pi at hand to reproduce it myself Can you try building a debug build (build.py -m debug) of the SDK and see what happens? |
I've successfully built dart sdk with parameters:
pub get still behaves the same way:
gdb output is similar:
Behavior is the same while compiling with default toolchain |
@zanderso, @rmacnak-google: Is there any known issue on Raspberry Pi? Is {sp} not allowed in a push instruction there? |
The Raspberry Pi 2 has an ARMv7 processor. Those instructions from the wiki, and the cross-compiler mentioned there, are for the ARMv6 Raspberry Pi. I believe the default ARM cross compiler you get with Ubuntu 14.04 should generate an ARMv7 SDK that will run on the Pi2. I think @rmacnak-google has tried this more recently. You can just follow the generic ARM instructions from the Wiki. About where this fault is happening. It looks like the deopt sequence. In ARM mode rather than THUMB mode, a push of SP should be allowed, and if it weren't allowed neither would a push of PC, so this is weird place to see such a fault. If we still hit it after using the correct cross-compiler, we'll have to investigate more carefully. @mit-mit we have some customers using the VM on ARMv7, so we must be sure we are working on these platforms. Please get in touch with me or @iposva-google for clarification. |
Check that. I was looking at the docs for STM. PUSH does an STR with writeback. The docs say STR with writeback is unpredictable when the source register and the base register are the same. @rmacnak-google is taking a look. |
I couldn't reproduce this on my Raspberry Pi 2. Can you try again after syncing past c315da5? |
Seems to be fixed, thanks. pub get works. So does other code. |
I've built dart sdk according to instruction
https://github.com/dart-lang/sdk/wiki/Building-Dart-SDK-for-Raspberry-Pi
First time I used Ubuntu 15.10 to build dart-sdk, run install-build-deps.sh with --unsupported.
Second time I used Ubuntu 14.04.
Both builds lead to the same bug:
pub get fails with Illegal instruction.
Here is info about system and console output.
pi@raspberrypi ~/test $ uname -ap
Linux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux
pi@raspberrypi ~/test $ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 2
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 3
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : BCM2709
Revision : a21041
Serial : 00000000cfdfd66f
pi@raspberrypi ~/test $ dart --version
Dart VM version: 1.13.0-edge.a825ac73f888886d36d2b3a3644ad602f8134f8a (Sun Nov 8 14:53:14 2015) on "linux_arm"
pi@raspberrypi ~/test $ ls -la
total 16
drwxr-xr-x 2 pi pi 4096 Nov 9 06:53 .
drwxr-xr-x 24 pi pi 4096 Nov 9 06:52 ..
-rw-r--r-- 1 pi pi 104 Nov 9 06:53 pubspec.yaml
-rw-r--r-- 1 pi pi 43 Nov 9 06:47 test.dart
pi@raspberrypi ~/test $ cat test.dart
void main() {
print("hello, dart!");
}
pi@raspberrypi ~/test $ cat pubspec.yaml
name: test
version: 0.0.1
author: tester
environment:
sdk: '>1.12.0 <2.0.0'
dependencies:
yaml: any
pi@raspberrypi ~/test $ dart test.dart
hello, dart!
pi@raspberrypi ~/test $ pub get
Resolving dependencies... Illegal instruction
pi@raspberrypi ~/test $ ulimit -c unlimited
pi@raspberrypi ~/test $ pub get
Resolving dependencies... Illegal instruction (core dumped)
pi@raspberrypi ~/test $ gdb /home/pi/dart-sdk/bin/dart core
GNU gdb (Raspbian 7.7.1+dfsg-5) 7.7.1
Copyright (C) 2014 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-linux-gnueabihf".
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 /home/pi/dart-sdk/bin/dart...(no debugging symbols found)...done.
[New LWP 20285]
[New LWP 20283]
[New LWP 20280]
[New LWP 20284]
[New LWP 20286]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Core was generated by `/home/pi/dart-sdk/bin/dart /home/pi/dart-sdk/bin/snapshots/pub.dart.snapshot ge'.
Program terminated with signal SIGILL, Illegal instruction.
#0 0x760366e0 in ?? ()
(gdb) bt
#0 0x760366e0 in ?? ()
#1 0x7556df34 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) disassemble 0x760366d0,+32
Dump of assembler code from 0x760366d0 to 0x760366f0:
0x760366d0: add r11, sp, #8
0x760366d4: ldr r5, [r6, #15]
0x760366d8: push {pc} ; (str pc, [sp, #-4]!)
0x760366dc: push {lr} ; (str lr, [sp, #-4]!)
=> 0x760366e0: push {sp} ; (str sp, [sp, #-4]!)
0x760366e4: push {r12} ; (str r12, [sp, #-4]!)
0x760366e8: push {r11} ; (str r11, [sp, #-4]!)
0x760366ec: push {r10} ; (str r10, [sp, #-4]!)
End of assembler dump.
(gdb)
Additional Info
If it is useful, pub get with no deps runs well and creates needed files/folders:
pi@raspberrypi ~/test $ ls -la
total 16
drwxr-xr-x 2 pi pi 4096 Nov 9 07:24 .
drwxr-xr-x 24 pi pi 4096 Nov 9 06:52 ..
-rw-r--r-- 1 pi pi 78 Nov 9 07:22 pubspec.yaml
-rw-r--r-- 1 pi pi 43 Nov 9 06:47 test.dart
pi@raspberrypi ~/test $ cat pubspec.yaml
name: test
version: 0.0.1
author: tester
environment:
sdk: '>1.12.0 <2.0.0'
pi@raspberrypi ~/test $ pub get
Resolving dependencies...
Got dependencies!
pi@raspberrypi ~/test $ ls -la
total 28
drwxr-xr-x 3 pi pi 4096 Nov 9 07:24 .
drwxr-xr-x 24 pi pi 4096 Nov 9 06:52 ..
drwxr-xr-x 2 pi pi 4096 Nov 9 07:24 packages
-rw-r--r-- 1 pi pi 57 Nov 9 07:24 .packages
-rw-r--r-- 1 pi pi 89 Nov 9 07:24 pubspec.lock
-rw-r--r-- 1 pi pi 78 Nov 9 07:22 pubspec.yaml
-rw-r--r-- 1 pi pi 43 Nov 9 06:47 test.dart
The text was updated successfully, but these errors were encountered: