3

私の odroid に gitlab をインストールするのはうまくいきました... https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.mdからこのコマンドまでの手順を使用します

sudo -u git -H bundle install --deployment --without development test postgres aws

しかし、それはちょうど therubyracer 0.12.0 のインストールに失敗しました (実際、失敗したのは v8 のコンパイルでした。これには -fPIC フラグが必要なためです)。ここにエラーメッセージがあります

/usr/bin/ld: /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.16.14.3/vendor/v8/out/arm.release/obj.target/tools/gyp/libv8_base.a(api.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/libv8-3.16.14.3/vendor/v8/out/arm.release/obj.target/tools/gyp/libv8_base.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status

だから... https://github.com/v8/v8のクローンを作成し、コミット7ce3fe106a37826dc23189a78dcb9000a1b3fa06のチェックアウトを実行して、システムにv8をインストールしました(b / cは、タグv3.16.14.3のlibv8で使用されているものであり、それはGitlab が必要とするもの)。

欠落しているフラグは -fPIC であるため、実行後make dependenciesにこの変更を行いました (見やすくするためにパッチとして実行しています... -Wall が使用されるたびに -fPIC を追加しました)。

--- build/standalone.gypi.original  2014-02-09 21:58:48.627732201 +0000
+++ build/standalone.gypi   2014-02-09 22:02:27.236682523 +0000
@@ -96,7 +96,7 @@
     ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
        or OS=="netbsd"', {
       'target_defaults': {
-        'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
+        'cflags': [ '-fPIC', '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
                     '-Wnon-virtual-dtor', '-pthread', '-fno-rtti',
                     '-fno-exceptions', '-pedantic' ],
         'ldflags': [ '-pthread', ],
@@ -206,7 +206,7 @@
             '-fno-strict-aliasing',
           ],
           'WARNING_CFLAGS': [
-            '-Wall',
+            '-fPIC', '-Wall',
             '-Wendif-labels',
             '-W',
             '-Wno-unused-parameter',

その後、実行make arm.release hardfp=on library=shared -j4して待機しました...終了したらsudo cp out/arm.release/lib.target/libv8.so /usr/lib/libv8.so、libを利用できるようにしました。sudo cp include /usr/インクルードファイルが利用できるようにもしました。

インストールした宝石を確認する

odroid@odroid-server:~/v8$ gem query --local

*** LOCAL GEMS ***

bundler (1.5.3)
ref (1.0.5)

だから、私は実行しましたsudo gem install libv8:3.16.14.3 -- --with-system-v8

そして、あなたはそれがインストールされていることがわかります

odroid@odroid-server:~/v8/out/arm.release$ gem query --local

*** LOCAL GEMS ***

bundler (1.5.3)
libv8 (3.16.14.3)
ref (1.0.5)

しかし今、/home/git/gitlab フォルダーに移動すると、

sudo -u git -H bundle install --deployment --without development test postgres aws

再び失敗します...次に、バンドル構成について読んだので、実行します

sudo -u git -H bundle config build.libv8 --with-system-v8
sudo -u git -H bundle install --deployment --without development test postgres aws

そして出来上がり!

だけど…そしたらこれ

odroid@odroid-server:/home/git/gitlab$ sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
ruby: symbol lookup error: /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/therubyracer-0.12.0/ext/v8/init.so: undefined symbol: _ZN2v82V821AddGCPrologueCallbackEPFvNS_6GCTypeENS_15GCCallbackFlagsEES1_

v8/out/arm.release/obj.target/tools/gyp から /usr/lib または /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/therubyracer-0.12 にすべてをコピーしてみました運が悪い.0/ext/v8/

v8 ライブラリを利用可能にする方法を知っている人はいますか? これが、機能させるために必要な最後の情報だと思います。

ありがとう!!!

4

3 に答える 3

1

GitLab には依存関係としての ruby​​racer がなくなったため、Gemfile.lock を変更する必要はなくなりました。nodejs をインストールして、通常の bundle install コマンドを実行するだけです。

于 2015-04-17T08:27:54.917 に答える
-2

GitLab インストールを作成するためのオプションは次のとおりです: https://about.gitlab.com/installation/

于 2015-04-18T05:11:02.253 に答える