Last active
September 3, 2019 22:29
-
-
Save philipz/590a241cd262fac09152 to your computer and use it in GitHub Desktop.
Qemu-arm-static on X86 error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Qemu 版本 | |
qemu-arm-static -version | |
qemu-arm version 2.0.0 (Debian 2.0.0+dfsg-2ubuntu1.10), Copyright (c) 2003-2008 Fabrice Bellard | |
### 透過 Qemu-arm-static 執行 RPi GO | |
philipz@philipz:~$ docker run -it -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static philipz/rpi-golang bash | |
root@c306591a15f6:/gopath# go | |
fatal error: rt_sigaction failure | |
runtime stack: | |
runtime.throw(0x531425) | |
/goroot/src/runtime/panic.go:491 +0xa4 | |
runtime.setsig(0x40, 0xa65e8, 0x54da01) | |
/goroot/src/runtime/os_linux.c:302 +0xa8 | |
runtime.initsig() | |
/goroot/src/runtime/signal_unix.c:39 +0x88 | |
mstart() | |
/goroot/src/runtime/proc.c:856 +0x6c | |
runtime.mstart() | |
/goroot/src/runtime/proc.c:836 +0x4c | |
goroutine 1 [runnable]: | |
runtime.main() | |
/goroot/src/runtime/proc.go:16 | |
runtime.goexit() | |
/goroot/src/runtime/asm_arm.s:1322 +0x4 | |
root@c306591a15f6:/gopath# | |
### 透過 Qemu-arm-static 執行 RPi Java | |
philipz@philipz:~$ docker run -it -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static philipz/raspbian-java bash | |
root@9d7b363fc567:/# java -version | |
[thread -507689872 also had an error][thread -171015056 also had an error] | |
# | |
# A fatal error has been detected by the Java Runtime Environment: | |
# | |
# SIGSEGV (0xb) at pc=0x605340f0, pid=5, tid=3787801712 | |
# | |
# JRE version: Java(TM) SE Runtime Environment (7.0_40-b43) (build 1.7.0_40-b43) | |
# Java VM: Java HotSpot(TM) Client VM (24.0-b56 mixed mode linux-arm ) | |
# Problematic frame: | |
# C 0x605340f0 | |
# | |
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again | |
# | |
# An error report file with more information is saved as: | |
# //hs_err_pid5.log | |
# | |
# If you would like to submit a bug report, please visit: | |
# http://bugreport.sun.com/bugreport/crash.jsp | |
# | |
qemu: uncaught target signal 6 (Aborted) - core dumped | |
Aborted (core dumped) | |
root@9d7b363fc567:/# | |
### ARM 上執行 GO | |
[root@alarmpi ~]# docker run -ti --rm philipz/rpi-golang bash | |
root@64be57a4d419:/gopath# go env | |
GOARCH="arm" | |
GOBIN="" | |
GOCHAR="5" | |
GOEXE="" | |
GOHOSTARCH="arm" | |
GOHOSTOS="linux" | |
GOOS="linux" | |
GOPATH="/gopath" | |
GORACE="" | |
GOROOT="/goroot" | |
GOTOOLDIR="/goroot/pkg/tool/linux_arm" | |
CC="gcc" | |
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0" | |
CXX="g++" | |
CGO_ENABLED="1" | |
root@64be57a4d419:/gopath# | |
### ARM 上執行 Java | |
[root@alarmpi ~]# docker run -ti --rm philipz/raspbian-java bash | |
root@c6fa1e999dce:/# java -version | |
java version "1.7.0_40" | |
Java(TM) SE Runtime Environment (build 1.7.0_40-b43) | |
Java HotSpot(TM) Client VM (build 24.0-b56, mixed mode) | |
root@c6fa1e999dce:/# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
+1 same problem... :(