-
Notifications
You must be signed in to change notification settings - Fork 3
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
Little Endian と Big Endian のエミュレート #5
Comments
Travis で、QEMU を利用して ARM のアーキテクチャの上でテストをしている模様 Linux カーネルには、 Docker の
これを Travis 上で実行し、ARM の Docker イメージを実行することで ARM アーキテクチャで実行することが可能になる。 Go 言語の ARM 版 Docker イメージは https://hub.docker.com/r/arm64v8/golang/ である。
|
以下のエラーが発生して Arm 版の Dockerイメージ
docker-library/official-images#3835 この問題に該当する manifest が適合せずにイメージのプルに失敗している。 |
Go 言語は qemu の arm に対応していない。 https://www.reddit.com/r/golang/comments/6j08ux/what_the_best_arm_emulator_for_testing_go_binary/
|
以下の手順で sudo docker run --rm -it multiarch/debian-debootstrap:arm64-jessie bash wget --no-check-certificate https://dl.google.com/go/go1.11.2.linux-arm64.tar.gz
tar -xvf go1.11.2.linux-arm64.tar.gz
mv go /usr/local
export GOROOT=/usr/local/go
export GOPATH=/root/go
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
cd /root
apt-get install -y git
git clone https://github.com/kawasin73/bitset.git |
Travis で s390x を動かすことができている。 travis-ci/travis-ci#8869 (comment) 公式の Golang の s390x 向けのアーカイブ をダウンロード・解凍して
macOS 上でテストコードをコンパイルして、テストバイナリを Docker 上で実行するも同じくエラーが発生した。
|
Go 言語が対応するアーキテクチャのうち Big Endian は以下の通り。 https://github.com/golang/go/wiki/MinimumRequirements#architectures |
できた
macOS + vagrant + Ubuntu 環境の Docker では動いた。 しかし、travis では動かなかった。以下のエラーが発生する。
|
multiarch/qemu-user-static リポジトリで公開されている テストコードのバイナリ(
|
zcbit はバイトオーダーの異なるマシン間で作成されたビットベクトルのファイルを利用可能にするために作成されている。
PC で広く利用されている Intel CPU は主に Little Endian であるが、Big Endian のマシンでも正常に動作することをテストする必要がある。
Little Endian と Big Endian のどちらでもテストを実行する手法を調査する。
The text was updated successfully, but these errors were encountered: