rubyjs / libv8

Ruby gem binary distribution of the V8 JavaScript engine
269 stars 121 forks source link

Gem does not install on Cygwin #81

Closed starrychloe closed 11 years ago

starrychloe commented 11 years ago
../src/platform.h:77:12: error: new declaration ‘int random()’
/usr/include/cygwin/stdlib.h:29:6: error: ambiguates old declaration ‘long int random()’

Here is the transcript:

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

        /usr/bin/ruby.exe extconf.rb
creating Makefile
Using compiler: /usr/bin/g++
which: no gmake in (/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/system32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn/VSShell/Common7/IDE:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Program Files/Heroku/bin:/cygdrive/c/Program Files/ruby-1.9.2/bin:/cygdrive/c/Program Files/git/bin:/cygdrive/c/Program Files/git/cmd:/cygdrive/c/Program Files/DTN/IQFeed:/cygdrive/c/Program Files/OpenVPN/bin:/cygdrive/c/Program Files/Java/apache-ant-1.8.3/bin:/usr/lib/lapack:/cygdrive/c/Program Files/Notepad++:.:/cygdrive/c/Program Files/Java/android-sdk/platform-tools/:/cygdrive/c/Program Files/Java/android-sdk/tools/:/cygdrive/c/Program Files/Java/jdk1.7.0_03/bin)
In file included from ../src/conversions-inl.h:42:0,
                 from ../src/conversions.cc:32:
../src/platform.h:77:12: error: new declaration ‘int random()’
/usr/include/cygwin/stdlib.h:29:6: error: ambiguates old declaration ‘long int random()’
make[1]: *** [/usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/conversions.o] Error 1
make: *** [ia32.release] Error 2
/usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/ext/libv8/location.rb:36:in `block in verify_installation!': libv8 did not install properly, expected binary v8 archive '/usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/tools/gyp/libv8_base.a'to exist, but it was not found (Libv8::Location::Vendor::ArchiveNotFound)
        from /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/ext/libv8/location.rb:35:in `each'
        from /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/ext/libv8/location.rb:35:in `verify_installation!'
        from /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/ext/libv8/location.rb:26:in `install!'
        from extconf.rb:7:in `<main>'
GYP_GENERATORS=make \
build/gyp/gyp --generator-output="out" build/all.gyp \
              -Ibuild/standalone.gypi --depth=. \
              -Dv8_target_arch=ia32 \
              -S.ia32  -Dv8_can_use_vfp_instructions=true
make[1]: Entering directory `/usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out'
  CXX(target) /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/allocation.o
  CXX(target) /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/atomicops_internals_x86_gcc.o
  CXX(target) /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum.o
  CXX(target) /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/bignum-dtoa.o
  CXX(target) /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/cached-powers.o
  CXX(target) /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/conversions.o
tools/gyp/preparser_lib.target.ia32.mk:79: recipe for target `/usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out/ia32.release/obj.target/preparser_lib/src/conversions.o' failed
make[1]: Leaving directory `/usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/vendor/v8/out'
Makefile:154: recipe for target `ia32.release' failed

Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/libv8-3.11.8.13/ext/libv8/gem_make.out
ignisf commented 11 years ago

Hello @starrychloe,

Currently there is no upstream support for v8 compilation under Cygwin or MinGW. The only official support build for Windows is with MS VS 2008 and the compiled library cannot be used with Cygwin and MinGW.

We are currently working on cross-compilation support for arm which will pave the way to eventual Windows support. We hope we will be able to eventually release Windows binaries (MinGW first) and the best case scenario will be to enable native compilation. However while there is little to no modification of the GYP scripts necessary for ARM as it is officially supported by v8, MinGW and Cygwin support have to be implemented from the ground up.

P.S. Needless to say any help with this will be appreciated.

ignisf commented 11 years ago

Duplicate of http://code.google.com/p/v8/issues/detail?id=2127

starrychloe commented 11 years ago

It works with version 3.11.8.0.

$ gem list libv8

*** LOCAL GEMS ***

libv8 (3.11.8.0, 3.3.10.4)