-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Support aarch64 Linux with page sizes >= 16k #5967
Comments
@Brooooooklyn Thoughts? |
Fixes #39311 Backport of upstream patch swc-project/swc#6075 More details are described in swc-project/swc#5967 I confirm that the swc plugin, when compiled with this patch, works on my Linux aarch64 machine. This will work on all aarch64 Linux systems, the patch is configuring jemalloc to use largest possible page size, instead of taking the value from the machine where you are compiling it. And here's the compiled binary, if you want to give it a go! [next-swc.linux-arm64-gnu.node.zip](https://github.com/vercel/next.js/files/9728262/next-swc.linux-arm64-gnu.node.zip) Let me know if that makes sense! 🙂
Fixes vercel#39311 Backport of upstream patch swc-project/swc#6075 More details are described in swc-project/swc#5967 I confirm that the swc plugin, when compiled with this patch, works on my Linux aarch64 machine. This will work on all aarch64 Linux systems, the patch is configuring jemalloc to use largest possible page size, instead of taking the value from the machine where you are compiling it. And here's the compiled binary, if you want to give it a go! [next-swc.linux-arm64-gnu.node.zip](https://github.com/vercel/next.js/files/9728262/next-swc.linux-arm64-gnu.node.zip) Let me know if that makes sense! 🙂
Ran into this on Asahi (Arch) Linux on Apple M1 today trying to
I traced this to |
@kdy1 I think we can use system allocator on Linux aarch64 GNU platform |
@Brooooooklyn Yeah it will fix the issue |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Describe the bug
swc uses jemalloc, which in turn uses the build system's page size as internal page size, and fails if the target's page size is larger [1]. Some Linux distributions patch jemalloc itself (e.g. [2]), but Github actions uses a "standard" jemalloc, which has this problem.
Instead of using a patched jemalloc, it is possible to configure jemalloc in runtime to use largest possible size, thus making it compatible with all
aarch64
systems.The solution is simple: add
export JEMALLOC_SYS_WITH_LG_PAGE=16
before runningcargo build
foraarch64
system.This is a very common case with rust projects, as you can imagine 🙂 Here's just one example [3].
Let me know if it makes sense!
1: jemalloc/jemalloc#467
2: https://github.com/archlinuxarm/PKGBUILDs/blob/master/extra/jemalloc/PKGBUILD
3: archlinuxarm/PKGBUILDs#1940
Input code
No response
Config
No response
Playground link
No response
Expected behavior
No crash on Linux with 16k page size.
Actual behavior
No response
Version
1.3.3
Additional context
No response
The text was updated successfully, but these errors were encountered: