Skip to content

Test with linux clang-23, and gcc-16 in docker#297

Open
ClausKlein wants to merge 11 commits into
bemanproject:mainfrom
ClausKlein:feature/test-with-linux-clang-23
Open

Test with linux clang-23, and gcc-16 in docker#297
ClausKlein wants to merge 11 commits into
bemanproject:mainfrom
ClausKlein:feature/test-with-linux-clang-23

Conversation

@ClausKlein

@ClausKlein ClausKlein commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

@ClausKlein
ClausKlein marked this pull request as draft July 18, 2026 07:52
@coveralls

coveralls commented Jul 18, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 93.671% (-0.07%) from 93.738% — ClausKlein:feature/test-with-linux-clang-23 into bemanproject:main

@ClausKlein

Copy link
Copy Markdown
Collaborator Author

my docker file to build clang-23:

# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright © 2025-2026 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
#                       Matthias Kretz <m.kretz@gsi.de>

FROM ghcr.io/mattkretz/cplusplus-ci/gcc14

ENV DEBIAN_FRONTEND=noninteractive

ENV LLVM_VERSION=23

# NOTE: pipx ensurepath -> appends /root/.local/bin to the PATH environment variable.
ENV PATH="/root/.local/bin:${PATH}"

RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - && \
    add-apt-repository "deb http://apt.llvm.org/noble/ llvm-toolchain-noble main" && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
    bash bash-completion vim tree less symlinks direnv \
    build-essential curl git wget libssl-dev \
    doxygen graphviz python3-pip python-is-python3 pipx \
    zip ccache \
    clang-${LLVM_VERSION} \
    clang-tidy-${LLVM_VERSION} \
    clang-format-${LLVM_VERSION} \
    libc++-${LLVM_VERSION}-dev \
    libc++abi-${LLVM_VERSION}-dev && \
    apt-get install -y --no-install-recommends libclang-rt-${LLVM_VERSION}-dev && \
    update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} ${LLVM_VERSION}0 \
                        --slave /usr/bin/clang++ clang++ /usr/bin/clang++-${LLVM_VERSION} && \
    update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-${LLVM_VERSION} ${LLVM_VERSION}0 && \
    update-alternatives --install /usr/bin/run-clang-tidy run-clang-tidy /usr/bin/run-clang-tidy-${LLVM_VERSION} ${LLVM_VERSION}0 && \
    update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-${LLVM_VERSION} ${LLVM_VERSION}0 && \
    apt-get clean

# QUICKFIX: ajust the broken relative paths inside libc++.modules.json
RUN sed -i \
    's#\.\./share/libc++#/usr/lib/llvm-'${LLVM_VERSION}'/share/libc++#' \
    /lib/x86_64-linux-gnu/libc++.modules.json

RUN pipx install cmake && \
    pipx install --include-deps cmake-format && \
    pipx install codespell && \
    pipx install conan && \
    pipx install gcovr && \
    pipx install gersemi && \
    pipx install ninja && \
    pipx install pre-commit && \
    pipx install uv

WORKDIR /home/builder/workdir

Comment thread cmake/prelude.cmake
@ClausKlein
ClausKlein force-pushed the feature/test-with-linux-clang-23 branch from 5f1d878 to 105b8be Compare July 21, 2026 18:04
Comment thread CMakePresets.json Outdated
@ClausKlein ClausKlein self-assigned this Jul 21, 2026
@ClausKlein
ClausKlein requested a review from ednolan July 21, 2026 19:53
(and documenting the workaround) until LLVM fixes the underlying problem.
(for Clang only needed)

Prevent Clang -Werror or fixed them too
@ClausKlein
ClausKlein marked this pull request as ready for review July 22, 2026 16:34
Comment on lines +68 to +72
add_compile_options(
$ENV{CXXFLAGS}
-Wno-missing-braces
-Wno-unneeded-internal-declaration
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dietmarkuehl suppressed until fixed!

struct state;

auto operator()(::beman::execution::detail::counting_scope_base* ptr) const {
// TODO(CK): prevent -Wmissing-braces clang++ error!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dietmarkuehl Note this TODO!

Comment on lines +108 to 109
// TODO(CK): prevent -Wunneeded-internal-declaration error!
friend auto operator==(const test_scheduler&, const test_scheduler&) noexcept -> bool = default;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dietmarkuehl Note this TODO!


if(NOT CMAKE_CXX_FLAGS MATCHES "-stdlib=libc\\+\\+")
string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++")
string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++ -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@ednolan this prevents the clang linker errors in Release

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