You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build and platform requirements for Node.js 20 #47067
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.
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.
I will create a separate issue in the Build Repo to discuss the infrastructure changes required to add machines for (Intel and ARM) for MacOS 12.x and 13.x. This will avoid polluting this conversation, which is also related to nodejs/build#3087.
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).
We don't support building with GCC on macOS. Only the XCode/Clang version matters.
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 🙏
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:
Windows 2012R2 will be EOL this October so we'll have to replace it out of semver boundary, but this is not an issue on Windows.
VS2019 will be EOL in 2029 so while it's not optimal it's not a big issue. If needed we can replace it as well (we've done that for v6.8.0).
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.
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).
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).
Activity
richardlau commentedon Mar 13, 2023
For completeness, we've already landed #46806 to move gcc based builds to gcc 10.
mhdawson commentedon Mar 17, 2023
@UlisesGascon can you look at make recommendations for MacOS and Xcode version?
UlisesGascon commentedon Mar 18, 2023
Sure, I will do a little research 👍
targos commentedon Mar 18, 2023
For reference, v20.x EOL date will be 2026-04-30
UlisesGascon commentedon Mar 18, 2023
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
Side NoteI will create a separate issue in the Build Repo to discuss the infrastructure changes required to add machines for (Intel and ARM) for MacOS 12.x and 13.x. This will avoid polluting this conversation, which is also related to nodejs/build#3087.Related issues
targos commentedon Mar 22, 2023
We don't support building with GCC on macOS. Only the XCode/Clang version matters.
UlisesGascon commentedon Mar 22, 2023
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 🙏
targos commentedon Mar 22, 2023
Looks like Apple Clang 13.1.6 is necessary for some features. I can't say if they are important.
joaocgreis commentedon Mar 29, 2023
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.
targos commentedon Mar 30, 2023
@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.
gengjiawen commentedon Mar 30, 2023
Give me my past experience, only support VS2022 is the best option for us.
richardlau commentedon Mar 30, 2023
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).
targos commentedon Mar 31, 2023
/cc @RafaelGSS This issue should be resolved before we lock v20.x for the release.
joaocgreis commentedon Apr 3, 2023
@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).
doc: update toolchains used for Node.js 20 releases
ansible: update RHEL 8 cross compiler container (#3274)
ansible: update RHEL 8 cross compiler container (nodejs#3274)
doc: update darwin-x64 toolchain used for Node.js 20 releases
doc: update darwin-x64 toolchain used for Node.js 20 releases
doc: update darwin-x64 toolchain used for Node.js 20 releases
UlisesGascon commentedon May 7, 2023
@targos, can we close this issue? I think all the requirements were already defined 🤔
targos commentedon May 7, 2023
Node 20 is out so even if we forgot about something, it would be too late.