-
Notifications
You must be signed in to change notification settings - Fork 0
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
Heads-up you may run into M1 specific issues #1
Comments
Hey, thanks for the heads up! I'm going to look into this more as it seems like there may be options...
|
I'm able to build HHVM(at 6.26) and have most tests passing with colima and qemu 8.1.1 using this dockerfile on my m1 mbp - https://gist.github.com/justdan6/dde493f2c8ae36a4a00055228f818c5b . Without colima the build process always hangs. From my very brief look I don't think any of the tests are failing because of AVX2 instructions. Any chance you have a code example that would normally crash?
|
Hmmm, the AVX2 stuff mentioned applied to the JIT. I agree, these failures don't look like JIT specific failures to me. What you could try is running hhvm/hhast. This library exercises the JIT very well. You'll have to make a small patch to vendor/facebook/hh-clilib in order to run hhast in from a web server context. The You can then launch a server with Sorry for the large delay. I tried building an image from your Dockerfile, but this fails because of user error. (I wanted to see if the same failures would occur on x64.) I formatted my storage in a silly manner a long time ago. (A small root and a large /home partition.) Even after destroying all my containers, clearing log/tmp files, and doing a I'll let you know once I have undergone this partition resize endeavour to validate your test results. This is something I'll do on the weekend. Partitions are something I only deal with once in a blue moon, and I don't want to push my luck and brick my system. |
Oh for hhast, build hhvm-4.168. That way you don't need to redo the hast codegen first. |
I took a little longer to redo my partitions. I hope you weren't in a hurry. I built your docker image and I needed to do a couple things to make it work:
I was then able to run the test suite.
I get the following list of failures on x86:
Any errors you see in your list that are also part of my list are not M1 processor specific. |
These are the tests that only fail on your machine:
So there is no jit AVX2 error in your tests. Footnotes
|
No problem, not in a hurry at all. Thanks for running those tests :) I've been having some trouble building 4.168 so I was planning on just pulling from whatever is in https://dl.hhvm.com/ubuntu and running |
Oh, that will be more trouble. It will crash with an exception complaining the Hack AST (the version of the Hack syntax) does not match the hhvm version you are running on. I'll create a hhvm 6.26 compatible version of hhast for you instead. |
I have made a patched version of hhast available for this purpose. You can find it at https://github.com/lexidor/hhast-bundled. The README should hopefully be helpful enough. Don't be hesitant to ask for clarification if needed. |
This is awesome, thank you so much! I'll try to run it this weekend. |
Amazing to hear! 🎉 🍰 🥇 🥳 🍾 Apple could have improved Rosseta2 since the post was made (it's a moving target after all). Nothing is ever 100% certain, but you just exercised the living bats out of the JIT. I am just going to say "It works, unless a counter example is found in the wild somewhere." This comes as a great and welcome surprise. If you wouldn't mind, I'll link your findings back to the user group. I remember there being some folks who are on older hhvm versions and they are using Macs. If the post from the hhvm team was holding them back from upgrading, maybe this could give them renewed hope and they'll give upgrading another shot. Looking forward to chatting with you again. Don't hesitate to ping me for anything docker or hhvm related. |
Definitely glad we were able to get this to work, thank you for all of your help! I'll update the repo to have a step by step guide on getting this to work. Looking forward to chatting with you again too :) |
I noticed your personal repo from facebook/hhvm#9397, hi 👋. Just a heads-up, you may run into some strange crashes/bugs when running hhvm on an M1 Mac. HHVM uses some AVX2 instructions that Apples Rosetta system does not support.
https://hhvm.com/blog/2022/06/17/deprecating-homebrew.html
We recommend users on Intel macs switch to using one of our docker images. We are unable to support M1 users due to the different architecture and limitations of Rosetta. Therefore, we must recommend use of an Intel linux host instead.
If you are using your docker image on a remote host in such a way that you can develop on your M1, but run on AMD64, that would work great.
I hope I have saved you a headache or two (or explained some crashes you've been having).
The text was updated successfully, but these errors were encountered: