New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HHVM Installation in windows #5460

Open
ricker07 opened this Issue Jun 9, 2015 · 51 comments

Comments

Projects
None yet
@ricker07

ricker07 commented Jun 9, 2015

Is there any way to install HHVM in windows 7, because i read about the new programming language by facebook and it requires HHVM for development. thanks in advance for an answer.

@simonwelsh

This comment has been minimized.

Contributor

simonwelsh commented Jun 9, 2015

The easiest way is to install an Ubuntu VM and run HHVM inside that. There's no Windows version of HHVM available and it doesn't currently compile on it at all.

@Orvid

This comment has been minimized.

Contributor

Orvid commented Jun 9, 2015

It's nowhere close to being able to compile it properly from windows. I've been working on adding MSVC support for a few weeks now, and I've only just gotten through adjusting the build system and most of its dependencies. Currently I'm also waiting on the RTM for VS 2015 to be released to fix a number of constexpr limitations (all but 1 that I know of are fixed in the RTM version) that are present in the RC, and are heavily used in HHVM's source code.

@ricker07

This comment has been minimized.

ricker07 commented Jun 10, 2015

hmm. your saying that there's no way to install or run HHVM in windows? :(

On 9 June 2015 at 19:43, Orvid King notifications@github.com wrote:

It's nowhere close to being able to compile it properly from windows. I've
been working on adding MSVC support for a few weeks now, and I've only just
gotten through adjusting the build system and most of its dependencies.
Currently I'm also waiting on the RTM for VS 2015 to be released to fix a
number of constexpr limitations (all but 1 that I know of are fixed in the
RTM version) that are present in the RC, and are heavily used in HHVM's
source code.


Reply to this email directly or view it on GitHub
#5460 (comment).

@paulbiss

This comment has been minimized.

Contributor

paulbiss commented Jun 10, 2015

Not currently. I'd do what @simonwelsh is suggesting for now.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Jun 29, 2015

+100 for this. I've been waiting for Windows version for about a year now. A build for development would be good enough.

@spidfire

This comment has been minimized.

spidfire commented Jul 24, 2015

@raeesiqbal Same here +1

@paulbiss

This comment has been minimized.

Contributor

paulbiss commented Jul 24, 2015

There's a lot of ongoing work here (thanks @Orvid!), my understanding is that it can now be built (perhaps with some outstanding patches to master?) but still isn't stable enough to run on windows yet.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Jul 24, 2015

I see that Building and Installing HHVM on Cygwin and Building and installing HHVM on Windows with MSVC have been updated recently and there are a lot of outstanding PRs. So, there has been a lot of progress, lets pray that they make it work soon.

I had spent about a week trying to get the typechecker to work on CYGWIN a few months back but it didn't, so, wont make the same mistake again 😄.
@Orvid when you've built the typechecker binaries successfully, please let us know.

@paulbiss

This comment has been minimized.

Contributor

paulbiss commented Jul 24, 2015

A first pass at a windows build system for Hack is up for review at #5775.

@Orvid

This comment has been minimized.

Contributor

Orvid commented Jul 24, 2015

With some outstanding patches to a version of HHVM from the start of June, MSVC 2015 can build HHVM, it is not however functional, as there is still some work I need to do in the startup process. My intention, once I finish putting up the PRs to Folly, is to start again, merging all my outstanding PRs, and see where that puts me in terms of what still needs to be submitted, what bits are temporary hacks that need to be implemented properly, and what changes are no longer needed in the master version.

I know there are also some changes that have to be made to the way some of the external dependencies are built by default, due to wanting to not try to ship a massive number of external dlls, primarily needing to have them target the static runtime rather than the dynamic one. There are even some changes needed to Boost (0.58.0) to make it compatible with MSVC 2015, although, if I were to build from the HEAD version, I don't believe those changes are needed due to a refactoring that was done for WinRT support.

Also, there's a reason the MSVC page isn't linked to in the normal instruction list, and that is that I've barely touched it. I started writing it up at one point, but ended up stopping before I got too far due to the fact there would have to be changes once the RTM version of VS 2015 was finally released.

The typechecker does not currently work on Windows, although I did have a version that compiled with a bit of work, it was not done in a way that was viable to build normally. The build system that's currently up for review is significantly more viable than the way I was doing it. (I had to call the build script 5-8 times to get it to compile with my method, and that wasn't exactly fast :D)

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Aug 20, 2015

@Orvid any updates on typechecker?

@Orvid

This comment has been minimized.

Contributor

Orvid commented Aug 20, 2015

@OCamlPro-Henry has been doing a lot of work towards the typechecker, I've not really touched it since my initial attempt. He can probably comment on what currently works much better than I can.

As far as support for Windows in the core of HHVM, I have a (very) large number of open PRs dedicated to making that happen.

@OCamlPro-Henry

This comment has been minimized.

OCamlPro-Henry commented Aug 20, 2015

@raeesiqbal We (I and @OCamlPro-Bozman) have a working typechecker. It passes the testsuite and, for instance, it is able to typecheck https://github.com/Titon/framework. Though, we still have to implements file watching and a proper timeout handling. While, not everything has been merged yet, the pending PRs should be sufficient for running the typechecker. I will add a message here when master contains a running typechecker.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Aug 21, 2015

@OCamlPro-Henry, @Orvid and @OCamlPro-Bozman thanks a ton to all of you for your work. Going to try to build it with your PRs. Will keep you updated

@Orvid

This comment has been minimized.

Contributor

Orvid commented Aug 22, 2015

For the typechecker, you actually don't need Visual Studio. You do need the MinGW edition of OCamlPro though.

With HHVM itself, I still have a few more changes locally that I need to create PRs for, and there are 17 external libs you'd have to compile, all but 2 of which have to be done specially with non-default options, due to the need to link against the static version of the runtime, there are also a couple that needed a bit of prodding to compile with VS 2015. My eventual intention is to put the compiled version of these, along with the source and instructions to build, especially for openssl and libcurl, up somewhere. I can put them up locally (I love my Google Fiber :P) temporarily if you really want to try. (poke me on the IRC and I can stick them in an archive an pass you a download link)

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Aug 22, 2015

Hey everyone, I've just tested the typecheker binaries sent by @OCamlPro-Henry to be working fine. If anyone else's interested in early access, here is the link, http://ge.tt/610q6dM2/v/0 .

These are native binaries, so, you dont need to install MS Visual Studio or Cygwin.

Here is their branch, if you want to build them yourself https://github.com/OCamlPro/hhvm/tree/hh-bin-20150822 . And here are the build instructions, https://github.com/OCamlPro/hhvm/blob/hh-bin-20150822/hphp/hack/README.win32

@jpruiz114

This comment has been minimized.

jpruiz114 commented Sep 15, 2015

Are we gonna have this option any soon?

@paulbiss

This comment has been minimized.

Contributor

paulbiss commented Sep 15, 2015

You can check with @Orvid on how the port is going. I'd stress that it's not officially supported, but we are hoping to have some CI testing for it once it's ready.

@Orvid

This comment has been minimized.

Contributor

Orvid commented Sep 15, 2015

I'm working on getting the rest of the dependencies setup for GD, mcrypt, and memcached, but I do have a build of HHVM compiling under MSVC with most of the extensions enabled, working in interpreter mode for the most part. stream_socket_select is known to be non-functional for file descriptors, but I don't (at the moment) know of any other PHP functions that are currently broken.

The single biggest thing to know about the MSVC port is that MySQL will not be supported until it is possible to compile MySQL itself under MSVC 2015. The proxygen server is also known to currently be broken, so it only supports command line invocation currently.

At the moment, due to mmap being finicky about allocations at specific addresses, a couple of asserts in rds.cpp need to be commented out, and, due to a sanity check in MSVC's implementation of vector iterators, the initialization of the unique stubs also needs to be disabled in debug mode.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Oct 24, 2015

bump

@Orvid

This comment has been minimized.

Contributor

Orvid commented Oct 25, 2015

There's still a lot of stuff upstream to get merged, and some large PRs to HHVM itself that are needed.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Dec 4, 2015

@Orvid any updates?

@Orvid

This comment has been minimized.

Contributor

Orvid commented Dec 4, 2015

Still quite a bit more to get merged, and the large PRs are still open.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Jan 30, 2016

bump...

1 similar comment
@raeesbhatti

This comment has been minimized.

raeesbhatti commented Mar 9, 2016

bump...

@SoboLAN

This comment has been minimized.

SoboLAN commented Mar 9, 2016

I'm very very interested in this as well, been following it for a long time now...

Unfortunately, unless the HHVM core team specifically assigns resources to having this feature, I don't think it's going to happen...

@fredemmott

This comment has been minimized.

Contributor

fredemmott commented Mar 9, 2016

@Orvid is now working on this for Facebook

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Mar 9, 2016

@Orvid do you have it working as fastcgi server? If so, any binaries we can test?

@OCamlPro-Henry Any new typecheker binaries for us? The ones I have are about a year old and are very prone to crashing for larger projects.

@Orvid Orvid self-assigned this Mar 14, 2016

@Orvid

This comment has been minimized.

Contributor

Orvid commented Mar 14, 2016

I don't have it working as a FastCGI server yet. I've mostly been getting all of the changes required upstream in Folly and elsewhere. The portability headers are starting to make their way into Folly, and I have diffs up internally for the rest of them. Once those are in Folly, there are only a couple of changes needed in order to get Folly compiling under MSVC.

As-to the typechecker, other than my initial attempt, I've never compiled hh_client on Windows, however it should be possible to do yourself. #6137 is open to allow multi-threaded checking, but I have no idea what the current state of that is.

@oleggusev

This comment has been minimized.

oleggusev commented May 14, 2016

Hello @Orvid,

#6968 is closed as duplicate of #6950. #6950 is closed 7 April.

So, HHWM has to work under windows 10 subsystem? is any sense to upgrade to windows 10?

Could somebody confirm - does it work on ubuntu subsystem in win10?

Thank you very much!

@Orvid

This comment has been minimized.

Contributor

Orvid commented May 14, 2016

The error that was being hit in #6968 was due to an issue in 3.13.0. I don't know if it has been tested since then though. As far as I know, the subsystem is only available in insider preview builds, so it's probably not worth upgrading to Windows 10 just for that.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Sep 3, 2016

Any updates? Please... it has been years!

@paulbiss

This comment has been minimized.

Contributor

paulbiss commented Sep 4, 2016

@Orvid is still very actively working on this, but it's a very large project. The biggest update to date is that folly (one of HHVM's most critical dependencies) now builds under windows and work is ongoing to enable windows CI. Orvid can offer a more detailed update, but we absolutely haven't forgotten about or stopped working on this issue.

You can see some of the work required to get folly building under windows here: https://github.com/facebook/folly/commits/master?author=Orvid

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Sep 5, 2016

@paulbiss Thank you for the explanation. I've been keeping an eye on Orvid's work too and he sure has done a lot of work.
My problem is not having native HHVM, it's not having native HackLang tools, which do not depend on thirdparty libs to be built. And as @Orvid pointed out earlier, there has been some work on them recently #6137, and it's probably very close to be finished.

I run HHVM inside an VM (Docker for Windows) like many others, but most of my projects are in Hack, so, I need native hh_client to work with Atom Editor and provide linting and autocomplete and stuff.

@DemiMarie

This comment has been minimized.

DemiMarie commented Sep 24, 2016

Has anyone thought of using Clang on Windows?

@fredemmott

This comment has been minimized.

Contributor

fredemmott commented Sep 24, 2016

@raeesbhatti are you using nuclide in atom by any chance? https://github.com/fredemmott/nuclide-customization is what I use for nuclide + docker

@Orvid

This comment has been minimized.

Contributor

Orvid commented Sep 25, 2016

@DemiMarie Most of the issues are not because of the compiler, rather, it's because of standard library support. Clang on Windows still uses the VC++ standard library.

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Sep 25, 2016

@fredemmott That was an excellent idea you gave me. So, I built a thing 😄
HackLang Tools

I've tested them to be working with Docker on Window and macOS. Haven't tested with Windows Subsystem for Linux, but should work.

PS: And no, I'm using Atom-Hack plugin. I tried Nuclide when it first came out, and it was super slow, so, never tried it again 😁

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Sep 27, 2016

I've just updated HackLang Tools to add support for path translation between Docker and Windows. Just download hh_client.exe from latest release and run it against your project, it should act native and should work with any IDE plugins.

@QuestionPython

This comment has been minimized.

QuestionPython commented Apr 7, 2017

Now Is there any way to install HHVM in windows Server,Xp,7,8,10? @alexchow @raeesbhatti @DemiMarie @fredemmott @Orvid @paulbiss

@raeesbhatti

This comment has been minimized.

raeesbhatti commented Apr 7, 2017

I've migrated to macOS but the last time I checked, you could install HHVM on Windows Subsystem for Linux (WSL). The typechecker worked fine and that time but the server didn't work. But that was about 6 months ago.

@itskevinsam

This comment has been minimized.

itskevinsam commented Jun 8, 2017

Well.. almost 2 years.. any progress on this?

@itsnotvalid

This comment has been minimized.

itsnotvalid commented Jun 8, 2017

@itskevinsam I don't think anyone is working on this anymore. I am quite happily using official Windows builds of PHP and the performance is good enough. I think there are many other programming languages available to write performance critical code, which makes using hhvm unnecessary.

@itskevinsam

This comment has been minimized.

itskevinsam commented Jun 8, 2017

@itsnotvalid Yep.. i am kinda leaning on that side. (it seems several high profile php projects are dropping hhvm support).

@Orvid

This comment has been minimized.

Contributor

Orvid commented Jun 8, 2017

In general I've been focusing on getting other upstream projects fully supported on Windows (Folly now is) and haven't done very much recently towards getting HHVM itself working on Windows. In theory I've already done most of the work to make it happen, but there is still quite a lot that still needs to be done to get it all the way there.

@SoboLAN

This comment has been minimized.

SoboLAN commented Jun 8, 2017

I agree with @itsnotvalid : PHP7 performance is now quite close to what HHVM offers, which makes the complexity of using HHVM not really worth it anymore.

This is quite ironic because most great stuff that were introduced in PHP7 were actually inspired from HHVM.

Because of all this, in my opinion, it's unlikely we'll ever see a significant adoption of HHVM. Unless of course some big factor of the entire story changes.

Sorry that I was somewhat offtopic :( .

@itsnotvalid

This comment has been minimized.

itsnotvalid commented Jun 9, 2017

@SoboLAN true on that, competition drives improvement.

As @itskevinsam mentioned, some projects dropped hhvm support because hhvm is playing the catching-up game with PHP7. As long as there is no external standard for PHP (like ECMAScript per se), I am not betting on hhvm to run my production code anymore, especially my code now uses PHP7.1 features.

@nahuelhds

This comment has been minimized.

nahuelhds commented Jul 12, 2017

Hi guys, just to let you know that I've reach to make HHVM work in Nuclide on Windows based on Docker and the Remote Project functionality. You can check my repo in order to make it work you too:

https://github.com/nahuelhds/nuclide-hhvm-windows

You only need to have Docker and then use the docker commands build and run nothing else, really. It's all explained at the repo itself.

Regards

@nahuelhds

This comment has been minimized.

nahuelhds commented Jul 12, 2017

I think that HHVM is still great to give performance to old PHP projects as moving forward to PHP 7 requires deprecation work (specially in big projects) while by using HHVM just works with the same codebase.

@faisalkaleem

This comment has been minimized.

faisalkaleem commented Oct 2, 2017

@nahuelhds I tried to build but got following erro:

/bin/sh: 1: node_setup_7.x: not found

Following is the execution log.

Sending build context to Docker daemon 145.9kB
Step 1/13 : FROM debian:jessie
---> 0a374bb127cf
Step 2/13 : ARG p=nuclide
---> Using cache
---> 635c0e2f86fc
Step 3/13 : ARG v=0.236.0
---> Using cache
---> d0e63d70fe52
Step 4/13 : COPY rootf /usr/local/bin
---> Using cache
---> 12996452013a
Step 5/13 : RUN node_setup_7.x
---> Running in d243cdadb91e
/bin/sh: 1: node_setup_7.x: not found
The command '/bin/sh -c node_setup_7.x' returned a non-zero code: 127

@nahuelhds

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment