unable to build therubyracer/libv8 on arm A10 #255
Comments
What version of the libv8 gem are you using? |
I am using libv8-3.11.8.17 |
Sry I did not express myself clearly enough -- are you using the version from rubygems or did you clone the github repo and compile it manually? :) |
No problem, I am doing a "bundle install --deployment --without development test mysql", therefore I would assume it downloads the version from rubygems or? I am just following the guide at https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md. |
Ok... Clone https://github.com/cowboyd/libv8, checkout the diff --git a/patches/fPIC-on-x64.patch b/patches/fPIC-on-x64.patch
index 7388132..a95341a 100644
--- a/patches/fPIC-on-x64.patch
+++ b/patches/fPIC-on-x64.patch
@@ -6,7 +6,7 @@ index ebdf557..c7a59bc 100644
[ 'OS=="linux"', {
'cflags': [ '-ansi' ],
}],
-+ [ '(OS=="linux" or OS=="freebsd" or OS=="solaris") and v8_target_arch=="x64" and component=="static_library"', {
++ [ '(OS=="linux" or OS=="freebsd" or OS=="solaris") and (v8_target_arch=="x64" or v8_target_arch=="arm") and component=="static_library"', {
+ 'cflags': [ '-fPIC' ],
+ }],
[ 'visibility=="hidden"', { |
Same error, double checked the patch file (needed to apply patch file after bundle exec rake build, otherwise it was overwritten by some checkout). Build took nearly 45min. Also applied the patch after the rake build manually "patch -N -p1 -d vendor/v8 < patches/fPIC-on-x64.patch", because it seems at bundle exec rake build the old patch will checkout and applied. But did not changed anything. |
Any idea? Still not able to build gitlab with the libv8. |
Hi! I had the exact same problem as Lyann. Thanks ignisf for the patch, that worked great! Though, to actually make use of the patch you can't simply run a
After this, it seems to run just fine! :) |
@Hrym, can you test if the newly released versions of therubyracer and libv8 compile correctly on your system, too? |
@ignisf, I have now tested the latest releases, therubyracer 0.12.0 and libv8 3.16.14.3. Both compile fine when |
I am still seeing this problem on libv8 3.16.14.3 and therubyracer 0.12.1 |
You can try the following, it works for me on armv7
In patches directory, edit the line in fPIC-for-static.patch
Then
Installing therubyracer
In the rubyracer gemfile edit and add the following
|
Thanks I'll give that a try |
@anomaly256 Does it work ? |
I will try it in the next day or 2 and report back, I've just been kept busy with a customer's project |
followed the instructions and it works for me flawlessly on armv7l debian jessi. |
Cool, Someone who can try on a Pi to validate this PR rubyjs/libv8#132 ? |
Here are the options to create a GitLab installation: https://about.gitlab.com/installation/ |
resolved with #132 |
Hello,
currently having the problem to be unable to build therubyracer, because libv8 linking error. I tried to hack the compiler switch -fPIC into libv8/therubyracer, but without any success. Also there are a bit too much makefiles scons/rakefile/gby therefore not so easy to find the correct position where to add. Would be nice if someone could help me, I wasted already too much time into it. Setting up a qemu with an A10 vexpress image would be next step, but requires some time. Cannot use the system libv8 because it's very old, using currently the linaro quanta image on a cubieboard.
Thanks in advance
Copy & paste of the error at building:
Installing therubyracer (0.11.4)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
checking for main() in -lpthread... yes
creating Makefile
...
linking shared-object v8/init.so
/usr/bin/ld: /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/libv8-3.11.8.17/vendor/v8/out/arm.release/obj.target/tools/gyp/libv8_snapshot.a(libraries.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/1.9.1/gems/libv8-3.11.8.17/vendor/v8/out/arm.release/obj.target/tools/gyp/libv8_snapshot.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [init.so] Error 1
Gem files will remain installed in /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.4 for inspection.
Results logged to /home/git/gitlab/vendor/bundle/ruby/1.9.1/gems/therubyracer-0.11.4/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.11.4), and Bundler cannot continue.
Make sure that
gem install therubyracer -v '0.11.4'
succeeds before bundling.The text was updated successfully, but these errors were encountered: