Skip to content

Build the clang lane with clang and libc++ 20 - #1064

Merged
saworbit merged 4 commits into
mainfrom
fix/clang-lane-libcxx-20
Sep 29, 2026
Merged

saworbit merged 4 commits into
mainfrom
fix/clang-lane-libcxx-20

Conversation

@saworbit

Copy link
Copy Markdown
Owner

Description

The clang lane in tools/localci could not build main. It used Ubuntu 24.04's default clang and libc++ 18, and libc++ 18 has no floating-point std::from_chars, which src/mcp/argument_normalization.cpp uses. The macOS runner's Apple libc++ builds it, so the stand-in no longer resembled what it stands in for.

  • Ubuntu 24.04 ships clang-20 and libc++-20-dev (20.1.2) in its own archive, so no outside repository is needed. The image installs those, and the lane configures with clang-20/clang++-20. A three-line probe in the lane image parses 3.25 through std::from_chars with them.
  • A build volume configured before this still names /usr/bin/clang++, and CMake does not read CC and CXX again over an existing cache. The lane now reconfigures when the cached compiler is no longer in the image.
  • Found along the way: lane.sh documents DIDI_LOCALCI_RECONFIGURE=1 as the way to force a fresh configure, and run.sh never passed it into the container, so it could not be used. It is passed now, beside DIDI_LOCALCI_JOBS from Bound the asan lane's build jobs by the container's memory聽#1061.
  • tools/localci/README.md states the version and why.

No product code changes. I did not add a strtod fallback, as the issue asked.

Related Issues

Fixes #1026

Stacked on #1063, which merges first.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds new MCP tools or capabilities)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • My code adheres to the project's coding style guidelines (C++20, 4 spaces).
  • I have added automated tests in tests/ covering new functionality. Tooling only; verified by the lane run below.
  • All native unit tests pass.
  • Live bridge changes pass tests/run_godot_integration.ps1 on Godot 4.5.1. Not touched.
  • Runtime-session changes cover editor and game descriptors, authentication, attach rollback, pause/step/stop, cursor polling, cleanup, and token redaction. Not touched.
  • Expression changes cover the strict read-only grammar, receiver allowlist, output/depth bounds, and cooperative-timeout wording. Not touched.
  • The exact MCP smoke starts with an explicit Godot project, matches the manifest emitted by didi --dump-tool-manifest from the same build, preserves the Phase 4/5/6 contracts, and keeps reserved runtime debugger tools marked unimplemented. Not touched.
  • Any new tool name has an accepted record in docs/SURFACE_AMENDMENTS.md. No new tool.
  • Capability metadata, reference docs, roadmap, and changelog are current. Published tool counts are derived from the manifest, never hand-edited.
  • If this starts or finishes a Build Queue item, its row in docs/BUILD_QUEUE.md says IN PROGRESS, or COMPLETE (#<this pull request>). Not a queue item.
  • Tests added or removed: no count moved.
  • I have updated relevant documentation in docs/ and README.md. tools/localci/README.md.

Verification

bash tools/localci/run.sh clang against the existing clang build volume:

  • == the cached compiler /usr/bin/clang++ is gone; configuring from scratch, then a clean build of main with clang 20 and libc++ 20.
  • didi_tests: Results: 937 passed, 0 failed.
  • ctest's Python half reported eight errors. All eight are git -C /work ... returned non-zero exit status 128 from test_check_release_archive and test_field_trial, which happens whenever the lane runs from a .worktrees/ worktree: its .git is a file pointing outside the container. The gcc lane shows the same eight from the same worktree. From a main checkout they pass.

tools/localci built every lane with Ninja's default of CPUs + 2, and ASan
builds of the largest translation units need several GB each. On a
16.7 GB, 24-CPU Docker VM the asan lane was killed with "Killed signal
terminated program cc1plus", which reads like a compile error.

The asan lane now builds with one job per 2 GB of the container's
memory, never more than its CPUs; on that VM it chose 7. The gcc and
clang lanes keep Ninja's default. The lane prints the count it chose,
run.sh passes DIDI_LOCALCI_JOBS through, and that overrides any lane.

Fixes #1050
blackboard_write, blackboard_patch, blackboard_clear and the four task
calls built their answers from the board in memory before saving it,
and never read the saved board back, so a save the file did not keep
would still have read as done. Each now saves through saveAndReadBack,
which reloads the file and checks its revision, and takes its revision,
metadata, value and task from what was stored. blackboard_write also
returns the value now at its path, and a clear confirms the path it
removed is gone.

The seven move from exempt to observed in tests/observed_post_state.json.
The live harness compares each answer with the board file as Godot's own
JSON reader parses it, through a new board_file witness. Reporting a
revision one higher than the file holds fails the harness on
blackboard_write.revision.

Part of #1019. Fifteen tools remain on it.
The harness copied tests/godot_smoke whole, including the .didi/ runtime
state the Python suites leave there. A local run then started from that
state, and a suite running at the same time held a byte-range lock in
it that failed the copy before the first assertion.

The copy now leaves out .didi/ and .godot/. Neither exists in a CI
checkout. With a lock held on a file in the source .didi/, the old copy
fails with "locked a portion of the file" and the harness now passes on
4.7.2, with no .didi/ from the source in its fixture.

Fixes #1036
The lane used Ubuntu 24.04's default clang and libc++ 18. libc++ 18 has
no floating-point std::from_chars, so argument_normalization.cpp did not
compile there, while the macOS runner's libc++ built it. Ubuntu 24.04
ships clang-20 and libc++-20-dev in its own archive, and a three-line
probe in the lane image parses a double through from_chars with them.

The image installs those, and the lane configures with clang-20. A build
volume whose cached compiler the image no longer has is reconfigured on
its own, because CMake does not read CC and CXX again over an existing
cache. run.sh also passes DIDI_LOCALCI_RECONFIGURE, which lane.sh
documented and never received.

Fixes #1026
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests Test suites and the contracts they assert tooling Generators, harnesses, and developer tooling labels Sep 29, 2026
@saworbit
saworbit merged commit e4f1c28 into main Sep 29, 2026
28 checks passed
@saworbit
saworbit deleted the fix/clang-lane-libcxx-20 branch September 29, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation tests Test suites and the contracts they assert tooling Generators, harnesses, and developer tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The local clang lane cannot build main: Ubuntu 24.04's libc++ 18 has no floating-point from_chars

1 participant