0

I've tried following some of the advice to uninstall libv8 and reinstall it, then run bundle, but it doesn't seem to work. I'm trying to install twitter-bootstrap-rails with less.

> gem install libv8 -v 3.16.14.3 -- --with-system-v8
Done installing documentation for  after 0 seconds
> bundle update
Updating git://github.com/seyhunak/twitter-bootstrap-rails.git
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake (10.3.1)
Using i18n (0.6.9)
Using minitest (4.7.5)
Using multi_json (1.9.2)
Installing thread_safe (0.3.3)
Installing tzinfo (0.3.39)
Using activesupport (4.0.2)
Using builder (3.1.4)
Using erubis (2.7.0)
Using rack (1.5.2)
Using rack-test (0.6.2)
Using actionpack (4.0.2)
Using mime-types (1.25.1)
Using polyglot (0.3.4)
Using treetop (1.4.15)
Using mail (2.5.4)
Using actionmailer (4.0.2)
Using activemodel (4.0.2)
Using activerecord-deprecated_finders (1.0.3)
Using arel (4.0.2)
Using activerecord (4.0.2)
Using bcrypt (3.1.7)
Using bundler (1.5.2)
Using coffee-script-source (1.7.0)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Installing thor (0.19.1)
Using railties (4.0.2)
Using coffee-rails (4.0.1)
Using orm_adapter (0.5.0)
Using warden (1.2.3)
Installing devise (3.2.4)
Using hike (1.2.3)
Using jbuilder (1.5.3)
Using jquery-rails (3.1.0)
Using json (1.8.1)
Using kaminari (0.15.1)
Using libv8 (3.16.14.3)
Using tilt (1.4.1)
Using sprockets (2.11.0)
Using sprockets-rails (2.0.1)
Using rails (4.0.2)
Using rdoc (4.1.1)
Using ref (1.0.5)
Installing sass (3.2.19)
Installing sass-rails (4.0.3)
Using sdoc (0.4.0)
Using simple_form (3.0.2)
Using sqlite3 (1.3.9)

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling array.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling backref.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling constants.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling constraints.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling context.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling date.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling exception.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling external.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling function.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling gc.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling handles.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling heap.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling init.cc
clang: warning: argument unused during compilation: '-rdynamic'
init.cc:11:20: warning: empty parentheses interpreted as a function declaration [-Wvexing-parse]
    v8::Locker lock();
                   ^~
init.cc:11:20: note: remove parentheses to declare a variable
    v8::Locker lock();
                   ^~
init.cc:11:16: warning: 'lock' has C-linkage specified, but returns user-defined type 'v8::Locker' which is incompatible with C [-Wreturn-type-c-linkage]
    v8::Locker lock();
               ^
2 warnings generated.
compiling invocation.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling locker.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling message.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling object.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling primitive.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling rr.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling script.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling signature.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling stack.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling string.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling template.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling trycatch.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling v8.cc
clang: warning: argument unused during compilation: '-rdynamic'
compiling value.cc
clang: warning: argument unused during compilation: '-rdynamic'
linking shared-object v8/init.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [init.bundle] Error 1

make failed, exit code 2

Gem files will remain installed in /Users/****/.bundler/tmp/63501/gems/therubyracer-0.12.1 for inspection.
Results logged to /Users/****/.bundler/tmp/63501/extensions/universal-darwin-13/2.0.0/therubyracer-0.12.1/gem_make.out
An error occurred while installing therubyracer (0.12.1), and Bundler cannot
continue.
Make sure that `gem install therubyracer -v '0.12.1'` succeeds before bundling.

I'm not sure what else to do at this point. Should I try uninstalling the gems and reinstalling them?

CPride
  • 95
  • 3
  • 11
  • try this `bundle config build.therubyracer -- --with-system-v8` and run bundle again – Roman Kiselenko Apr 20 '14 at 06:06
  • Unfortunately it didn't work. – CPride Apr 20 '14 at 06:37
  • What's in the gem_make.out? – Frederick Cheung Apr 20 '14 at 07:01
  • Same thing I originally posted, make file exit code 2 and such. – CPride Apr 20 '14 at 07:23
  • As a tip - when your environment says it cannot build a gem's `native extension`, it means you/ve not got the required dependencies (C++ header files) installed. This can be a DLL or full-blown binary - but you'll generally need to look for the supporting files for your gem – Richard Peck Apr 20 '14 at 08:19
  • I had a similar problem with mysql gem and found out that I have to have required libraries (OS libraries) installed first before trying to install the gem. – Yan Foto Apr 20 '14 at 10:01
  • possible duplicate of [Ruby Gem install Json fails on Mavericks and Xcode 5.1 - unknown argument: '-multiply\_definedsuppress'](http://stackoverflow.com/questions/22352838/ruby-gem-install-json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul) –  Apr 20 '14 at 11:02
  • Which dependencies am I missing, and where can I find them? – CPride Apr 20 '14 at 15:39

3 Answers3

0

Just had this problem. I am on OSX 10.9.1 Try upgrading your xcode and try bundle install again.

damuz91
  • 1,461
  • 2
  • 21
  • 37
0

If you are working on windows then less file will not work.

SNEH PANDYA
  • 797
  • 7
  • 22
0

I found a workaround to the above problem.

This is more of a compatibility among libv8 and therubyracer.

gem install libv8 -v '3.3.10.4' -- --with-system-v8

gem install therubyracer -v '0.10.2'

This should work fine as both the versions are compatible with me. Initially I was trying to install the version 0.12.0 for therubyracer and was facing the issue. Once I switched to version 0.10.2, everything worked fine.

My current OS: Mavericks

arpiagar
  • 4,314
  • 1
  • 19
  • 12