Skip to content

utils: rename generated version file to thapi_version - #527

Merged
TApplencourt merged 1 commit into
develfrom
fix-version-header-collision
Aug 4, 2026
Merged

utils: rename generated version file to thapi_version#527
TApplencourt merged 1 commit into
develfrom
fix-version-header-collision

Conversation

@TApplencourt

Copy link
Copy Markdown
Collaborator

C++ now use version as a official header.

During code gen we generate version into utils. And then do -I utils. and them kaboom

    1 | 6130020

The easier change is to rename it to thapi_version

AC_CONFIG_HEADERS([utils/config.h]) makes automake prepend
-I$(top_builddir)/utils to DEFAULT_INCLUDES for every target in the
tree, ahead of the system include directories. The generated `version`
data file therefore shadows the C++20 <version> standard header.

abseil-cpp 20250127.0 added an unguarded

    #if __has_include(<version>)
    #include <version>
    #endif

to absl/types/span.h, so any build pulling in abseil (via protobuf, for
libXTimeline's perfetto output) fails with

    ../utils/version:1:1: error: expected unqualified-id

even at -std=c++17. Renaming the data file avoids the collision; the
seven tracer scripts and two Ruby readers are updated to match.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@TApplencourt
TApplencourt merged commit 6bd32b9 into devel Aug 4, 2026
49 of 53 checks passed
@TApplencourt
TApplencourt deleted the fix-version-header-collision branch August 4, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant