Skip to content

build: downgrade GCC support to experimental#62533

Open
targos wants to merge 1 commit intonodejs:mainfrom
targos:default-clang
Open

build: downgrade GCC support to experimental#62533
targos wants to merge 1 commit intonodejs:mainfrom
targos:default-clang

Conversation

@targos
Copy link
Copy Markdown
Member

@targos targos commented Apr 1, 2026

Update the configure script to select Clang by default.
V8 no longer officially supports GCC and we often have problems because of it.
Also bump the expected version to 13.2 because version 12 can't compile newer V8.

/cc @nodejs/build @nodejs/tsc @nodejs/embedders @nodejs/delivery-channels @nodejs/distros

Impacted CI systems:

@targos targos added the semver-major PRs that contain breaking changes and should be released in the next major version. label Apr 1, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/actions
  • @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. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. labels Apr 1, 2026
@targos
Copy link
Copy Markdown
Member Author

targos commented Apr 1, 2026

The main goal is to unblock #61898 and future V8 updates.

Update the configure script to select Clang by default.
V8 no longer officially supports GCC and we often have problems because
of it.
Also bump the expected version to 13.2 because version 12 can't compile
newer V8.

Signed-Off-By: Michaël Zasso <targos@protonmail.com>
@MikeMcC399
Copy link
Copy Markdown
Contributor

MikeMcC399 commented Apr 1, 2026

Would it make more sense to deprecate GCC rather than move it to experimental? Or is there an expectation that the "experimental" flag could be removed, even though the following is stated?

V8 no longer officially supports GCC

@targos targos added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 1, 2026
Comment on lines +80 to +83
- name: Install Clang ${{ env.CLANG_VERSION }}
uses: ./.github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This job only packs the tarball, the actual compilation already uses clang

Suggested change
- name: Install Clang ${{ env.CLANG_VERSION }}
uses: ./.github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If clang is not installed, the new default in configure.py makes it fail. See https://github.com/nodejs/node/actions/runs/23843452764/job/69504716314?pr=62533

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we add a flag to disable that check:

diff --git a/configure.py b/configure.py
index 6182537bfa..49a99767a9 100755
--- a/configure.py
+++ b/configure.py
@@ -2607,7 +2607,8 @@ configurations = {
 }
 
 # Print a warning when the compiler is too old.
-check_compiler(output)
+if not os.environ['SKIP_COMPILER_CHECK']:
+  check_compiler(output)
 
 # determine the "flavor" (operating system) we're building for,
 # leveraging gyp's GetFlavor function

Comment on lines +97 to +99
env:
CC: clang-19
CXX: clang++-19
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
env:
CC: clang-19
CXX: clang++-19

Comment on lines +123 to +127
- name: Install Clang ${{ env.CLANG_VERSION }}
uses: ./.github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- name: Install Clang ${{ env.CLANG_VERSION }}
uses: ./.github/actions/install-clang
with:
clang-version: ${{ env.CLANG_VERSION }}

Comment on lines +136 to +137
CC: clang-19
CXX: clang++-19
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
CC: clang-19
CXX: clang++-19

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 1, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

@joyeecheung
Copy link
Copy Markdown
Member

The main goal is to unblock #61898 and future V8 updates.

I think the GCC support for 61898 was already unblocked by https://chromium-review.googlesource.com/c/v8/v8/+/7666244 and the remaining blocker seems unrelated? (I think the remaining blocker is similar to something else I fixed for the previous upgrade, most likely a legit bug in V8's transitions management)

@targos
Copy link
Copy Markdown
Member Author

targos commented Apr 1, 2026

The current GCC issue is something else: #61898 (comment)

@joyeecheung
Copy link
Copy Markdown
Member

joyeecheung commented Apr 1, 2026

The current GCC issue is something else

It seems specific to GCC 12? I feel that we could split the discussion separately: bumping GCC support to 13 (12 already reached EOL last year, so this seems less disruptive), and moving GCC to experimental on all platforms, which can cause more disruption, especially considering addons and downstream distros - it would be unfortunate to disrupt Linux distros just because an EOL version of GCC doesn't work on AIX - at least keeping an up-to-date version of GCC on Linux supported is good ROI, and V8 is generally happy to take patches to keep that working

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

Labels

build Issues and PRs related to build files or the CI. doc Issues and PRs related to the documentations. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants