Closed sKenDread closed 10 years ago
hmm, I wanted to give it a try ... since I don't have a Windows box I created a Windows Server 2012 instance on Amazon EC2 ...
but I don't even get v8 to compile with cygwin :-/
Which version did you use? Any special flags to make there?
cheers, stesie
NB: the config.m4 code currently is hard-coded to .so (instead of .dll common under Windows), besides it wants to -rpath link, which doesn't seem to work under Windows likewise.
Hi Stesie, I installed Cygwin64 and made sure every single option was installed. This took quite a few hours so I left my machine running all weekend. Upon returning to work today I found it was completely installed.
These are the steps I took. most of them from this link: https://code.google.com/p/v8/issues/detail?id=2992#c2
I am still learning how to do all of this so this is very new to me. After initiating build the machine didn't show any thing apart from me noticing the Microsoft compiler in task bar was active for more than 30 mins.
Although some of the below didn't work, I made a few changes: But after all that. It still threw errors. I am learning though //=================================================================
Ahh, okay, so you ended up compiling v8 with Visual Studio and have a v8.dll file around somewhere, right?
I initially thought you (successfully) compiled v8 with g++ or mingw instead of Visual Studio.
Tonight I tried the same, i.e. compile v8 with Visual Studio, ... successfully. However I've used VS 2013 Express
... I think it's possible bot so far have no clue to use the DLL with Cygwin (v8js) then. Contrary I was considering building PHP & V8Js with Visual Studio also. But had no time so far.
Oh please would you tell me how you did it. please excuse my explanation. What you have done, I am trying to do myself. I am also using VS 2013 Express
Just an update. Apologies... I did not say thank you previously for responding.The previous example was to compile V8. Which I have managed to do successfully... I think. The output is in the build/release folder. Next, I tried compiling V8js using
The first attempt stopped after not finding the local V8 files.
I Looked at the config file and found that it was looking for V8 in the /usr/local directory. So I copied over the include folder from V8 to usr/local. Am I doing something wrong here?
Sorry for the confusion. It looks like we are at the same stage. Yes V8 compiles. No V8Js wont in windows. On line 4272 I see the SEARCH_PATH array SEARCH_PATH="/usr/local /usr" Which looks like its trying to find the V8 comp there.
yes, this is you have a v8.dll file (together with some more *.dll files) around.
The problem is, that g++ (as part of cygwin) cannot directly link against .dll file but it needs it's own intermediary format (aka import library); i.e. I think in order to go with php on cygwin with v8 compiled in VS 2013 we first need to build the import library ...
Alternative still: build PHP with VS as well and V8Js in turn (with VS)
But I need to dig deeper first, maybe towards the weekend.
Just to let you know, still work in progress, but ...
it works to some degree :) ... as you can see it launches the engine and prints the text. Somehow it crashes on shutdown however.
For the moment I had to comment out portions of V8Js code which cannot be compiled with Visual Studio 2013 unfortunately. But I'll follow up soon.
I completely ditched cygwin, since
... hence the need to compile PHP with Visual Studio ... the problem with that however, windows.php.net seems to still emphasize on VS 2012 ... however V8 cannot be built with VS 2012 any longer. And you cannot link a v8 built with VS 2013 against a PHP, compiled with VS 2012; the problematic thing is that windows.php.net provides the dependencies for VS 2012 only ...
... anyways, not too much of a problem if you just want to have PHP CLI with V8Js :)
Unfortunately I'm currently stuck not knowing how to debug the v8 crash on exit ... ... and I'll have to apply some fixes to V8Js ...
For the moment I hope that's enough for a teaser :D
Wow awesome. This is great news. As I said before I am still learning. But I am more than willing to help if I can
... test suite passes 55 of 77 tests :-)
Current set of patches is at https://github.com/stesie/v8js/compare/issue-123
... test suite now passes 71 tests, 2 skipped because of dependencies, 4 failed. 3 of these are related to DateTime/timezone stuff which probably just needs some love. Last not least the recursive error-unwind stuff fails (which doesn't reliably work on Linux likewise however).
Patches branch updated.
I've now merged my Windows related fixes. Apart from the recursive error-unwind stuff the test suite passes now.
Besides I've added a file README.Win32.md
outlining how to build v8 and php (including v8js).
Jenkins has build jobs on Windows as well now, see https://jenkins.brokenpipe.de/job/windows-v8js/ I've created jobs for PHP 5.5.18 and 5.6.3 both with and without thread safety.
Ive been tearing my hair out trying to figure thois one out. Ive tried both comping using the basic methods on here and also from this site https://registry.hub.docker.com/u/stesie/v8js/dockerfile/ and go to the DockerFile tab to see the code.
Im on windows 8 and i am runung this through Cygwin ... heres a snippet
$ ./configure --with-v8js=/usr/local/v8 checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether cc accepts -g... yes checking for cc option to accept ISO C89... none needed checking how to run the C preprocessor... cc -E checking for icc... no checking for suncc... no checking whether cc understands -c and -o together... yes checking for system library directory... lib checking if compiler supports -R... no checking if compiler supports -Wl,-rpath,... yes checking build system type... x86_64-unknown-cygwin checking host system type... x86_64-unknown-cygwin checking target system type... x86_64-unknown-cygwin checking for PHP prefix... /usr/local checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib checking for PHP extension directory... /usr/local/lib/php/extensions/debug-zts-20121212 checking for PHP installed headers prefix... /usr/local/include/php checking if debug is enabled... yes checking if zts is enabled... yes checking for re2c... no configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers. checking for gawk... gawk checking for V8 Javascript Engine... yes, shared checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for V8 version... NONE configure: error: could not determine libv8 version