-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix OSS build #9564
base: master
Are you sure you want to change the base?
Fix OSS build #9564
Conversation
@facebook-github-bot has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. (Because this pull request was imported automatically, there will not be any future comments.) |
These will be helpful both in the future and when applying parts of facebook#9564. * Set up .editorconfig to ensure consistent indents. * Instruct CMake to export a clangd JSON compilation database that IDEs can integrate with.
@mszabo-wikia has updated the pull request. You must reimport the pull request before landing. |
121391e
to
b6f3c51
Compare
@mszabo-wikia has updated the pull request. You must reimport the pull request before landing. |
2 similar comments
@mszabo-wikia has updated the pull request. You must reimport the pull request before landing. |
@mszabo-wikia has updated the pull request. You must reimport the pull request before landing. |
353606f
to
d031828
Compare
@mszabo-wikia has updated the pull request. You must reimport the pull request before landing. |
1 similar comment
@mszabo-wikia has updated the pull request. You must reimport the pull request before landing. |
Sorry about the comment spam, some last-minute CI fixes were in order. This now builds fine. Going forward, I'm unconvinced of the benefits of building packages for PRs. I think it might be better to have a scheduled (nightly?) workflow for doing that instead, and have a lightweight workflow for pushes and PRs that would just compile HHVM and run tests. |
Summary: If a new extension systemlib isn't wired up with the build system, its unit emitters and decls won't be embedded in the HHVM binary, causing a cryptic crash when trying to run Hack code ("Invalid varint value: too few bytes."). One then has to fire up a debugger to determine what systemlib is missing. Instead, raise a more informative error if a specific systemlib was not found in the binary. Split from #9564. Pull Request resolved: #9566 Reviewed By: ricklavoie Differential Revision: D67874442 fbshipit-source-id: 876fe61ff08fd05a311659a44c2b0a19ea878f94
The bundled Rust version is too old for several library dependencies. Update to the nightly build from November 26th, 2024, which corresponds to the 1.83.0 release. Split from facebook#9564.
Thanks for this — at Slack we are also very interested in this PR, which contains a few changes we've already independently applied to our local patch (which is at the moment forked off a mid-2023 version of upstream) |
@muglug Thanks, glad to hear this! Let me know if you have any feedback or questions. I've already started to cherry-pick some of the individual changes into PRs but will try to keep this branch periodically updated until the fixes land. |
@mszabo-wikia I too am very interested in this branch. I have built it locally. I am able to run Hack code with hhvm after adding openssl 1.1.1 for the ext_watchman autoloader. I am looking at hh_client (which fails with EOPNOTSUPP). The typechecker itself is alive, since I have created a Dockerfile which builds hhvm of your branch. It is nothing spectacular, but it would allow anyone interested to build outside of GitHub CI in a reproducible environment. I will need to add the OpenSSL fix, an 'add to path' fix, and an 'install watchman' fix. I will share tomorrow after work, or if the build takes more time than I have available on a weekday, this weekend. |
Hmm, this seems to work okay for me in a trivial container ( Perhaps there are some additional restrictions imposed for your particular container? |
The bundled Rust version is too old for several library dependencies. Update to the nightly build from October 13th, 2024, which corresponds to the 1.83.0 release. Split from facebook#9564.
Summary: These will be helpful both in the future and when applying parts of #9564. * Set up .editorconfig to ensure consistent indents. * Instruct CMake to export a clangd JSON compilation database that IDEs can integrate with. Pull Request resolved: #9565 Reviewed By: Wilfred Differential Revision: D67870812 fbshipit-source-id: 8d1db6b9002e65e8cf52d0a0d005ed4fe49259cf
Summary: The bundled Rust version is too old for several library dependencies. Update to the nightly build from November 26th, 2024, which corresponds to the 1.83.0 release. Split from #9564. Pull Request resolved: #9571 Reviewed By: dtolnay Differential Revision: D67921964 fbshipit-source-id: 6e7f24e2e00ec45303356daa64a7d9a1b53f40fb
Summary: libxml 2.12.0 changes the API to return `const xmlError*` in several places.[1] As a fix, use auto variables for storing the output of xmlGetLastError() and make the signature of our error handler function dependent on the libxml version. Split from #9564. [1] https://gitlab.gnome.org/GNOME/libxml2/-/blob/86401cc3d293d6ea3c4552885e3cadcd952021d1/NEWS#L392 Pull Request resolved: #9572 Reviewed By: Wilfred Differential Revision: D67922353 fbshipit-source-id: 36eded2295fdd60d15ff559d4d79eb5732c5598f
Summary: In OpenSSL 3, `EVP_PKEY_get0_*` functions now return `const` pointers, breaking existing usage depending on mutable pointers returned by OpenSSL 1.x. This diff fix the errors 1. Use `auto` type for return type of `EVP_PKEY_get0_*` functions instead of mutable pointer types. 1. Some `EVP_PKEY_get0_RSA` are replaced with `EVP_PKEY_get1_RSA` in order to get a mutable pointer with the ownership. See https://www.openssl.org/docs/man3.0/man7/crypto.html#LIBRARY-CONVENTIONS for the `get_0` conventions Differential Revision: D40942193 fbshipit-source-id: b9a868aec3d332e9de323cb801af52e2692d4686
e3c9318
to
7d3f567
Compare
@mszabo-wikia has updated the pull request. You must reimport the pull request before landing. |
The HHVM OSS build has become nonfunctional over the past year or so (#9506, #9389). This patchset aims to get it working again.
Due to the number of changes required, I don't think this PR is feasible to land as-is—I'm opening it to provide an overview of the changes made and also to have a working OSS branch that's up to date with the current master. I'll be making individual PRs for the patches within this patchset if there's maintainer capacity to accommodate them.
This patchset does not yet fix every extension—notably, squangle and mcrouter still need fixes to properly compile for OSS,
hash
has added the blake3 hash which will require pulling in the corresponding library dependency and so on. This can be done as a followup.It's been a tad finicky to get the build to work in GitHub Actions because the build as-is requires 30+ GiB of disk space, which is more than what the default runners have available. I'll see if the Meta-specific
8-core-ubuntu
runner will be able to handle this PR, and if not, I'll change the CI to remove assorted garbage from the default runner prior to commencing the build.I'd like to thank @kmapb and @Atry for their OSS build fixes that proved to be very helpful.
Below is a non-exhaustive list of the most important changes:
Changes made
std::lexicographical_compare_three_way
introduced in ba8cf61.2024-11-26
which corresponds to the current stable version 1.83.0, because some Rust dependencies now require at least Rust 1.73.0 later. (984acef)#include
directives that were causing compile errors. (01975f1, 34eefc6,14edad8afcaff5b4ffd78dd096ffc3da670e13c7, a19eee5, 3f07dc4).ocamlrep
crate used in some places requires a working OPAM install. (4a72abb, 0e3ca63)libdwarfp
header if so. (97ce3e3)const xmlError*
instead ofxmlError*
. (f0dfb05)