-
Notifications
You must be signed in to change notification settings - Fork 120
libv8 on Windows #29
Comments
libv8 is currently not supported on Windows. It should be doable in theory, and we'd love to have somebody contribute this, and would be very open to helping out, but we know very little indeed about the Windows platform. On Feb 10, 2012, at 9:28 AM, yagmurdursun wrote:
|
so should I change my platform? |
Not supporting windows make me so sad~~, I can't change my plateform. I've installed ubuntu linux as the second system, but I can only connect to network by a software that only supports windows. |
I'm not happy about it myself. It's not about any ill will or malice towards Windows, but we just don't have access to the computers. If somebody were to donate a windows box, or a copy of windows with legit licences for the OS and the devtools required, then that would be a great start, but as it stands, we're stuck in the water. On Feb 13, 2012, at 8:50 AM, suffering wrote:
|
finally I went to work on ubuntu :/ |
=( |
I'm working in Windows on VirtualBox with Debian. One monitor for Debian and one for Windows... Internet works like just plug an another computer on lan, you can even copy/paste between systems and it works pretty fine for me for that kind of problems. :) |
On windows 7, with ruby193 I installed python27, I added to the PATH variable the python's folder, I wrote gem install libv8 in the console and libv8 was succesfully installed |
diegomesata, can you elaborate more on this? which path variable? and where is it? |
You can find the PATH variable in Windows in Control Panel -> System -> Advanced System Configuration -> Environment Variables. My PATH variable is: C:\Ruby192\bin;C:\Python27 In a Command Prompt with Ruby, you can set the variable for that console using the command SET PATH=C:\Ruby192\bin;C:\Python27 You can check the values using the command PATH Hope this helps |
Ohh dont forget to install the Ruby Dev Kit https://github.com/oneclick/rubyinstaller/wiki/Development-Kit |
diegomesata, thanks a lot. it works |
@diegomesata Does that mean you able to get therubyracer to install? |
hello cowboyd, no, I can't install therubyracer (yet). I'm working on windows 7 64 bits, the error I got trying to install the gem is: g++.exe: c:/Ruby192/lib/ruby/gems/1.9.1/gems/libv8-3.3.10.4/lib/libv8/build/v8/libv8.a: No such file or directory Looks like some process building libv8 by hand in a static way for windows could fix the issue, like suggest http://code.google.com/p/pyv8/wiki/HowToBuild that was getting a similar error on osx. My current project doesn't need therubyracer, so, in the Gemfile I commented the #gem 'therubyracer' |
I'm having the same problem as @diegomesata. I actually could install the libv8 gem after installing python 2.7.x but the therubyracer gem still won't install because there is no compiled binary for libv8.a, so the install process gives me the same error as specified above. If someone builds/compiles this file for windows 7 64 bit environment, let me know because I think it will solve the problem! |
@cowboyd I'll be glad to help with compiling it if you could point out what I should be doing - I have win7 764bit |
Same problem here. Win7, 64bit
If I try installing libv8 in command line with above input, I get a window error dialogue with title 'patch.exe' and a text saying that 'patch.exe has stopped working'. The console does not display any other information, and it claims it has successfully installed libv8, which it actually isn't. After on, if I do bundle install, 'therubyracer (0.10.1)' will still fail to install with a error message 'libv8.a' missing. I need 'therubyracergem' to use 'twitter-bootstrap-rails' gem. |
Hi, if I build from master, it fails with below error message.
|
let's try compiling manually first:
|
I am new to rake and gem so I have not done any manual compiling before. I am not sure if I am doing things right. I first cloned And then I ran But it seems that the command fails from
|
I should mention that you will need make, subversion and python installed in order to build. |
I am sure that I have 'git', 'svn', 'python' command added to the path, but I do not think I have 'make'. I uses ruby dev kit (http://rubyinstaller.org/add-ons/devkit/) which compiles some of the gems that requires C based compile. |
I don't have experience with it, but ruby extensions require make to compile, so it must be on the system somewhere. Perhaps devkit has it stashed away somewher off the main path? |
@cielo I've again update to a 3.11 which should have several enhancements to the upstream build. Any chance you can get it to work? |
It still produces an error.
|
@cielo try to type in console
I'm getting following
|
for libv8
for therubyracer My build fails because patch.exe fails. I change patch to this and get following error
Here it is, but in libv8 it's now called libv8_include_path |
yes, we need to patch older versions of the rubyracer because it is using the newer version of libv8, not the one that is in the bundle. This is why in the latest version of the rubyracer, we explicitly activate a compatible version of libv8: https://github.com/cowboyd/therubyracer/blob/master/ext/v8/build.rb#L6 However, if you can get libv8 to build, then we're really close. Tell me, can you build therubyracer from master? |
|
I didn't see any error while installing gem because it's fails silently. Here is the fix
|
I'm actually not sure if it's possible to build libv8 on windows with Mingw, because V8 gyp-files on windows generating MSVC project. Or am I wrong? All I could find about building V8 with MinGW, mention Scons. So those are old instructions. But SConstruct still there. |
It appears that i didn't
After editing Makefile (replace
After editing extconf.rb puts `env CXX=#{compiler.sub('\\','/')} LINK=#{compiler.sub('\\','/')} make #{libv8_arch}.release GYPFLAGS="-Dhost_arch=#{libv8_arch}"` Getting
After editing
So it's still unsuccessful. One more additional check |
fyi, you don't need to use the libv8 gem to build therubyracer. You can also install from source as a shared library. |
I can't build v8 on windows with mingw. So this mean I can't build therubyracer anyway. Or am I wrong? |
There is hardcode in GYP: for windows it supports only one toolchain I believe that easiest way here: try to do cross compilation with |
Yikes! It does look like there is some fairly fresh work happening in this area to get it working, which you probably saw on google. Is this you or somebody else? http://code.google.com/p/v8/issues/detail?id=2197 |
It's somebody else. I get further then him. I was able to run v8 build against MinGW. But it doing nothing ( |
I builded v8 on windows with following command But it seems didn't produce |
Hmm... it looks like the scons build does not generate two separate static libraries for base and snapshot. But that's OK. I think you just need to link directly against |
I successfully build |
Another option is to compile v8 with Visual Studio Express. And try to link against it. According to this post it's possible. |
Solution found! 100% working... The reason for all of these problems is the therubyracer-0.11.0beta1-x86-mingw32.gem and the v8.dll. I have complied the necessary dlls and gem files and upload them to github. download the package and follow the instructions... https://github.com/hiranpeiris/therubyracer_for_windows good luck :-) |
I was able to compile a static library on Windows with VS 2008 express without any patching whatsoever. Not sure if I can link therubyracer against it with mingw's linker though. @cowboyd do you think this is practical enough to be worth the time (as in do you think you can provide Windows binaries if we are able to automate the compilation process, having in mind the required stuff below)? Prerequisites for compilation:
Also it would be great if somebody with more than my 30 minutes of experience with C++ on Windows would lend a hand 😄 |
I think simple way of installation is better than compile it from the On Thu, Jan 24, 2013 at 8:25 AM, Petko Bordjukov
|
@hiranpeiris I think we can all agree that the simplest installation is the way to go. The simplest way to get there is to have a fully automated build from source that can then be leveraged to construct binary releases. That's not to detract from the work you have done at all. I think it's awesome, and I will be sure to point Windows users to your project. @ignisf If you can automate the build, then I'd be happy to provide windows binaries. A |
The question if the ibv8 builded with VS 2008 will be compatible with Ruby builded with MinGW. I believe not. I saw post about converting VS binaries to MinGW (or make them compatible). @luislavena can you consult us about this question? @hiranpeiris,@ignisf see options and those PRs #40, #41 |
If libv8 is build as static object, it might be possible to link, but also will use other CRT function references that is not available by basic MSVCRT. If libv8 is build as shared resource: it will link to a different version of the CRT and that is a recipe for crash.
I don't think scons support cross-compilation that can be used to produce libv8 in linux that targets Windows. The best approach is introduce changes to this project that allow native compilation of libv8 static library and release those as |
Please provide a Windows version. Unix is great, but many of us need Windows support. |
See #111 |
@cowboyd @stereobooster ,i want to install libv8 gem of lastest version (3.16.14.3) on windows also, after getting ready v8 and dependencis ,when i build v8 and print |
Hoping somebody with sufficient windows knowledge will follow up on #126 |
This error is about a libv8-3.11.8.17\ext\libv8\builder.rb script.
This is a wrond python command syntax in Windows. You should use a double quotes, like this:
After fixing this script, you should run gem install with "-l" (use local only) key. If you don't, gem will download a script with an error again. |
|
I work on Windows and I developed an application. It was working but after installed a gem (twitter-bootstrap-rails) I started to get "Python not found." What can I do about it?
Installing libv8 (3.3.10.4) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
c:/Ruby192/bin/ruby.exe 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=c:/Ruby192/bin/ruby
Checking for Python...Unable to build libv8: Python not found!
The text was updated successfully, but these errors were encountered: