Closed rriemann closed 8 years ago
Hello,
Thank you for reporting this issue!
First, I wonder why I cannot use the binary built available for arm.
Because we don't have any trusted ARM systems to build binaries on.
Then, I wonder why also the compilation files. :(
Because we don't have any ARM systems to test on.
Could you please test if the armv7l
branch works for you?
Add this to your Gemfile
:
gem "libv8", github: "cowboyd/libv8", submodules: true, branch: "armv7l"
Thanks!
Honestly, I tried making a QEMU ARM VM... It takes more than a day to compile V8. It's just not practical :(
Thanks for your quick response!
I'm compiling right in the cloud the branch you mentioned plus an other version based on libv8 v5.0.x. I will let you know about the result.
Compiling seems to take indeed a long while. Configuring bundler to use 4 jobs does not seem to be taken into account.
For both test, I created two separate Gemfiles in distinct folders and run bundle install --no-deployment --without test development --path vendor/bundle
.
How can I copy over/package the binary gem to use it later in my production project? Is rsyncing vendor/bundle sufficient?
Especially because compiling does take so much time, it would be even more worth to have a binary version. Would a Rasberry Pi be a compatible, trusted platform? :smile:
Compiling seems to take indeed a long while. Configuring bundler to use 4 jobs does not seem to be taken into account.
Running MAKEFLAGS+=-j4 bundle install
should speed up the build.
How can I copy over/package the binary gem to use it later in my production project? Is rsyncing vendor/bundle sufficient?
It should be.
Would a Rasberry Pi be a compatible, trusted platform? π
Only if it's under my physical control.
I try to install mini_racer and actually it seems to expect some files in armv7l.release
, but the files are actually in arm.release
.
g++: error: /usr/local/rvm/gems/ruby-2.3.1/gems/libv8-5.0.71.48.3-arm-linux/vendor/v8/out/armv7l.release/obj.target/tools/gyp/libv8_base.a: No such file or directory
libv8
mini_racer
(gem 'mini_racer', github: 'discourse/mini_racer'
) because the currently released one requires libv8
5.0 and the V8 version of the armv7l
branch here is > 5.3.Sorry for the uninformed questions:
gem uninstall
sufficient?If I would apply the arm patch to your HEAD, will I still be able to compile with libv8 5.0?
Is gem uninstall sufficient?
yes.
I'm using your tag https://github.com/cowboyd/libv8/tree/v5.0.71.48.3 and applied your last arm patch from armv71 to it: rriemann@1532215
Had not noticed that. Doing this should be OK.
So that's what I did in the initial case and I still ran into the problem.
I'm still investigating an other problem. Apparently, mini_racer cannot find libv8. As compiling is slow, testing is rather difficult. I let you know once I tracked further down the issue.
Indeed the issue I'm seeing is the same you noticed:
g++: error: /usr/local/rvm/gems/ruby-2.3.1/gems/libv8-5.0.71.48.3-arm-linux/vendor/v8/out/armv7l.release/obj.target/tools/gyp/libv8_base.a: No such file or directory
------------ this should be arm --------^
When mini_racer
is asking the libv8
gem for compiler parameters, the libv8
gem should construct the path to the .a
files from Libv8::Arch.libv8_arch
. Which should return arm after applying my patch, unless it doesn't work :D
I'm not sure if I understand the subtlety when the arch is arm and when armv7l. Could you create an issue for mini_racer than if you think that's their department?
It seems to me that libv8 is always downloaded and compiled from scratch when I run bundle install and installation has failed at some point before. Compilation is indeed very slow⦠:/
can you add me a user on an ARM system so I can take a look for myself? My ssh keys can be found here: https://petko.me/pubkey.txt
Could you create an issue for mini_racer than if you think that's their department?
mini_racer
's not at fault here
I've sent you a mail.
last attempt with a Gemfile containing my libv8 branch (v5.0) and mini_racer
bundle package
The git source `git://github.com/rriemann/libv8.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config
git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching git://github.com/rriemann/libv8.git
Cloning into 'vendor/depot_tools'...
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 1.13.2
Using libv8 5.0.71.48.3 from git://github.com/rriemann/libv8.git (at patch-5.0.71.48.3-arm-linux@1532215)
Installing mini_racer 0.1.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/discourse/libv8-testing-v5.0/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.3/ext/mini_racer_extension
/usr/local/rvm/rubies/ruby-2.3.1/bin/ruby -r ./siteconf20161005-11956-166vwxb.rb extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rvm/rubies/ruby-2.3.1/bin/$(RUBY_BASE_NAME)
/usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- libv8 (LoadError)
from /usr/local/rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from extconf.rb:2:in `<main>'
extconf failed, exit code 1
Gem files will remain installed in /home/discourse/libv8-testing-v5.0/vendor/bundle/ruby/2.3.0/gems/mini_racer-0.1.3 for inspection.
Results logged to /home/discourse/libv8-testing-v5.0/vendor/bundle/ruby/2.3.0/extensions/armv7l-linux/2.3.0/mini_racer-0.1.3/gem_make.out
An error occurred while installing mini_racer (0.1.3), and Bundler cannot continue.
Make sure that `gem install mini_racer -v '0.1.3'` succeeds before bundling.
I've pushed a binary for ARM. I'm hoping somebody will donate an ARM box for us to do this in the future. Again, make sure you do a gem uninstall libv8
before trying to install mini_racer
again.
And boy does asset crunching run slow on ARM πππ¬π¬π¬
@edouardb FYI Discourse should run fine on Scaleway now with mini_racer
instead of TRR
I want to use discourse/mini_racer on my armv7l ubuntu maschine (Scaleway hoster). Unfortunately, I have a problem with the libv8 dependency.
First, I wonder why I cannot use the binary built available for arm.
Then, I wonder why also the compilation files. :(