-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Relay Compiler v13: Providing a statically linked binary? #3739
Comments
Yes. Our build configuration is very simple at the moment: https://github.com/facebook/relay/blob/main/.github/workflows/ci.yml#L121-L125 What should we change? |
@alunyov I can confirm that building with |
Thanks for looking into this @ch1ffa! This action https://github.com/marketplace/actions/rust-musl-builder-slim were not updated since 2019. Not sure if we should use that version.
Can we add our own Dockerfile here and build with |
@alunyov yeah, I think so. My personal preference is to have a dedicated repo with an action, so the main pipeline would be looking cleaner. But I can test both options and then we can choose. |
Summary: This PR attempts to fix #3725 and #3739. A new target `x86_64-unknown-linux-musl` has been added to `ci.yml` along with the additional `musl-tools` package (can be removed in the future when [this issue](actions-rs/toolchain#102) is resolved) and the `hyper-tls/vendored` feature which allow to build openssl-sys package for the new target. I ended up with building directly on GitHub Action VM without custom docker image because it allows to implement it just as a new target in matrix. Building in docker image requires a [separated job](https://github.com/ch1ffa/relay/blob/1c4651ff81cb901a487e4d9ca0a719058833f5a0/.github/workflows/ci.yml#L133). [detect-libc](https://www.npmjs.com/package/detect-libc) is using for detecting correct platform. Compiled binary has been tested inside `node:alpine` image. I'm not sure how to test it in the Bazel Sandbox, maybe it is better to ask the issue author. Pull Request resolved: #3754 Test Plan: Imported from GitHub, without a `Test Plan:` line. **Static Docs Preview: relay** |[Full Site](https://our.intern.facebook.com/intern/staticdocs/eph/1642521860/relay/)| |**Modified Pages**| Reviewed By: kassens Differential Revision: D33622425 Pulled By: alunyov fbshipit-source-id: 8c16074f2d15fd400ad657cd2497fde85b54ef6d
For people running in this problem, if the latest npm version does not fix the problem, a dirty workaround using docker is:
(Might need to adapt to your repo file structure, but you get the idea), worked for us. |
Relay compiler v13 fails to run on our CI system:
The
relay
executable requires a couple of shared libraries:Since we are running our builds in a Bazel sandbox (with remote build execution) we can have no control over the CI runner, so we can't simply install the missing libraries. This would also make our build non-hermetic which is not something we want. A solution would be to provide self contained statically linked binaries instead.
Related to: #3725
The text was updated successfully, but these errors were encountered: