Install libv8 for ree on Mountain Lion fails

I have been trying to find a solution for this in a few days and with no luck. If someone successfully installed the libv8 gem for REE 1.8.7 on ML, could you tell me the process you followed?

I have both the Xcode LLVM compiler and the Kennethreitz GCC package for installing 10.7+ v2.

Exit when trying to install using internal extensions:

  Building native extensions.  This could take a while ...
 ERROR: Error installing libv8:
     ERROR: Failed to build gem native extension.

         /Users/XXXXX/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby 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 = / Users / XXXXX / .rvm / rubies / ree-1.8.7-2012.02 / bin / ruby
 extconf.rb: 13: uninitialized constant Gem (NameError)
 Checking for Python ...

 Gem files will remain installed in /Users/XXXXX/.rvm/gems/ree-1.8.7-2012.02/gems/libv8-3.3.10.4 for inspection.
 Results logged to /Users/XXXXX/.rvm/gems/ree-1.8.7-2012.02/gems/libv8-3.3.10.4/ext/libv8/gem_make.out 

(The recorded results coincide with the error).

+6
source share
2 answers

It worked for me.

RUBYOPT=-rrubygems gem install therubyracer 
+4
source

I was able to successfully install the libv8 gem on Mountain Lion on the recently installed ree-1.8.7. I believe that the problem you see is related to the version of GCC being used.

As now described in the osx-gcc-installer README , you must switch from the LLVM version of Kenneth Reitz's GCC to GCC 4.2 to be available through Homebrew or Macports.

Pets instructions: http://coderwall.com/p/dtbuqg

MacPorts Instructions: http://coderwall.com/p/pagj2w

Note that you will want to set the CC path and set up the necessary symbolic link, as described in these articles.

+1
source

Source: https://habr.com/ru/post/915103/


All Articles