2013-08-17 :-)
_ [艦これ]艦これ
着任しました。
tumblr を眺めてると艦娘の絵がよく流れてくるので全て tumblr が悪い。軍事はさっぱり知らんし(ガルパンも元ネタの戦車は知らん)戦術系ゲームなんぞまるっきり不得手なのでいつまで続くか分からんけど。
編成すらままならないのでまずは建造します。
_ [tdiary]tdiary を 4.0.0 にアップデートする
結論
readline 付き ruby を使用して文書どおりに作業すればよい。
tdiary-core/doc/INSTALL-cgi.md at master - tdiary/tdiary-core
% git clone git://github.com/tdiary/tdiary-core.git tdiary % cd tdiary % bundle install --without coffee:memcached:redis:gfm:server:development:test
そこに至る経緯
git clone だけしたのだけど
git clone git://github.com/tdiary/tdiary-core.git tdiary
これでブラウザでアクセスしたら怒られた。
no such file to load -- bundler/setup (LoadError) <internal:lib/rubygems/custom_require>:29:in `require' <internal:lib/rubygems/custom_require>:29:in `require' /home/rin/public_html/diary/tdiary/environment.rb:6:in `<top (required)>' <internal:lib/rubygems/custom_require>:29:in `require' <internal:lib/rubygems/custom_require>:29:in `require' /home/rin/public_html/diary/tdiary.rb:26:in `<top (required)>' <internal:lib/rubygems/custom_require>:29:in `require' <internal:lib/rubygems/custom_require>:29:in `require' /home/rin/public_html/diary/index.rb:18:in `<main>'
ググる。
bundle install するらしい。
sudo gem install bundler bundle install
途中で怒られた。
Installing nokogiri (1.6.0) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/pkg/bin/ruby193 extconf.rb Extracting libxml2-2.8.0.tar.gz into tmp/i386--netbsdelf/ports/libxml2/2.8.0... ERROR tar: Cannot identify format. Searching... tar: Cpio file name length 10951 is out of range tar: Invalid header, starting valid header search. tar: Cpio file name length 53995 is out of range tar: Cpio file name length 30875 is out of range tar: Cpio file name length 18931 is out of range tar: Cpio file name length 37996 is out of range tar: Cpio file name length 59433 is out of range tar: Cpio file name length 62418 is out of range tar: Cpio file name length 29122 is out of range tar: Cpio file name length 65525 is out of range tar: Cpio file name length 58070 is out of range tar: Cpio file name length 31833 is out of range tar: Cpio file name length 53844 is out of range tar: Cpio file name length 4770 is out of range tar: Cpio file name length 6187 is out of range tar: Cpio file name length 57786 is out of range tar: Cpio file name in header is corrupted : tar: Cpio file name length 57343 is out of range tar: Cpio file name length 59191 is out of range tar: Cpio file name length 8424 is out of range tar: Cpio file name length 57341 is out of range tar: Cpio file name length 59975 is out of range tar: Cpio file name in header is corrupted tar: End of archive volume 1 reached tar: Unexpected EOF on archive file *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/usr/pkg/bin/ruby193 /usr/pkg/lib/ruby/gems/1.9.3/gems/mini_portile-0.5.1/lib/mini_portile.rb:234:in `extract_file': Failed to complete extract task (RuntimeError) from /usr/pkg/lib/ruby/gems/1.9.3/gems/mini_portile-0.5.1/lib/mini_portile.rb:34:in `block in extract' from /usr/pkg/lib/ruby/gems/1.9.3/gems/mini_portile-0.5.1/lib/mini_portile.rb:32:in `each' from /usr/pkg/lib/ruby/gems/1.9.3/gems/mini_portile-0.5.1/lib/mini_portile.rb:32:in `extract' from /usr/pkg/lib/ruby/gems/1.9.3/gems/mini_portile-0.5.1/lib/mini_portile.rb:98:in `cook' from extconf.rb:101:in `block in <main>' from extconf.rb:119:in `call' from extconf.rb:119:in `block in <main>' from extconf.rb:109:in `tap' from extconf.rb:109:in `<main>' Gem files will remain installed in /usr/pkg/lib/ruby/gems/1.9.3/gems/nokogiri-1.6.0 for inspection. Results logged to /usr/pkg/lib/ruby/gems/1.9.3/gems/nokogiri-1.6.0/ext/nokogiri/gem_make.out An error occurred while installing nokogiri (1.6.0), and Bundler cannot continue. Make sure that `gem install nokogiri -v '1.6.0'` succeeds before bundling.
ググる
GNU tar 使いなよ とはいうものの gem とか bundle で tar を指定する方法が分からんので
ln -s /usr/pkg/bin/gtar /usr/pkg/bin/tar PATH=/usr/pkg/bin /bin
的な感じで。
なおシステムの tar は /bin/tar にある。
再度。ひとまず nokogiri はインストールできた。んだが
bundle install : Installing launchy (2.3.0) Installing libv8 (3.11.8.17) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/pkg/bin/ruby193 extconf.rb creating Makefile Compiling v8 for ia32 Using python 2.6.6 Unable to find a compiler officially supported by v8. It is recommended to use GCC v4.4 or higher Using compiler: g++ Unable to find a compiler officially supported by v8. It is recommended to use GCC v4.4 or higher cc1plus: warnings being treated as errors ../src/heap.h: In member function 'v8::internal::byte** v8::internal::Heap::store_buffer_top_address()': ../src/heap.h:1225: warning: dereferencing type-punned pointer will break strict-aliasing rules gmake[1]: *** [/home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/v8_base/src/accessors.o] エラー 1 gmake: *** [ia32.release] エラー 2 /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound) from /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `each' from /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `verify_installation!' from /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/ext/libv8/location.rb:26:in `install!' from extconf.rb:7:in `<main>' GYP_GENERATORS=make \ build/gyp/gyp --generator-output="out" build/all.gyp \ -Ibuild/standalone.gypi --depth=. \ -Dv8_target_arch=ia32 \ -S.ia32 -Dv8_can_use_vfp_instructions=true gmake[1]: ディレクトリ `/home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out' に入ります CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/allocation.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum-dtoa.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/cached-powers.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/conversions.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/diy-fp.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/dtoa.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/fast-dtoa.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/fixed-dtoa.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/once.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/preparse-data.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/preparser.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/preparser-api.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/scanner.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/strtod.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/token.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/unicode.o CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/utils.o AR(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/tools/gyp/libpreparser_lib.a CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser/preparser/preparser-process.o LINK(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/preparser CXX(target) /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/v8_base/src/accessors.o gmake[1]: ディレクトリ `/home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/vendor/v8/out' から出ます Gem files will remain installed in /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17 for inspection. Results logged to /home/rin/.bundler/tmp/5219/gems/libv8-3.11.8.17/ext/libv8/gem_make.out An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue. Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.
gcc4.4 以上にしろというので gcc48 をインストールしておく。
cd /usr/pkgsrc/lang/gcc48-base make install clean clean-depends
/usr/pkg/gcc48 にインストールされる。
実行前に PATH だけ指定して再度 bundle install
% PATH=/usr/pkg/gcc48/bin:$PATH bundle install : Installing libv8 (3.11.8.17) Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /usr/pkg/bin/ruby193 extconf.rb creating Makefile Compiling v8 for ia32 Using python 2.6.6 Using compiler: /usr/pkg/gcc48/bin/g++ In file included from ../src/utils.h:36:0, from ../src/conversions.h:31, from ../src/conversions-inl.h:40, from ../src/conversions.cc:32: ../src/scanner.h: メンバ関数 ‘void v8::internal::Scanner::Init()’ 内: ../src/checks.h:251:22: エラー: typedef ‘__StaticAssertTypedef__450’ locally defined but not used [-Werror=unused-local-typedefs] SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) ^ ../src/checks.h:241:39: 備考: in definition of macro ‘SEMI_STATIC_JOIN_HELPER’ #define SEMI_STATIC_JOIN_HELPER(a, b) a##b ^ ../src/checks.h:251:5: 備考: in expansion of macro ‘SEMI_STATIC_JOIN’ SEMI_STATIC_JOIN(__StaticAssertTypedef__, __LINE__) ^ ../src/checks.h:283:30: 備考: in expansion of macro ‘STATIC_CHECK’ #define STATIC_ASSERT(test) STATIC_CHECK(test) ^ ../src/scanner.h:450:5: 備考: in expansion of macro ‘STATIC_ASSERT’ STATIC_ASSERT(kCharacterLookaheadBufferSize == 1); ^ cc1plus: all warnings being treated as errors gmake[1]: *** [/home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/conversions.o] エラー 1 gmake: *** [ia32.release] エラー 2 /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound) from /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `each' from /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `verify_installation!' from /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/ext/libv8/location.rb:26:in `install!' from extconf.rb:7:in `<main>' GYP_GENERATORS=make \ build/gyp/gyp --generator-output="out" build/all.gyp \ -Ibuild/standalone.gypi --depth=. \ -Dv8_target_arch=ia32 \ -S.ia32 -Dv8_can_use_vfp_instructions=true gmake[1]: ディレクトリ `/home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out' に入ります CXX(target) /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/allocation.o CXX(target) /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o CXX(target) /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum.o CXX(target) /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum-dtoa.o CXX(target) /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/cached-powers.o CXX(target) /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/conversions.o gmake[1]: ディレクトリ `/home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/vendor/v8/out' から出ます Gem files will remain installed in /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17 for inspection. Results logged to /home/rin/.bundler/tmp/20245/gems/libv8-3.11.8.17/ext/libv8/gem_make.out An error occurred while installing libv8 (3.11.8.17), and Bundler cannot continue. Make sure that `gem install libv8 -v '3.11.8.17'` succeeds before bundling.
あーもう
ていうか公式にインストール手順くらいあるだろと思ったらあった。
tdiary-core/doc/INSTALL-cgi.md at master · tdiary/tdiary-core
% git clone git://github.com/tdiary/tdiary-core.git tdiary % cd tdiary % bundle install --without coffee:memcached:redis:gfm:server:development:test
oh!
手順どおりに bundle install しておく。
それでもアクセスすると怒られる。
You're running a version of ruby with no Readline support Please `gem install rb-readline` or recompile ruby --with-readline.
gem193 install rb-readline しても解消されん。(tdiary が bundle 環境だから gem しても意味ないのかな)
では --with-readline して ruby を再構築してみようと思ったものの pkgsrc での指定の仕方が分からない。
Re: CONFIGURE_ARGS - ways other than edit Makefile?
options.mk を編集して CONFIGURE_ARGS を追加するらしい。
make install してみたものの readline が入ってないような
試してみる。
require 'readline' while buf = Readline.readline("> ", true) print("-> ", buf, "\n") end
実行
% ruby193 readline0.rb /usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:1810:in ``': No such file or directory - infocmp -C (Errno::ENOENT) from /usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:1810:in `get_term_capabilities' from /usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:2022:in `_rl_init_terminal_io' from /usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:2508:in `readline_initialize_everything' from /usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:3793:in `rl_initialize' from /usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/rbreadline.rb:4813:in `readline' from /usr/pkg/lib/ruby/gems/1.9.3/gems/rb-readline-0.5.0/lib/readline.rb:40:in `readline' from readline0.rb:3:in `<main>'
うーん
lang/ruby193-base で make configure してみると何やら怒られていた。
configure: WARNING: unrecognized options: --with-readline
おや。
ところで
gem install rb-readline - Issue #362 - tdiary/tdiary-core
「readline 入りの ruby を使ってみたまえ」
とのことなのでやはりこの道をゆくらしいので続ける。
pkgsrcめも - isihara@つなぐねっとのぺーじ - pkgsrcからrubyをいれたのに、/usr/pkg/bin/rubyがない
lang/ruby1[89]: ruby1[89]-base + 別になっているrubyモジュール(iconv,gdbm,curses,readline,tk)がインストールされるメタパッケージ。
oh!
lang/ruby193-base じゃなくて lang/ruby193 を使うほうが楽そうだ。
lang/ruby193/Makefile をコメントして
#DEPENDS+= ${RUBY_PKGPREFIX}-tk>=${RUBY_VERSION_FULL}:../../x11/ruby-tk
make する
make install clean clean-depends
結局これでイケた。
艦これ始めたんですねww俺は昨日から始めました。早速一隻轟沈させてしまいましたが…。<br>楽しくやっていきましょうww
轟沈 (´・ω・`)<br>わしはまだかろうじて大破で済んでます。娘たちが脱げてます<br>1日1時間もプレイできないけどボチボチプレイしてきます。