libv8 gem(v3.3.10以降)のインストールは失敗し、「Killed」というメッセージが表示されます。
Gemfileにlibv8とtherubyracerを含めています。
group :production, :staging do
gem 'libv8'
gem 'therubyracer'
end
ローカルで正常にbundle update
動作します(Mac OS X)。を実行するcap staging deploy
と、デプロイは次のように失敗します。
* 2013-01-04 19:17:51 executing `bundle:install'
* executing "cd /path/to/app/app-staging/releases/20130105001748 && bundle install --gemfile /path/to/app/app-staging/releases/20130105001748/Gemfile --path /path/to/app/app-staging/shared/bundle --deployment --quiet --without development"
servers: ["staging.app.com"]
[staging.app.com] executing command
** [out :: staging.app.com] bash: line 1: 4324 Killed bundle install --gemfile /path/to/app/app-staging/releases/20130105001748/Gemfile --path /path/to/app/app-staging/shared/bundle --deployment --quiet --without development
command finished in 48980ms
*** [deploy:update_code] rolling back
* executing "rm -rf /path/to/app/app-staging/releases/20130105001748; true"
servers: ["staging.app.com"]
[staging.app.com] executing command
command finished in 1928ms
failed: "rvm_path=/usr/local/rvm /usr/local/rvm/bin/rvm-shell 'ruby-1.9.3-p327@app' -c 'cd /path/to/app/app-staging/releases/20130105001748 && bundle install --gemfile /path/to/app/app-staging/releases/20130105001748/Gemfile --path /path/to/app/app-staging/shared/bundle --deployment --quiet --without development'" on staging.app.com
サーバー(Linode上のDebian 6 32ビット、Linux 3.5.2-linode45)にアクセスして実行するbundle exec gem install libv8 -v '3.11.8.9'
と、次のように失敗します。
Building native extensions. This could take a while...
ERROR: Error installing libv8:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb
creating Makefile
Using compiler: /usr/bin/g++
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.4/README.Bugs> for instructions.
make[1]: *** [/path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/v8_base/src/api.o] Error 1
make: *** [ia32.release] Error 2
/path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
from /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/ext/libv8/location.rb:35:in `each'
from /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/ext/libv8/location.rb:35:in `verify_installation!'
from /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/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 -Dhost_arch=ia32
make[1]: Entering directory `/path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out'
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/allocation.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum-dtoa.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/cached-powers.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/conversions.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/diy-fp.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/dtoa.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/fast-dtoa.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/fixed-dtoa.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/once.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/preparse-data.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/preparser.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/preparser-api.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/scanner.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/strtod.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/token.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/unicode.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/utils.o
AR(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/tools/gyp/libpreparser_lib.a
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/preparser/preparser/preparser-process.o
LINK(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/preparser
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/v8_base/src/accessors.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/v8_base/src/allocation.o
CXX(target) /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out/ia32.release/obj.target/v8_base/src/api.o
make[1]: Leaving directory `/path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/vendor/v8/out'
Gem files will remain installed in /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9 for inspection.
Results logged to /path/to/app/app-staging/shared/bundle/ruby/1.9.1/gems/libv8-3.11.8.9/ext/libv8/gem_make.out
現時点では、デプロイを成功させるために、古いバージョンのtherubyracerとlibv8を指定する必要があります。
group :production, :staging do
gem 'libv8', '~> 3.3.10'
gem 'therubyracer', '~> 0.10.2'
end
この問題は関連しているようです。
これに対する修正はありますか?