feat: Publish an Unreal-compatible Linux libc++ static release #435
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.48) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 546 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.377
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #435"
general
weight: 0.35
fuzzybinary
refs: RUM-19171
Currently, dd-sdk-cpp's Linux release artifacts are built on Ubuntu 24.04 against GNU libstdc++ and glibc 2.39. This PR adds a third Linux artifact,
linux-x64-clang-libc++-static-release: a static library built with Unreal Engine's own Linux toolchain, so that it links into Unreal Engine 5.7 and 5.8 projects. dd-sdk-unreal's Linux support, tracked in RUM-19172, depends on it.This PR builds on two others that remove obstacles in the SDK itself. The first, RUM-19843, replaces libuuid, which Unreal's sysroot doesn't include, with
getrandom(). The second, RUM-19851, adds an internal option to supply CA certificates, which dd-sdk-unreal needs because Unreal's libcurl has no default CA location.## Why a separate artifact?
Unreal links Linux modules against the libc++ bundled in its toolchain, and against that toolchain's glibc 2.28 sysroot. The existing artifacts can't link there, for two reasons:
std::string, defined in itsstd::__cxx11namespace) are incompatible with libc++'s.## How we build it
The new
ue-clang20image downloads Epic's publicv26_clang-20.1.8-rockylinux8toolchain, pinned by SHA-256, andci/linux/unreal-toolchain.cmakebuilds against its clang, libc++ headers, and sysroot. This gives the library the same libc++ ABI as Unreal without our having to reproduce Epic's configuration. The cost is a toolchain download of about 1.5 GB when the image is built.The sysroot has no libcurl, so the image also builds a static libcurl 8.12.1 (UE 5.7's version) without TLS. It exists only so that dd-sdk-cpp can compile against curl's headers and link the
versiontool that the package target runs. The packaged library leaves curl symbols unresolved, and Unreal's libcurl supplies them.## dd-sdk-cpp now links the platform thread library
Before glibc 2.34, pthread functions live in libpthread rather than libc, so executables built against the 2.28 sysroot didn't link.
ddsdkcppnow linksThreads::Threads, andDatadogConfig.cmakecallsfind_dependency(Threads)so that CMake consumers of a static build link it too. This applies to every package, not only the new one, but on newer glibc, macOS, and Windows it adds nothing to the link.## How check-package verifies the library
tools/check-packagegains two options, which the new CI job passes:--forbid-libstdc++scans the archive's symbols, and fails if any are in libstdc++'sstd::__cxx11namespace, or if none are in libc++'sstd::__1namespace.--max-glibc-version 2.28fails if the library requires any glibc symbol version newer than 2.28.A static archive's references carry no symbol versions until something links it, so for both options, the check links the whole archive into a shared library with
--no-undefined, using the package's ownDatadogConfig.cmake. It then inspects the versions that shared library requires, failing on newer glibc versions and, with--forbid-libstdc++, on any libstdc++ version. Because the link allows no undefined symbols, it also confirms that the dependenciesDatadogConfig.cmakedeclares resolve every symbol the library references.CONTRIBUTING.md now lists each Linux artifact's system link dependencies, including the requirement that applications using Unreal's libcurl supply CA certificates.
## Testing
CI builds the new package and passes these checks. I also manually tested Linux builds of dd-sdk-unreal against a development build of dd-sdk-cpp from these changes, rather than against the packaged archive.
[RUM-19172]: https://datadoghq.atlassian.net/browse/RUM-19172?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[RUM-19843]: https://datadoghq.atlassian.net/browse/RUM-19843?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[RUM-19851]: https://datadoghq.atlassian.net/browse/RUM-19851?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ