I'm trying to use twitter-bootswatch-rails on Rails4

$ cat /proc/version
Linux version 3.18.10+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #774 PREEMPT Wed Mar 25 13:58:34 GMT 2015
  1. twitter-bootswatch-rails '~> 3.1.1' needs less-rails (>= 2.3)
  2. less-rails v2.3 needs 'less', '~> 2.3.0' and therubyracer "~> 0.10.0"
  3. less v2.3 needs "therubyracer", "~> 0.11.0"
  4. therubyracer v0.11.0 needs 'libv8', "~> 3.11.8"

My Raspbian only offers

$ sudo apt-cache search libv8
libv8- - v8 JavaScript engine - runtime library

and I don't know how to have v3.11.8 libv8 installed / built from source.

I see many articles about libv8 and therubyracer problems, but not really Raspberry Pi specific.

If anyone has solved this tangling dependency problem on a Pi, I would like to know how it's done.

  • im having the same issue.. did you find a solution? thanks – merge delete Apr 13 '15 at 19:50
  • sadly not yet... should we ask to ordinary stackoverflow.com site and ask under as a "ruby" issue? – kukrt Apr 15 '15 at 2:11
  • yes lets go ahead, post it and sent me the link so i can see/help – merge delete Apr 19 '15 at 0:25
  • Any updates on this issue? I think that I am about to run into this issue, w.r.t. the Razberry Z-Wave. – Greenonline Oct 7 '15 at 15:11

As I have already commented, I may be running into this issue shortly, as I am planning on using a Razberry, a RPi dongle for use with Z-Wave home automation devices.

The partial answer to your question, and I am paraphrasing it heavily, "Is lib8 on my machine, and if not how do I get it on there?", may be found in a small, typo riddled, article from the Razberry support pages, Will Z-Way run on my specific platform?/How to check is v8 runs on my platform?[sic]

How to check is v8 runs on my platform?

Take a copy of v8 source code (we use a specific commit) and compile it. Once done, go to v8/out/XXX.release/ and run d8 binary. If it runs, your platform is 99% supported by Z-Way. If not, read further. May be some advices would help you.

The snipplet below shows commands you need to execute for most common cases.

git clone https://github.com/v8/v8
(cd v8 && git checkout 38d2d515ddeace8ea4719938f86edf316d29b576)
make -C v8 dependencies
LINK="g++" LD="g++" make -C v8 i18nsupport=off library=shared x64.release

Change x64 to ia32 or arm or mipsel depending on your CPU. MIPS big endian is not supported by v8, but we have our own port to this platform tested on some CPUs. Please contact us if you need MIPS big endian.

If you are using cross-compilation, prior to compilation you need to define CC, CXX, AR and RANLIB environment variables and CFLAGS and LDFLAGS.

For the RPi

export CFLAGS = -march=armv6 -mfpu=vfp -mfloat-abi=hard
export CXXFLAGS = -march=armv6 -mfpu=vfp -mfloat-abi=hard

In this example we define specific ARM EABI and set VFP variant. You need to compile arm.release armv7=false hardfp=on snapshot=off armfpu=vfp armfloatabi=hard (these params instructs v8 to build the code with hardfp EABI).

For some ARMv6 processors you will need to apply our patch:

patch -p0 <<END
--- v8/src/cpu.cc       2014-02-11 13:02:05.810134031 +0400
+++ v8/src/cpu.cc       2014-02-11 13:04:09.118128534 +0400
@@ -379,7 +379,12 @@ CPU::CPU() : stepping_(0),
     // an ARMv6-one. For example, the Raspberry Pi is one popular
     // ARMv6 device that reports architecture 7.
     if (architecture_ == 7) {
-      char* processor = cpu_info.ExtractField("Processor");
+      char* processor;
+      processor = cpu_info.ExtractField("Processor");
+      if (HasListItem(processor, "(v6l)")) {
+        architecture_ = 6;
+      }
+      processor = cpu_info.ExtractField("model name");
       if (HasListItem(processor, "(v6l)")) {
         architecture_ = 6;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.