Skip to content

Fix build issues on Ubuntu 26.04 - #196

Open
Krzysztof Kanas (kkanas) wants to merge 7 commits into
mainfrom
kkanas/fix-cmake-on-ubuntu26
Open

Krzysztof Kanas (kkanas) wants to merge 7 commits into
mainfrom
kkanas/fix-cmake-on-ubuntu26

Conversation

@kkanas

@kkanas Krzysztof Kanas (kkanas) commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Update cmake to version v3.5.0
Fix 1dsSdk cmake so it can work with cmake >= v4.0.0 by using backward compatibility flag
Patch1dsSdk that fails on missing include

Checklist

  • I have read the contribution guidelines.
  • I added unit-tests to validate my changes. All unit tests are passing.
  • I have merged the latest main branch prior to this PR submission.
  • I ran pre-commit on my changes prior to this PR submission.
  • I submitted this PR against the main branch.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The lowered CMake minimum and Docker-installed version break default ComplianceEngine configuration, while the telemetry policy reset introduces unintended SDK submodule downloads.

3 open issues
What changed in this PR

This PR targets Ubuntu 26.04 build compatibility for Kompli, focusing on the telemetry SDK’s CMake compatibility and missing integer-type include.

Changes:

  • Adds an SDK patch to insert <cstdint> when missing.
  • Passes a CMake 3.5 policy compatibility floor to the SDK build.
  • Changes selected CMake minimum versions to 3.5 and downgrades ten container CMake pins to v3.5.0.
File Description
src/​tests/​fuzzer/​CMakeLists.txt Lowers the fuzzer’s CMake minimum to 3.5.
src/​common/​telemetry/​lib/​Patch1dsSdk.cmake Adds the missing SDK <cstdint> include.
src/​common/​telemetry/​lib/​CMakeLists.txt Applies the SDK patch and policy compatibility setting.
src/​common/​telemetry/​CMakeLists.txt Lowers telemetry’s CMake minimum to 3.5.
src/​common/​telemetry/​bin/​tests/​CMakeLists.txt Raises telemetry tests’ CMake minimum to 3.5.
src/​CMakeLists.txt Lowers the project’s CMake minimum to 3.5.
devops/​docker/​ubuntu-24.04-amd64/​Dockerfile Pins Ubuntu 24.04’s CMake to v3.5.0.
devops/​docker/​ubuntu-22.04-amd64/​Dockerfile Pins Ubuntu 22.04’s CMake to v3.5.0.
devops/​docker/​ubuntu-20.04-amd64/​Dockerfile Pins Ubuntu 20.04’s CMake to v3.5.0.
devops/​docker/​sles-15-amd64/​Dockerfile Pins SLES 15’s CMake to v3.5.0.
devops/​docker/​rockylinux-9-amd64/​Dockerfile Pins Rocky Linux 9’s CMake to v3.5.0.
devops/​docker/​rhel-9-amd64/​Dockerfile Pins RHEL 9’s CMake to v3.5.0.
devops/​docker/​rhel-8-amd64/​Dockerfile Pins RHEL 8’s CMake to v3.5.0.
devops/​docker/​oraclelinux-8-amd64/​Dockerfile Pins Oracle Linux 8’s CMake to v3.5.0.
devops/​docker/​debian-12-amd64/​Dockerfile Pins Debian 12’s CMake to v3.5.0.
devops/​docker/​almalinux-9-amd64/​Dockerfile Pins AlmaLinux 9’s CMake to v3.5.0.

Review effort: Balanced

Comment thread src/CMakeLists.txt Resolved
Comment thread src/common/telemetry/CMakeLists.txt Resolved
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Test Results

    11 files  +    10   1 001 suites  +910   2m 22s ⏱️ + 1m 59s
 1 674 tests ±     0   1 673 ✅ ±     0   1 💤 ± 0  0 ❌ ±0 
18 414 runs  +16 740  18 403 ✅ +16 730  11 💤 +10  0 ❌ ±0 

Results for commit 4534911. ± Comparison against base commit 9792d0d.

♻️ This comment has been updated with latest results.

Address this by forcing version compatibility in external cmake

Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
-- Building static SDK library
-- Library will be installed to 1ds_install/lib
-- Configuring done (0.2s)
-- Generating done (0.0s)
-- Build files have been written to: 1dscpplib-prefix/src/1dscpplib-build
[4/18] Performing build step for '1dscpplib'
FAILED: [code=1] lib/1dscpplib-prefix/src/1dscpplib-stamp/1dscpplib-build 1ds_install/lib/libmat.a 1dscpplib-prefix/src/1dscpplib-stamp/1dscpplib-build 1dscpplib-prefix/src/1dscpplib-build && /usr/bin/cmake --build . && /usr/bin/cmake -E touch 1dscpplib-prefix/src/1dscpplib-stamp/1dscpplib-build
[1/2] Building CXX object lib/CMakeFiles/mat.dir/modules/cds/CdsFactory.cpp.o
FAILED: [code=1] lib/CMakeFiles/mat.dir/modules/cds/CdsFactory.cpp.o
In file included from 1dscpplib-prefix/src/1dscpplib/lib/modules/cds/CdsFactory.hpp:9,
                 from 1dscpplib-prefix/src/1dscpplib/lib/modules/cds/CdsFactory.cpp:1:
	1dscpplib-prefix/src/1dscpplib/lib/include/public/ICdsFactory.hpp:57:25: error: ‘uint8_t’ was not declared in this scope
   57 |     virtual std::vector<uint8_t> CollectAndGetDataStream(const std::string& sessionId, const Config& config) noexcept = 0;
      |                         ^~~~~~~
1dscpplib-prefix/src/1dscpplib/lib/include/public/ICdsFactory.hpp:15:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   14 | #include <vector>
  +++ |+#include <cstdint>
   15 |
1dscpplib-prefix/src/1dscpplib/lib/include/public/ICdsFactory.hpp:57:32: error: template argument 1 is invalid
   57 |     virtual std::vector<uint8_t> CollectAndGetDataStream(const std::string& sessionId, const Config& config) noexcept = 0;
      |                                ^
1dscpplib-prefix/src/1dscpplib/lib/include/public/ICdsFactory.hpp:57:32: error: template argument 2 is invalid
1dscpplib-prefix/src/1dscpplib/lib/modules/cds/CdsFactory.cpp: In member function ‘virtual bool Microsoft::Applications::Events::CommonDiagnosticSystem::DoCollectAndUpload(const std::string&, const Microsoft::Applications::Events::DiagnosticConfig&)’:
1dscpplib-prefix/src/1dscpplib/lib/modules/cds/CdsFactory.cpp:48:71: error: conversion from ‘int’ to non-scalar type ‘std::vector<unsigned char>’ requested
   48 |         std::vector<uint8_t> data = collector->CollectAndGetDataStream(sessionID, config.collectorConfig);
      |                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-unknown-warning-option’ may have been intended to silence earlier diagnostics

Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
Co-authored-by: GitHub Copilot <github-copilot@github.com>
Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
VCPKG uses external/vcpkg/scripts/vcpkg-tools.json for cmake version
which is 4.4.2 at the moment.

Unify cmake version requirement to have single version

Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
…ct builds

- Cache manifest dependencies, helper tools, and binary packages in all 11 images
- Preserve registry locks to prevent fresh builds from fetching Git HEAD
- Reuse the prepared vcpkg tree and remove redundant CI bootstrapping
- Use a SHA512-verified Lua mirror during dependency preparation
- Require a network-disabled configure/build before publishing images
- Update rebuild triggers, documentation, and regression tests

Validated the Ubuntu 24.04 image with Podman, including its offline build.
All 11 regression tests pass.

Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
Co-authored-by: GitHub Copilot <github-copilot@github.com>
…, lua, sqlite3

Build CMake 3.30.1 against system libraries to bootstrap dependencies
on older distributions, then build vcpkg's required CMake version
against static vcpkg OpenSSL.

- Share CMake installation and version checks across all build images
- Fetch Ninja before installing dependencies with bootstrap tools
- Refresh package ABIs and binary caches with the final CMake
- Update container documentation and workflow triggers

Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
Signed-off-by: Krzysztof Kanas <kkanas@fastmail.com>
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.

2 participants