はてなキーワード: bashとは
ActionScript/Ada/AWK/Bash/BASIC/bc/Brainfuck/C/C#/ C++/CLIPS/Clojure/COBOL/CoffeeScript/csh(C shell)/D/Dart/Elixir/Erlang/F#/ Factor/Fantom/Forth/Fortran/Go/Groovy/Haskell/Icon/Intercal/Java/JavaScript/Jul ia/Kotlin/LISP(Common Lisp)/Lua/Nemerle/Nice/Nim/Objective-C/OCaml/Octave/ Oz/Pascal/Perl/PHP/Pike/PL/I/PostScript/Prolog/Python/R/Racket/Ruby/Rust/ Scala/Scheme/Scratch/sed/Smalltalk/SQL/Swift/Tcl/TypeScript/Unlambda
と、律儀にマジレスしてみる。
プログラミング言語の範囲で「ある程度他に考え方の転用が効く」という意味なら、
最低でも、OS操作できるスクリプト言語(bash系やWSH+VBScript/JScript, PowerShell等)と、
汎用スクリプト言語(RubyやPython等)もやっておいた方が良いかと。
お仕事で、という話なら言語よりはライブラリの使い方やアーキテクチャへの理解、プロジェクトのルールを守れるようになる、といった事の方が重要になってくるし、
なんか、そういう本あったよね?
プログラミング言語カタログみたいなネタ本。(本屋で立ち読みした記憶があるw)
あーこれこれ。
本書で取り上げるプログラミング言語
アセンブリ言語(アセンブラ)/ActionScript/Ada/AWK/Bash/BASIC/bc/Brainfuck/C/C#/C++/CLIPS/Clojure/COBOL/CoffeeScript/csh(C shell)/D/Dart/Elixir/Erlang/F#/Factor/Fantom/Forth/Fortran/Go/Groovy/Haskell/Icon/Intercal/Java/JavaScript/Julia/Kotlin/LISP(Common Lisp)/Lua/Nemerle/Nice/Nim/Objective-C/OCaml/Octave/Oz/Pascal/Perl/PHP/Pike/PL/I/PostScript/Prolog/Python/R/Racket/Ruby/Rust/Scala/Scheme/Scratch/sed/Smalltalk/SQL/Swift/Tcl/TypeScript/Unlambda/Visual Basic(Visula Basic .NET)/Whitespace
$ rake setup rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) (See full trace by running task with --trace)
は?
$ git clone https://github.com/hanachin/rurema-kaku Cloning into 'rurema-kaku'... remote: Counting objects: 47, done. remote: Compressing objects: 100% (26/26), done. remote: Total 47 (delta 20), reused 44 (delta 17), pack-reused 0 Unpacking objects: 100% (47/47), done. Checking connectivity... done. $ cd rurema-kaku/ $ ls Gemfile Gemfile.lock Guardfile README.md Rakefile config.ru $ rake setup rake aborted! /rurema-kaku/Rakefile:24: unknown type of %string directory "public/theme" => %i(bundle_install public) do ^ /rurema-kaku/Rakefile:24: syntax error, unexpected $end directory "public/theme" => %i(bundle_install public) do ^ (See full trace by running task with --trace)
あれかな。
$ ruby -v ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
たぶん、これ。
$ rbenv commands --version commands completions exec global help hooks init local prefix rehash root shell shims version version-file version-file-read version-file-write version-name version-origin versions whence which
installがない?
$ rbenv --version /usr/lib/rbenv/libexec/rbenv---version: 17 行: cd: /home/unko/.rbenv: そのようなファイルやディレクトリはありません
詰み。
rubyやーめた
$ rake setup -bash: /mnt/c/Ruby23-x64/bin/rake: C:/Users/Justin/Projects/rubyinstaller/sandbox/ruby23_mingw/bin/ruby.exe: bad interpreter: No such file or directory
Justinって誰だよww
$ ruby -v ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
# apt-get install ruby-build # rbenv install -l usage: rbenv install VERSION rbenv install /path/to/definition Available versions: 1.8.6-p383 1.8.6-p420 1.8.7-p249 1.8.7-p302 1.8.7-p334 1.8.7-p352 1.8.7-p357 1.8.7-p358 1.9.1-p378 1.9.2-p180 1.9.2-p290 1.9.2-p318 1.9.2-p320 1.9.3-dev 1.9.3-p0 1.9.3-p125 1.9.3-p194 1.9.3-preview1 1.9.3-rc1 2.0.0-dev jruby-1.6.3 jruby-1.6.4 jruby-1.6.5 jruby-1.6.5.1 jruby-1.6.6 jruby-1.6.7 jruby-1.6.7.2 jruby-1.7.0-preview1 maglev-1.0.0 rbx-1.2.4 rbx-2.0.0-dev ree-1.8.6-2009.06 ree-1.8.7-2009.09 ree-1.8.7-2009.10 ree-1.8.7-2010.01 ree-1.8.7-2010.02 ree-1.8.7-2011.03 ree-1.8.7-2011.12 ree-1.8.7-2012.01 ree-1.8.7-2012.02
古いような気がする。
# apt-get upgrade rbenv Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done rbenv is already the newest version. The following package was automatically installed and is no longer required: os-prober Use 'apt-get autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. # apt-get upgrade ruby-build Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done ruby-build is already the newest version. The following package was automatically installed and is no longer required: os-prober Use 'apt-get autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
なんとかしてruby 2.4をパッケージマネージャからインストール。ソースからビルドじゃないよ。やり方は教えません。
# rake setup bundle check || bundle install The following gems are missing * progressbar (0.21.0) * rack (2.0.3) * bitclust-core (0.9.5) * coderay (1.1.2) * eventmachine (1.2.5) * http_parser.rb (0.6.0) * em-websocket (0.5.1) * ffi (1.9.18) * formatador (0.2.5) * rb-fsevent (0.10.2) * rb-inotify (0.9.10) * ruby_dep (1.5.0) * listen (3.1.5) * lumberjack (1.0.12) * nenv (0.3.0) * shellany (0.0.1) * notiffany (0.1.1) * method_source (0.8.2) * slop (3.6.0) * pry (0.10.4) * thor (0.20.0) * guard (2.14.1) * guard-compat (1.2.1) * multi_json (1.12.2) * guard-livereload (2.5.2) * spoon (0.0.6) * guard-rack (2.2.0) * rack-livereload (0.3.16) Install missing gems with `bundle install` Fetching gem metadata from https://rubygems.org/........... Fetching gem metadata from https://rubygems.org/.. Installing progressbar (0.21.0) bInstalling rack (2.0.3) und Installing bitclust-core (0.9.5) Installing coderay (1.1.2) Installing eventmachine (1.2.5) Gem::Ext::BuildError: ERROR: Failed to build gem native extension. current directory: /var/lib/gems/2.4.0/gems/eventmachine-1.2.5/ext /usr/bin/ruby2.4 -r ./siteconf20170918-66-19devli.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.4.0/gems/eventmachine-1.2.5 for inspection. Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/eventmachine-1.2.5/gem_make.out An error occurred while installing eventmachine (1.2.5), and Bundler cannot continue. Make sure that `gem install eventmachine -v '1.2.5'` succeeds before bundling. rake aborted! Command failed with status (5): [bundle check || bundle install...] Rakefile:13:in `block in <top (required)>' Tasks: TOP => setup => template => bundle_install (See full trace by running task with --trace)
たまらんなあ・・。
5はbash on Windowsで特殊環境下ってのは否めなかったので、やむを得ずネイティブLinuxで。
同じエラー発生。
# gem install eventmachine -v '1.2.5' Building native extensions. This could take a while... ERROR: Error installing eventmachine: ERROR: Failed to build gem native extension. current directory: /var/lib/gems/2.4.0/gems/eventmachine-1.2.5/ext /usr/bin/ruby2.4 -r ./siteconf20170918-3352-1g6kzdu.rb extconf.rb mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h extconf failed, exit code 1 Gem files will remain installed in /var/lib/gems/2.4.0/gems/eventmachine-1.2.5 for inspection. Results logged to /var/lib/gems/2.4.0/extensions/x86_64-linux/2.4.0/eventmachine-1.2.5/gem_make.out # apt-get install ruby-dev パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 ruby-dev はすでに最新版です。 以下のパッケージが自動でインストールされましたが、もう必要とされていません: libntdb1 linux-headers-4.2.0-27 linux-headers-4.2.0-27-generic linux-image-4.2.0-27-generic linux-image-extra-4.2.0-27-generic python-ntdb これを削除するには 'apt-get autoremove' を利用してください。 アップグレード: 0 個、新規インストール: 0 個、削除: 0 個、保留: 414 個。 # apt-get upgrade ruby-dev パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています 状態情報を読み取っています... 完了 アップグレードパッケージを検出しています ... 完了 ruby-dev はすでに最新版です。
rubyで消耗するのやーめた
https://github.com/hanachin/rurema-kaku
$ git clone https://github.com/hanachin/rurema-kaku $ cd rurema-kaku/ $ rake setup
以降、うまくいく場合は、そのままで。なんかしらエラーになっちまった場合は、↓が参考になるかもよ?なお、bash on Windowsでやってる。
https://stackoverflow.com/questions/26595620/how-to-install-ruby-2-1-4-on-ubuntu-14-04>|
$ sudo apt-add-repository ppa:brightbox/ruby-ng $ sudo apt-get update $ sudo apt-get install ruby2.4
複数のバージョンを混在させて・・みたいなのもできるみたいだけど、クソなのでキーワードだけ:rbenv
$ sudo apt-get install rake
http://qiita.com/mrmr/items/24302bc9812c820bda91
$ sudo apt-get install ruby2.4-dev
↑だけでダメだったら、↓を手当たり次第試す
$ sudo apt-get install ruby2.3-dev $ sudo apt-get install ruby2.2-dev $ sudo apt-get install ruby2.1-dev $ sudo apt-get install ruby-dev
$ sudo apt-get install bundler
(ほんとは、gemからインストールする??てか、aptとgemで違うもん?だよなw これもコマンド履歴にあって、なんかしら効果があったような気がしたので・・。)
(apt installしなくても、rake setup 時に必要なのがインストールされるかも)
こんなの2017年にやることじゃないだろ・・。Linux終わったな。
$ rake setup $ bundle exec guard
ブラウザで、http://localhost:9292/ 開いて、「るりま書く」ってでてきた。たぶんOK・・だと・・と思う・・。
ウソです
c:\>docker pull centos c:\>docker run -i -t centos /bin/bash # cat /etc/os-release NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7"
# which pyhton bash: which: command not found # yum install which Loaded plugins: fastestmirror, ovl # which python /usr/bin/python # ls -l /usr/bin/py* -rwxr-xr-x 1 root root 78 Nov 6 2016 /usr/bin/pydoc lrwxrwxrwx 1 root root 7 Aug 1 17:23 /usr/bin/python -> python2 lrwxrwxrwx 1 root root 9 Aug 1 17:23 /usr/bin/python2 -> python2.7 -rwxr-xr-x 1 root root 7136 Nov 6 2016 /usr/bin/python2.7 # python --version Python 2.7.5
# which yum /usr/bin/yum # file /usr/bin/yum bash: file: command not found # yum install file # file /usr/bin/yum /usr/bin/yum: Python script, ASCII text executable # head /usr/bin/yum #!/usr/bin/python import sys try: import yum except ImportError: print >> sys.stderr, """\ There was a problem importing one of the Python modules required to run yum. The error leading to this problem was: %s # yum --version 3.4.3 Installed: rpm-4.11.3-21.el7.x86_64 at 2017-08-01 17:23 Built : CentOS BuildSystem <http://bugs.centos.org> at 2016-11-05 23:37 Committed: Florian Festi <ffesti@redhat.com> at 2016-07-26 Installed: yum-3.4.3-150.el7.centos.noarch at 2017-08-01 17:23 Built : CentOS BuildSystem <http://bugs.centos.org> at 2016-11-15 15:30 Committed: CentOS Sources <bugs@centos.org> at 2016-11-03 Installed: yum-plugin-fastestmirror-1.1.31-40.el7.noarch at 2017-08-01 17:23 Built : CentOS BuildSystem <http://bugs.centos.org> at 2016-11-06 00:11 Committed: Valentina Mukhamedzhanova <vmukhame@redhat.com> at 2016-08-04
# yum remove python Loaded plugins: fastestmirror, ovl Resolving Dependencies --> Running transaction check ---> Package python.x86_64 0:2.7.5-48.el7 will be erased --> Processing Dependency: python >= 2.4 for package: yum-3.4.3-150.el7.centos.noarch --> Processing Dependency: python >= 2.2 for package: pyxattr-0.5.1-5.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: yum-metadata-parser-1.1.4-10.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-kitchen-1.1.1-5.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: pygpgme-0.3-9.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-pycurl-7.19.0-19.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: libxml2-python-2.9.1-6.el7_2.3.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-chardet-2.2.1-1.el7_1.noarch --> Processing Dependency: python(abi) = 2.7 for package: dbus-python-1.1.1-9.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-urlgrabber-3.10-8.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: pyxattr-0.5.1-5.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: yum-3.4.3-150.el7.centos.noarch --> Processing Dependency: python(abi) = 2.7 for package: pyliblzma-0.5.3-11.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: pygobject3-base-3.14.0-3.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-iniparse-0.4-9.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: yum-utils-1.1.31-40.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: rpm-python-4.11.3-21.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: yum-metadata-parser-1.1.4-10.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-kitchen-1.1.1-5.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: pygpgme-0.3-9.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-pycurl-7.19.0-19.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: libxml2-python-2.9.1-6.el7_2.3.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-chardet-2.2.1-1.el7_1.noarch --> Processing Dependency: python(abi) = 2.7 for package: dbus-python-1.1.1-9.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-urlgrabber-3.10-8.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: pyxattr-0.5.1-5.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: yum-3.4.3-150.el7.centos.noarch --> Processing Dependency: python(abi) = 2.7 for package: pyliblzma-0.5.3-11.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: pygobject3-base-3.14.0-3.el7.x86_64 --> Processing Dependency: python(abi) = 2.7 for package: python-iniparse-0.4-9.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: yum-utils-1.1.31-40.el7.noarch --> Processing Dependency: python(abi) = 2.7 for package: rpm-python-4.11.3-21.el7.x86_64 --> Processing Dependency: python-sqlite for package: yum-3.4.3-150.el7.centos.noarch --> Running transaction check ---> Package dbus-python.x86_64 0:1.1.1-9.el7 will be erased ---> Package libxml2-python.x86_64 0:2.9.1-6.el7_2.3 will be erased ---> Package pygobject3-base.x86_64 0:3.14.0-3.el7 will be erased ---> Package pygpgme.x86_64 0:0.3-9.el7 will be erased ---> Package pyliblzma.x86_64 0:0.5.3-11.el7 will be erased ---> Package python-chardet.noarch 0:2.2.1-1.el7_1 will be erased ---> Package python-iniparse.noarch 0:0.4-9.el7 will be erased ---> Package python-kitchen.noarch 0:1.1.1-5.el7 will be erased ---> Package python-pycurl.x86_64 0:7.19.0-19.el7 will be erased ---> Package python-urlgrabber.noarch 0:3.10-8.el7 will be erased ---> Package pyxattr.x86_64 0:0.5.1-5.el7 will be erased ---> Package rpm-python.x86_64 0:4.11.3-21.el7 will be erased ---> Package yum.noarch 0:3.4.3-150.el7.centos will be erased --> Processing Dependency: yum >= 3.4.3 for package: yum-plugin-ovl-1.1.31-40.el7.noarch --> Processing Dependency: yum >= 3.0 for package: yum-plugin-fastestmirror-1.1.31-40.el7.noarch ---> Package yum-metadata-parser.x86_64 0:1.1.4-10.el7 will be erased ---> Package yum-utils.noarch 0:1.1.31-40.el7 will be erased --> Running transaction check ---> Package yum-plugin-fastestmirror.noarch 0:1.1.31-40.el7 will be erased ---> Package yum-plugin-ovl.noarch 0:1.1.31-40.el7 will be erased --> Finished Dependency Resolution Error: Trying to remove "yum", which is protected
ローカルaospミラーからのcheck out(repo sync)に3時間かかった
(Core2Duo w)
tar.gzに40分かかった
にんにん中now。途中でディスク容量が足りなくなる予定
80分後にエラー終了
[ 4% 2919/61548] yacc out/soong/.intermediates/frameworks...cc/frameworks/compile/mclinker/lib/Script/ScriptParser.cpp FAILED: out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.cpp out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.h BISON_PKGDATADIR=external/bison/data prebuilts/misc/linux-x86/bison/bison -d --defines=out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.h -o out/soong/.intermediates/frameworks/compile/mclinker/lib/Script/libmcldScript/android_arm_armv7-a_static_core/gen/yacc/frameworks/compile/mclinker/lib/Script/ScriptParser.cpp frameworks/compile/mclinker/lib/Script/ScriptParser.yy prebuilts/misc/linux-x86/bison/bison: 1: prebuilts/misc/linux-x86/bison/bison: Syntax error: "(" unexpected ninja: build stopped: subcommand failed. 15:45:20 ninja failed with: exit status 1 make: *** [run_soong_ui] Error 1
今日はここまで
ちょっとアレしないと
WSL(Windows Subsystem for Linux)
bisonをネットでひろったバイナリへ変更 → エラー対処できた可能性あり。時間切れで中断。ただ、ビルド継続するとディスクの空き容量が・・・
https://github.com/Microsoft/BashOnWindows/issues/1771
https://github.com/kxzxxx/android_build
make -j4でjavaのメモリ不足?エラー。j4なしで → エラー対処できた可能性あり。時間切れで中断。こっちはディスク空きは大丈夫なはず
にしても、ネイティブメモリ16GBで厳しいのか・・ → 追記 8GBって認識されてる。
$ ldhw -c memory *-bank:0 詳細: SODIMM DDR3 同期 1333 MHz (0.8 ns) ベンダー: 0x0383 物理ID: 0 シリアル: 0x00000000 スロット: DIMM0 サイズ: 8GiB クロック: 1333MHz (0.8ns) *-bank:1 詳細: SODIMMProject-Id-Version: lshwReport-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>POT-Creation-Date: 2009-10-08 14:02+0200PO-Revision-Date: 2014-10-12 06:22+0000Last-Translator: Shushi Kurose <md81bird@hitaki.net>Language-Team: Japanese <ja@li.org>MIME-Version: 1.0Content-Type: text/plain; charset=UTF-8Content-Transfer-Encoding: 8bitX-Launchpad-Export-Date: 2016-06-27 17:08+0000X-Generator: Launchpad (build 18115) [空] 物理ID: 1 スロット: DIMM0
予断は許さないが、WSLでAndroidロムのビルドができる可能性あり
っていうか、AOSPじゃなくて、カスロムだとビルド成功報告があるしな
.repo 約20GB
雑に計 約80GB
WSL(Windows Subsystem for Linux)
進捗10%でディスク空きが3GBwになったので、泣く泣く中断
寝て起きても終わってないな。
→ さらに、前回中断してるので、それを加味すると10時間じゃきかないな。
[ 57% 30322/52868] Building with Jack:...k_intermediates/with-local/classes.dex FAILED: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex /bin/bash out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex.rsp Out of memory error (version 1.3-rc6 'Douarn' (441800 22a11d4b264ae70e366aed3025ef47362d1522bb by android-jack-team@google.com)). GC overhead limit exceeded. Try increasing heap size with java option '-Xmx<size>'. Warning: This may have produced partial or corrupted output. ninja: build stopped: subcommand failed. 01:27:14 ninja failed with: exit status 1 build/core/main.mk:21: ターゲット 'run_soong_ui' のレシピで失敗しました make: *** [run_soong_ui] エラー 1 #### make failed to build some targets (07:31:51 (hh:mm:ss)) #### real 451m51.293s user 418m48.588s sys 13m8.276s
おおぅ・・
再起動してみるか
蓋開けて、刺し込み位置取り換えして、再起動・・・、16GB認識OK
よかった・・・
Galaxy S3が壊れて泣きそうなので、ほんとうによかった・・
ビルド成功。トータルで何時間だろう?10時間未満だとは思うけど・・
ふざけんなwww
$ du -hs android-8.0.0_r4/ 93G android-8.0.0_r4/
これってなんかおかしくね?
WSL(Windows Subsystem for Linux)でもやりたかったけど、無理だな
外付けもあまってないしな〜〜
KKOだからな~~~
どうしようかな~~~~
ほしぃなぁ~~~~~
外付けデータディスクとして使う予定だから、3.5HDDでもいいかあ???
いっつも悩むんだよなあああああ
内蔵の確かSSD128GBだったような気がするけど、この際に交換か???
Core2Duo・メモリ4GBの廃スペックノートPC(Ubuntu)でビルド
[ 3% 2191/61548] Building with Jack: ...l_intermediates/with-local/classes.dex FAILED: out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex.rsp Out of memory error (version 1.3-rc6 'Douarn' (441800 22a11d4b264ae70e366aed3025ef47362d1522bb by android-jack-team@google.com)). GC overhead limit exceeded. Try increasing heap size with java option '-Xmx<size>'. Warning: This may have produced partial or corrupted output. ninja: build stopped: subcommand failed. 11:39:11 ninja failed with: exit status 1 make: *** [run_soong_ui] エラー 1 #### make failed to build some targets (49:35 (mm:ss)) #### real 49m34.775s
予想通りではあるが、メモリ不足で終了。オプションで調整できる?調整したところで無理か?
どうも、HDDの肥やしをみると、Android 6はビルドできたっぽいんだが。7でもメモリ不足で失敗してたかも
WSL(Windows Subsystem for Linux)
USB2.0wの外付けHDDでやりなおし。なんか出てるな~~
[ 27% 17003/61548] Generating TOC: out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc FAILED: out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc /bin/bash -c "(prebuilts/build-tools/linux-x86/bin/ijar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ) && (if cmp -s out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; then rm out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ; else mv out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc ; fi )" ftruncate(fd_out, GetSize()): Invalid argument /bin/bash: line 1: 30384 Aborted (core dumped) ( prebuilts/build-tools/linux-x86/bin/ijar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/classes.jar.toc.tmp ) ninja: build stopped: subcommand failed. 10:26:21 ninja failed with: exit status 1 make: *** [run_soong_ui] Error 1 #### make failed to build some targets (08:44:50 (hh:mm:ss)) #### real 524m50.540s user 332m5.844s sys 170m18.359s
https://forum.xda-developers.com/android/general/guide-build-rom-source-windows-10-t3469420/page2
あの~~、ninjaで差分ビルド?部分ビルドってどうやんの・・・
Core2Duo・メモリ4GBの廃スペックノートPC(Ubuntu) → メモリ不足
Ubuntu on Mac mini・メモリ16GB → 10時間ぐらい?でビルド完了
WSL(Windows Subsystem for Linux)・メモリ16GB・USB2.0外付けHDD → 検証中なう・・
よろしくお願いしまぁぁぁすっ!!と好きなだけ ボタンを押せるウェブサイトができたというので
手でぽちぽちやったけど、100回達成で二番目までしか解放されなかったので
adb shell getevent -lでEnterキーボタンの押下位置を割り出して
/dev/input/event0: EV_ABS ABS_MT_POSITION_X 00000347
/dev/input/event0: EV_ABS ABS_MT_POSITION_Y 000006fb
16進数を10進数に変換して、bashで以下のコマンドをぐるぐる回す。
#!/bin/bash
COUNTER=0
while [ $COUNTER -lt 100000 ]; do
let COUNTER=COUNTER+1
done
サーバ見てないし、UAいじってPCでちょいちょい直せばアンロックできそうなことは想像ついたけど、これはこれでいいものだ。
画面ぼけっと眺めてるだけでもうるさいが。
sdkmanagerでインストールされるツールのバイナリがことごとく以下の通り
$ file `which emulator` /data/Android_SDK/tools/emulator: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.15, stripped $ emulator bash: /data/Android_SDK/tools/emulator: cannot execute binary file: 実行形式エラー ・Android Studioなどでエミュ動かそうとすると Syntax error: ")" unexpected とか謎のエラー
つまり64bitバイナリなのである。32bitバイナリは提供されない(Won't Fix (Intended behavior))。
逐一バージョン戻してもいいのだが仕様だし他のも32bit切り始めてるしメモリ4GBもしんどいし64bitやろう。うん。おかねください
結局yamlはデータ構造を現すもので、プログラミング的な繰り返しとかIF文は無理やり過ぎて違和感しかない
RubyのDSLって普通にダメだねこりゃ。実行順序も分からんし、普通にRubyで書いた方が良い気さえする
独自のSyntax覚えるのかったるすぎる。大して便利じゃない
何でもやろうとすると結局、プログラミング言語みたくなってどんどん可読性が落ちる
結局最後はbashで良いんじゃねーかなってなる。シンプルにできるなら一番筋が良いのはansibleだけど微妙に書き方変わったりして追従がかったるい
俺の知ってる会社でchefで全自動だぜ!とか言ってキラキラ感だしてる会社あったんだが今は全然回ってないらしいww
一時はもてはやされたけどDockerとか出てきた昨今こんなの今頑張らなくてもいいのかもな