ansible: update gn and ninja for V8 builds by richardlau · Pull Request #4233 · nodejs/build · GitHub
Skip to content

ansible: update gn and ninja for V8 builds#4233

Merged
richardlau merged 3 commits into
nodejs:mainfrom
richardlau:gn
Feb 13, 2026
Merged

ansible: update gn and ninja for V8 builds#4233
richardlau merged 3 commits into
nodejs:mainfrom
richardlau:gn

Conversation

@richardlau

Copy link
Copy Markdown
Member

Update the versions of gn and ninja used in the V8 CI for Linux on ppc64le and s390x.

Refs: nodejs/node#61681 (comment)


For V8 14.5, gn needs to be updated to pick up string_hash which was introduced in https://gn.googlesource.com/gn/+/ab6f8b2124b02000f5ffcabb904622f17de6a1e5 (I've updated to use the current HEAD https://gn.googlesource.com/gn/+/304bbef6c7e9a86630c12986b99c8654eb7fe648).
https://ci.nodejs.org/job/node-test-commit-v8-linux/7006/nodes=rhel8-ppc64le,v8test=v8test/console

02:09:38 ERROR at //build/rust/gni_impl/rust_target.gni:51:17: Unknown function.
02:09:38     _dir_hash = string_hash(get_label_info(":${_target_name}", "dir"))
02:09:38                 ^----------
02:09:38 See //build/rust/rust_static_library.gni:207:3: whence it was called.
02:09:38   rust_target(_target_name) {
02:09:38   ^--------------------------
02:09:38 See //build/rust/allocator/BUILD.gn:51:3: whence it was called.
02:09:38   rust_static_library("allocator") {
02:09:38   ^---------------------------------
02:09:38 See //build/rust/gni_impl/rust_target.gni:357:23: which caused the file to be included.
02:09:38       _rust_deps += [ "//build/rust/allocator" ]
02:09:38                       ^-----------------------
02:09:38 make: *** [Makefile:317: v8] Error 1

ninja needs to be updated to fix this error:
https://ci.nodejs.org/job/node-test-commit-v8-linux/7008/nodes=rhel8-ppc64le,v8test=v8test/console

14:58:48 + ninja -v -C out.gn/ppc64.release '-j 4' d8 cctest inspector-test
14:58:48 ninja: Entering directory `out.gn/ppc64.release'
14:58:48 ninja: error: obj/build/rust/allocator/alloc_error_handler_impl_ffi.ninja:18: multiple outputs aren't (yet?) supported by depslog; bring this up on the mailing list if it affects you
14:58:48 
14:58:48 make: *** [Makefile:317: v8] Error 1

Since the packaged version of ninja-build on RHEL 8 is too old, we compile ninja from source.

Update the versions of `gn` and `ninja` used in the V8 CI for Linux
on ppc64le and s390x.
@richardlau

Copy link
Copy Markdown
Member Author

@joyeecheung

Copy link
Copy Markdown
Member

This might not be very near, but as an FYI, V8 might stop supporting ninja one day and fully switch to siso https://groups.google.com/a/chromium.org/g/chromium-dev/c/v-WOvWUtOpg

@richardlau

richardlau commented Feb 6, 2026

Copy link
Copy Markdown
Member Author

This might not be very near, but as an FYI, V8 might stop supporting ninja one day and fully switch to siso https://groups.google.com/a/chromium.org/g/chromium-dev/c/v-WOvWUtOpg

Thanks. We were previously aware of https://issues.chromium.org/issues/42204582.

FYI @miladfarca @abmusse

@richardlau

richardlau commented Feb 10, 2026

Copy link
Copy Markdown
Member Author

Pushed a fixup to pin the version of http2lib (consistent with https://github.com/ibmruntimes/v8-build/blob/7690d41600b7eb08c77e87ae1630cdd04549caf6/Dockerfile#L45C18-L45C34).

Without pinning, we get
e.g. https://ci.nodejs.org/job/richardlau-node-test-commit-v8-linux/763/nodes=rhel8-power9le,v8test=v8test/console

17:34:48 Cloning into '/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/deps/v8/depot_tools'...
17:34:48 Traceback (most recent call last):
17:34:48   File "/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/deps/v8/depot_tools/gclient.py", line 109, in <module>
17:34:48     import gclient_scm
17:34:48   File "/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/deps/v8/depot_tools/gclient_scm.py", line 23, in <module>
17:34:48     import gerrit_util
17:34:48   File "/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/deps/v8/depot_tools/gerrit_util.py", line 39, in <module>
17:34:48     import httplib2.socks
17:34:48 ModuleNotFoundError: No module named 'httplib2.socks'
17:34:48 Checking out depot_tools.
17:34:48 Traceback (most recent call last):
17:34:48   File "/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/deps/v8/../../tools/v8/fetch_deps.py", line 108, in <module>
17:34:48     FetchDeps(sys.argv[1])
17:34:48   File "/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/deps/v8/../../tools/v8/fetch_deps.py", line 80, in FetchDeps
17:34:48     depot_tools = node_common.EnsureDepotTools(v8_path, True)
17:34:48                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:34:48   File "/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/tools/v8/node_common.py", line 40, in EnsureDepotTools
17:34:48     depot_tools = _Get(v8_path)
17:34:48                   ^^^^^^^^^^^^^
17:34:48   File "/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/tools/v8/node_common.py", line 35, in _Get
17:34:48     subprocess.check_output(
17:34:48   File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
17:34:48     return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
17:34:48            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17:34:48   File "/usr/lib64/python3.11/subprocess.py", line 571, in run
17:34:48     raise CalledProcessError(retcode, process.args,
17:34:48 subprocess.CalledProcessError: Command '['/usr/bin/python3', '/home/iojs/build/workspace/richardlau-node-test-commit-v8-linux/deps/v8/depot_tools/gclient.py', 'metrics', '--opt-out']' returned non-zero exit status 1.

Rebuilding (V8 14.5 update PR head): https://ci.nodejs.org/job/richardlau-node-test-commit-v8-linux/764/

@sxa sxa 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.

One little observation that's easy to fix, and this has made me realise I should set up an environment for building V8 on my laptop :-)

Since it's been tested by deploying it this LGTM 👍🏻

Comment thread ansible/roles/ninja-build/tasks/partials/rhel8.yml Outdated
Comment thread ansible/roles/ninja-build/tasks/partials/rhel8.yml Outdated
@richardlau richardlau merged commit a7cd36f into nodejs:main Feb 13, 2026
1 check passed
@richardlau richardlau deleted the gn branch February 13, 2026 15:38
@richardlau

Copy link
Copy Markdown
Member Author

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants