问题上安装odroid Gitlab(V8 lib中不可用?) [英] Problems installing Gitlab on odroid (v8 lib not available?)

查看:608
本文介绍了问题上安装odroid Gitlab(V8 lib中不可用?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装gitlab到我odroid去就好了... ...从使用的 https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md 直到这个命令

Installing gitlab into my odroid went just fine... Using the steps from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md until this command

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

但只是没有安装therubyracer 0.12.0(实际上什么故障被编译v8的,因为它要求-fPIC标志)。这里的错误信息

but that just failed to install therubyracer 0.12.0 (actually, what failed was compiling v8, because it requires the -fPIC flag). Here's the error message

/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 <系统上安装的V8 / A>和做的结账提交7ce3fe106a37826dc23189a78dcb9000a1b3fa06(b / C,这就是对libv8用在标签v3.16.14.3,这就是一个Gitlab需要)。

So... I installed v8 on the system by cloning https://github.com/v8/v8 and doing a checkout of the commit 7ce3fe106a37826dc23189a78dcb9000a1b3fa06 (b/c that's what's used on libv8 on the tag v3.16.14.3 and that's the one Gitlab needs).

缺少的标志是-fpic,这样算下来让依赖性后我做了这种变化(做一个补丁,这样更容易看到...我只是说 - 灵活插卡-Wall时使用)

The missing flag is -fPIC, so after doing make dependencies I did this change (doing it as a patch so that's easier to see... I just added -fPIC whenever -Wall is used)

--- 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',

然后跑使arm.release hardfp =图书馆=共享-j4 ,等待着......当它完成我只是做了须藤CP出来/arm.release/lib.target/libv8.so /usr/lib/libv8.so 拥有的lib可用。我也做了须藤CP包含/ usr / 这样的包含文件是可用的。

then ran make arm.release hardfp=on library=shared -j4 and waited... when it finished I just did sudo cp out/arm.release/lib.target/libv8.so /usr/lib/libv8.so to have the lib available. I also did sudo cp include /usr/ so that the include files are available.

检查哪些宝石我已经安装了,我得到

Checking which gems I have installed I get

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

*** LOCAL GEMS ***

bundler (1.5.3)
ref (1.0.5)

所以,我执行 sudo的创业板安装libv8:3.16.14.3 - --with系统-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文件夹的运行

But now, when I go to the /home/git/gitlab folder an run

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

再次失败......那么,我读到捆绑配置,所以我跑

Fails again... then, I read about bundle config, so I run

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

瞧!

但是......那么这

but... then this

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 /缩小/ arm.release / obj.target /工具/石膏到/ usr / lib或甚至/home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/ therubyracer-0.12.0 / EXT / V8 /没有运气

I tried copying everything from v8/out/arm.release/obj.target/tools/gyp to /usr/lib or even to /home/git/gitlab/vendor/bundle/ruby/2.0.0/gems/therubyracer-0.12.0/ext/v8/ without luck

有没有人对如何使V8库提供的任何想法?我认为这是信息的最后一点我需要它的工作。

Does anyone have any idea of how to make the v8 library available? I think that's the last bit of info I need to have it working.

谢谢!

推荐答案

叶氏!这是与libv8一个常见的​​问题。但是,安装一个的NodeJS替代性和ommit的 therubyracer 从Gemfile中的宝石。勾选此 GitHub的问题这的帖子

Yeap! That's a common issue with libv8. But there is an alternative to install nodejs and ommit the therubyracer gem from the Gemfile. Check this github issue and this post.

步骤:


  1. 停止gitlab服务

  2. 编辑的Gemfile和删除行宝石therubyracer

  3. 将捆绑配置有: MV /home/git/gitlab/.bundle/config {,原稿}

  4. 将Gemfile.lock的有: MV /home/git/gitlab/Gemfile.lock {,原稿}

  5. 运行 sudo的-u git的-H捆绑安装--path供应商/束来重新创建Gemfile.lock的

  6. 安装的NodeJS

  7. 重新启动gitlab服务

  1. Stop gitlab service
  2. Edit Gemfile and remove the line gem "therubyracer".
  3. Move bundle config with: mv /home/git/gitlab/.bundle/config{,.orig}
  4. Move Gemfile.lock with: mv /home/git/gitlab/Gemfile.lock{,.orig}
  5. Run sudo -u git -H bundle install --path vendor/bundle to recreate the Gemfile.lock
  6. Install nodejs
  7. Restart gitlab service

现在,你有一个新Gemfile.lock的和所有安装在供应商/束宝石。如果你想节省空间,清理或某事,你可以删除供应商/捆绑文件夹和部署运行已知的命令:

Now, you have a new Gemfile.lock and all gems installed in vendor/bundle. If you want to save space, clean it up or sth, you can remove the vendor/bundle folder and run the known command for deployment:

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

这只会拉动相关的宝石。或许有,因为现在你已经有安装了MySQL和Postgres的等方面的devel包更简单的方法,但这是什么来考虑现在。

This will pull only the relevant gems. Perhaps there is an easier way because now you have to have installed the devel packages for both mysql and postgres etc, but that's what came in mind right now.

是的NodeJS一个完美的替代,并没有问题应该工作。由于导轨采用 execjs ,则可以在自述看到节点支持作为JavaScript运行。

Nodejs is a perfect replacement and should work without a problem. Since rails uses execjs, you can see in the Readme that node is supported as a javascript runtime.

这篇关于问题上安装odroid Gitlab(V8 lib中不可用?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆