Closed vadivelmsc-zz closed 9 years ago
I have that same problem. Did you managed to fix it?
Personally, I've been using it with mavericks since last October with clang.
Similar error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/nelsonenzo/.rbenv/versions/1.8.7-p358/bin/ruby extconf.rb
checking for main() in -lpthread... yes
checking for main() in -lobjc... yes
checking for v8.h... yes
creating Makefile
make
c++ -I. -I. -I/Users/nelsonenzo/.rbenv/versions/1.8.7-p358/lib/ruby/1.8/i686-darwin13.1.0 -I. -I/Users/nelsonenzo/.rbenv/versions/1.8.7-p358/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I/Users/nelsonenzo/.rbenv/versions/1.8.7-p358/include -Wall -g -rdynamic -fno-common -O3 -Wno-error=shorten-64-to-32 -pipe -fno-common -c accessor.cc
clang: warning: argument unused during compilation: '-rdynamic'
In file included from accessor.cc:1:
./rr.h:462:14: error: no type named 'AccessorGetter' in namespace 'v8'
inline v8::AccessorGetter accessorGetter() {return &AccessorGetter;}
~~~~^
./rr.h:463:14: error: no type named 'AccessorSetter' in namespace 'v8'
inline v8::AccessorSetter accessorSetter() {return RTEST(set) ? &AccessorSetter : 0;}
~~~~^
......(more errors like that last one) It doesn't seem to be finding v8, although i have the libv8 gem installed
$gem list libv8
libv8 (3.16.14.3)
@nelsonenzo that is strange indeed. It doesn't appear to be appending the libv8 include path with a -I
I had the same problem with 0.11.0, 0.12.1 solves the issue
This is the same as the issue on the libv8 repo https://github.com/cowboyd/libv8/issues/120 The C++ classes and typdefs for Accessor* are declared in v8.h, which isn't found, because the path for v8.h isn't added to INCFLAGS in Makefile, which is built by mkmf.rb based on location.rb (where does that come from?). Manually adding the path back into the Makefile on one of the INCFLAGS lines gives a temporary fix.
Is the problem that location.rb is calling mkmf.rb's find_header with "v8.h", hoping that v8.h's path will be added to INCFLAGS, but find_header expects a second argument, namely a list of paths to search, and as none is provided by location.rb the search fails immediately?
@rogermarlow I am unable to build therubyracer
, but am on Yosemite, see https://github.com/cowboyd/therubyracer/issues/304#issuecomment-54078012. You mention adding the path back into the Makefile as a temporary fix, can you elaborate?
@mattheworiordan There are some more details in my comment on the libv8 issue log.
did a brew upgrade gcc
, and it fixed the problem
OS : OS X Mavericks Ruby: ruby-1.9.3-p484
GEM_MAKE.OUT file
/Users/vadivelmsc/.rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb checking for main() in -lpthread... yes checking for main() in -lobjc... yes creating Makefile
make clean
make compiling accessor.cc Usage: : KCC [--version] [--help] command .. make: *\ [accessor.o] Error 1
make failed, exit code 2