Skip to content

doc: update gcc toolchains to gcc-13 and g++-13#64018

Open
louiellan wants to merge 1 commit into
nodejs:mainfrom
louiellan:gcc-13-on-docs
Open

doc: update gcc toolchains to gcc-13 and g++-13#64018
louiellan wants to merge 1 commit into
nodejs:mainfrom
louiellan:gcc-13-on-docs

Conversation

@louiellan

@louiellan louiellan commented Jun 20, 2026

Copy link
Copy Markdown

Update doc for installing prerequisites on Ubuntu

Refs: #62555

since the prerequisites are `gcc` and `g++` >= `13.2`

Signed-off-by: louiellan <[email protected]>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/build
  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. labels Jun 20, 2026
@aduh95

aduh95 commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Can you give more details on why this change?

@louiellan

louiellan commented Jun 20, 2026

Copy link
Copy Markdown
Author

There's just a mismatch on the install snippet and the required toolchains needed

node/BUILDING.md

Lines 245 to 248 in 1258a19

#### Unix prerequisites
* `gcc` and `g++` >= 13.2 or `clang` and `clang++` >= 19.1
* GNU Make 3.81 or newer

The unix prerequisites here requires a gcc toolchain > 13.2


#define SMI_COMPARISON_OP(SmiOpName, IntPtrOpName, Int32OpName) \
V<Word32> SmiOpName(ConstOrV<Smi> left, ConstOrV<Smi> right) { \
V<WordPtr> l = BitcastTaggedToWordPtrForTagAndSmiBits(resolve(left)); \
V<WordPtr> r = BitcastTaggedToWordPtrForTagAndSmiBits(resolve(right)); \
if constexpr (kTaggedSize == kInt64Size) { \
return IntPtrOpName(l, r); \
} else { \
static_assert(kTaggedSize == kInt32Size); \
static_assert(v8::internal::SmiValuesAre31Bits()); \
return Int32OpName(TruncateWordPtrToWord32(l), \
TruncateWordPtrToWord32(r)); \
} \
}

And that this macro also throws an static assertion error in gcc 12 and have already been addressed in gcc 13 with the CWG2518, P2593R0 (just for reference for other contributors who might also encounter this issue when building node)

@aduh95 aduh95 added dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. labels Jun 20, 2026
@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jun 20, 2026

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 20, 2026
@MikeMcC399

Copy link
Copy Markdown
Contributor
  1. Why is it that only Ubuntu/Debian specifies a version of gcc to install in https://github.com/nodejs/node/blob/main/BUILDING.md#unix-prerequisites. The instructions for the other OSs don't specify. Could this possibly be removed, and only the default version installed?

  2. It seems that sudo apt-get install g++-13 gcc-13 would only work on Debian 13 (trixie) and Ubuntu >=24.04. Lower versions don't support gcc 13 as far as I can tell. That would suggest the https://github.com/nodejs/node/blob/main/BUILDING.md#platform-list table example minimum versions should also be updated. (Probably better covered in a separate PR though.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. build Issues and PRs related to build files or the CI. commit-queue Add this label to land a pull request using GitHub Actions. doc Issues and PRs related to the documentations. dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants