2

我正在尝试在 Ubuntu PowerPC (mac mini) 上安装 GitLab,sudo -u git -H bundle install --deployment --without development test postgres aws libv8但在 libv8 (3.11.8.17) 上安装失败。输出如下所示。

我对 Ruby 完全陌生,但我想它正在尝试从二进制文件安装不同的架构?如何从源安装?任何帮助表示赞赏!

捆绑器版本 1.3.5

宝石版本 2.0.3

红宝石版本 2.0.0p247 (2013-06-27) [powerpc-linux]

uname Linux ubumini 3.2.0-53-powerpc-smp #81-Ubuntu SMP Thu Aug 22 21:09:31 UTC 2013 ppc ppc ppc GNU/Linux

Installing libv8 (3.11.8.17) 
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/local/bin/ruby extconf.rb 
creating Makefile
Compiling v8 for ia32
Using python 2.7.3
Using compiler: /usr/bin/g++
In file included from ../src/allocation.h:31:0,
                 from ../src/allocation.cc:28:
../src/globals.h:90:2: error: #error Host architecture was not detected as supported by v8
../src/globals.h:113:2: error: #error Target architecture ia32 is only supported on ia32 host
make[1]: *** [/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/allocation.o] Error 1
make: *** [ia32.release] Error 2
/home/git/gitlab/vendor/bundle/ruby/2.0.0/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/git/gitlab/vendor/bundle/ruby/2.0.0/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/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `each'
    from /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.11.8.17/ext/libv8/location.rb:35:in `verify_installation!'
    from /home/git/gitlab/vendor/bundle/ruby/2.0.0/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
make[1]: Entering directory `/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out'
  CXX(target) /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/allocation.o
make[1]: Leaving directory `/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.11.8.17/vendor/v8/out'


Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.11.8.17 for inspection.
Results logged to /home/git/gitlab/vendor/bundle/ruby/2.0.0/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.
4

3 回答 3

2

V8 编译器只有 x86、AMD64 和 ARM 的后端。

于 2013-09-24T10:46:33.310 回答
2

https://github.com/cowboyd/libv8/tree/3.11#bring-your-own-v8

使用以下命令安装 libv8:

gem install libv8 -- --with-system-v8

请注意,如果您打算运行自己的 V8,则必须同时安装 V8 及其头文件(在 Debian 发行版的 libv8-dev 中找到)。

于 2013-10-26T16:46:55.413 回答
2

您可以在另一台机器上预编译您的资产并将 public/assets 文件夹 scp 到您的 gitlab power-pc 机器。

您必须下载 gitlab 并在您的开发机器上进行非常快速的设置。这就是我所做的。

# on my development machine
git clone https://github.com/gitlabhq/gitlabhq.git gitlab
cd gitlab
git checkout 6-3-stable

cp config/gitlab.yml.example config/gitlab.yml
cp config/unicorn.rb.example config/unicorn.rb
cp config/database.yml.postgresql config/database.yml

# edit and set db
nano config/database.yml

# https://github.com/CiTroNaK/Installation-guide-for-GitLab-on-OS-X
brew install icu4c libxml2
gem install charlock_holmes --version '0.6.9.4'
bundle install --deployment --without development test mysql aws

bundle exec rake db:create RAILS_ENV=production
bundle exec rake assets:precompile RAILS_ENV=production

scp -r ~/gitlab-project-path/public/assets user@gitlab-ip:/home/ubuntu/

ssh user@gitlab-ip

# on my remote machine
sudo rm -rf /home/git/gitlab/public/assets
sudo mv assets /home/git/gitlab/public
sudo service gitlab restart

希望这可以帮助!

于 2013-11-25T19:46:01.473 回答