← Back to Pull requests

feat: Publish an Unreal-compatible Linux libc++ static release #435

Closed
unknown closed this pull request without merging on Nov 09, 2026 16:04 UTC
View on GitHub
unknown unknown commented on Nov 06, 2026 23:11 UTC
Author

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:

  • They're compiled against libstdc++, whose standard library types (such as std::string, defined in its std::__cxx11 namespace) are incompatible with libc++'s.

  • Code compiled against glibc 2.39's headers can reference symbols that glibc 2.28 doesn't define, so Unreal's link fails with undefined symbols.
  • ## How we build it

    The new ue-clang20 image downloads Epic's public v26_clang-20.1.8-rockylinux8 toolchain, pinned by SHA-256, and ci/linux/unreal-toolchain.cmake builds 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 version tool 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. ddsdkcpp now links Threads::Threads, and DatadogConfig.cmake calls find_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-package gains two options, which the new CI job passes:

  • --forbid-libstdc++ scans the archive's symbols, and fails if any are in libstdc++'s std::__cxx11 namespace, or if none are in libc++'s std::__1 namespace.

  • --max-glibc-version 2.28 fails 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 own DatadogConfig.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 dependencies DatadogConfig.cmake declares 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

    Diff: 546 lines (+409 / -137) across 6 files Reviewer: fuzzybinary Review duration: 3892m
    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
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 48% (MEDIUM) · Higher = larger blast radius
    48%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 20.8% · Safe to merge
    20.8%