[Abstract]
Building bazel on ArchLinux (TermuxArch) on android
[Details]
-Install Oracle jdk 8.
(openjdk8 via pacman is too old.)
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
> pacman -S zip
(Important: zip command is used in the end of building. Without zip, build is end with error.)
Get bazel-*-dist.zip (bazel-0.12.0-dist.zip)
https://github.com/bazelbuild/bazel/releases
Modify script/bootstrap/compile.sh and add java heap memory.
run "${JAVAC}" -verbose -J-Xms1024m -J-Xmx1024m -classpath ...
Set jobs to 1.
> export EXTRA_BAZEL_ARGS='--jobs 1'
(If jobs is not 1, illegal seek error will happen and build fail.)
On top directory, run the follow command. And wait for hours.
> ./compile.sh
If build succed, copy bazel binary.
> cp output/bazel /usr/local/bin/
Complete.
(所感: bazelのビルドは失敗すると最初からやり直しで数時間コース。デフォルトではログも出ない、illegal seekなど罠も多く、いったい何回試行錯誤したことか!ちなみにjdk9でもまだうまくいきません。)
(次回: おまちかね、tensorflowのビルド!そこにはさらなる罠が!?)
0 件のコメント:
コメントを投稿