Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

gem install libv8 failed for osx10.10 #123

Closed
alex-zige opened this issue Jun 5, 2014 · 7 comments · Fixed by #124
Closed

gem install libv8 failed for osx10.10 #123

alex-zige opened this issue Jun 5, 2014 · 7 comments · Fixed by #124

Comments

@alex-zige
Copy link

Hey guys, I'm getting those error when run bundle install in ruby 1.9.3

Creating Makefile
Compiling v8 for x64
Using python 2.7.6
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer//usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
Using compiler: g++
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer//usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Unable to find a compiler officially supported by v8.
It is recommended to use GCC v4.4 or higher
../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
                 ^
1 error generated.
make[1]: *** [/Users/alex/.rvm/gems/ruby-1.9.3-p547@viva/gems/libv8-3.16.14.3/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o] Error 1
make: *** [x64.release] Error 2

$g++ -v

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer//usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

just wonder is that because the platform: x86_64-apple-darwin14.0.0 is not current supported?

@Buyomer
Copy link

Buyomer commented Jun 5, 2014

I tried

    gem install libv8 -- --with-system-v8 

It succeeded. But then therubyracer gem couldn't installed.

@alex-zige
Copy link
Author

@Buyomer yeah.I'm in the same situation. says therubyracer cannot find and v8 and v8.h even you specify to using system-v8?! strange.

@gdavis
Copy link

gdavis commented Jun 7, 2014

Dealing with the same issue as you guys. Failed on both ruby 1.9.3 and 2.1

@alex-zige
Copy link
Author

@gdavis good to know i am not alone! I could run brew install v8 no problem. but seems libv8 cannot be installed though the source.

@nixpulvis
Copy link

Also hitting this.

sikachu added a commit to sikachu/libv8 that referenced this issue Jun 9, 2014
Without this flag, it's unable to compile libv8 on OS X 10.10 due to
this error message:

    ruby ext/libv8/extconf.rb
    creating Makefile
    HEAD is now at 7ce3fe1... Version 3.16.14
    Using existing [svn-remote "svn"]
    HEAD is now at f7bc250... Make gyp/win32 compatible with upstream ninja.
    Compiling v8 for x64
    Using python 2.7.6
    Using compiler: /usr/bin/c++ (clang version 5.1)
    ../src/cached-powers.cc:136:18: error: unused variable 'kCachedPowersLength' [-Werror,-Wunused-const-variable]
    static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers);
                     ^
    1 error generated.
    make[1]: *** [/Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o] Error 1
    make: *** [x64.release] Error 2
    GYP_GENERATORS=make \
            build/gyp/gyp --generator-output="out" build/all.gyp \
                          -Ibuild/standalone.gypi --depth=. \
                          -Dv8_target_arch=x64 \
                          -S.x64  -Dv8_enable_backtrace=1 -Dv8_can_use_vfp2_instructions=true -Darm_fpu=vfpv2 -Dv8_can_use_vfp3_instructions=true -Darm_fpu=vfpv3
      CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/allocation.o
      CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
      CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum.o
      CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/bignum-dtoa.o
      CXX(target) /Users/sikachu/Projects/libv8/vendor/v8/out/x64.release/obj.target/preparser_lib/src/cached-powers.o

This has been tested against this version of clang and OS X:

    $ g++ -v
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
    Target: x86_64-apple-darwin14.0.0
    Thread model: posix

This should fix rubyjs#123
@alex-zige
Copy link
Author

Cool awesome! Good work @sikachu ! 👍

@RamNavuluri
Copy link

Guys I am facing this issue in windows 7

I tried gem install libv8 -- --with-system-v8
It succeeded. But therubyracer gem couldn't installed.

I am using ruby 2.0.0

Please help me on this guys

sukima added a commit to sukima/ppwm that referenced this issue Mar 24, 2016
Email isn't the only thing worth showing the code. With this you can
create a DM twitter intent.

I tried to keep it simple by having a simple button group that toggles
what will be produced when the submit button is pressed.

I was **unable** to test any of this due to
[lib v8](rubyjs/libv8#123) problems so here
is the code and you can edit it as you wish.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants