-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Build and platform requirements for Node.js 20 #47067
Comments
For completeness, we've already landed #46806 to move gcc based builds to gcc 10. |
@UlisesGascon can you look at make recommendations for MacOS and Xcode version? |
Sure, I will do a little research 👍 |
For reference, v20.x EOL date will be 2026-04-30 |
Quick conclusions The minimum version of MacOS required for our purposes would be MacOS 11.7.4 (released in February 2023) or any version of MacOS 11.x. However, MacOS 11.x is already being phased out and is speculated to reach its end of life (EOL) this year. This means that we will need to carry MacOS 11.x for an additional year in our infrastructure once Node 18 reaches its EOL (from April 30, 2025, to April 30, 2026). On the other hand, we could support MacOS 12.x as the minimum version, as it is currently the minimum active version that Apple has at the time of our initial release for Node 20. This would help us to purge MacOS legacy versions (10.x and 11.x) from our infrastructure by April 30, 2025. Regarding Xcode versions
Regarding C++ version I have checked the C++20 language features, and the minimum version required is 8. Checking Homebrew, it seems that we can install it on Big Sur (11.x) and Monterey (12.x). It would be great to run an experiment and check the compatibility of gcc, MacOS, and Xcode versions together before making a decision. I am not very confident just by checking the documentation. Useful links
Related issues |
We don't support building with GCC on macOS. Only the XCode/Clang version matters. |
Thanks for the clarification, @targos! Maybe this provide a better context, based on Wikipedia | Xcode -> Xcode 11.0 - 14.x (since SwiftUI framework)):
I believe that this table: C++20 core language features might help us to determine the minimum clang version that we need to support Node 20 based on the C++20 features that we are using. I am not able to determine, but maybe you can help me 🙏 |
Looks like Apple Clang 13.1.6 is necessary for some features. I can't say if they are important. |
Windows-related, the main thing we're looking forward to in v20 is support for ARM64 Windows. This will hopefully happen in v19, but would be great to see it stable and without issues in v20. About Windows and VS, we have to keep using the current versions, mainly because we don't have anything newer in our infra that can be used now. @StefanStojanovic will start working on adding newer versions soon. For the release machine:
For running Node we support Windows 10 and 2016. For building addons we support VS2017. I'm not looking forward to dropping x86, but won't object to it either. |
@joaocgreis Thanks. What about C++20? Does VS2019 have decent enough support? I see an error in #45427 (comment) that isn't reproduced with VS2022. |
Give me my past experience, only support VS2022 is the best option for us. |
I've opened a PR to update our armv7l cross compiler: rvagg/rpi-newer-crosstools#2. Unfortunately it looks like that, unlike glibc, the libstdc++ version is closely tied to the gcc version and binaries built with gcc 10 (libstdc++.so.6.0.28) will not run on Debian 10 (libstdc++.so.6.0.25). We don't have this problem with the binaries compiled on RHEL 8 and gcc-toolset-10 but unfortunately RHEL do not offer an armv7l distro (which is why we are still cross compiling for armv7l). |
/cc @RafaelGSS This issue should be resolved before we lock v20.x for the release. |
@targos I see only a handful of fixes (?) that are only available on 2022: https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170 The version of VS we use to compile node is not something we need to lock, we can change it anytime. For now, we simply don't have the machines in place to move to VS2022, but we will in the next few months (weeks if all goes well). |
Update the table describing the platform and toolchain used to build the official Node.js 20 binaries. PR-URL: #47352 Refs: https://github.com/orgs/nodejs/discussions/45892 Refs: #47067 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Update RHEL 8 container used for cross compiling for armv7. Add logic to select gcc 10 toolchain for Node.js 20 onwards. Install gcc-toolset-10 host compiler. Refs: rvagg/rpi-newer-crosstools#2 Refs: https://github.com/orgs/nodejs/discussions/45892 Refs: nodejs/node#47067
Update RHEL 8 container used for cross compiling for armv7. Add logic to select gcc 10 toolchain for Node.js 20 onwards. Install gcc-toolset-10 host compiler. Refs: rvagg/rpi-newer-crosstools#2 Refs: https://github.com/orgs/nodejs/discussions/45892 Refs: nodejs/node#47067
@targos, can we close this issue? I think all the requirements were already defined 🤔 |
Node 20 is out so even if we forgot about something, it would be too late. |
As discussed in the last Release WG meeting, we should soon agree on the set of platforms and build toolchains supported by v20.0.0.
Current tables are in https://github.com/nodejs/node/blob/c2e4b1fa9ad0b744616c4e4c13a5017772a630c4/BUILDING.md#supported-platforms
Main topics:
@nodejs/tsc @nodejs/build @nodejs/releasers
The text was updated successfully, but these errors were encountered: