Skip to content

Conversation

@sjoblomj
Copy link
Contributor

@sjoblomj sjoblomj commented Oct 29, 2025

Fixing build error when using gcc-15. Also adding GitHub Actions Unit test. Fixes #1770.

To observe the build fail to build without this patch, you can save the following Dockerfile and run with docker build .. To see the build succeed, you can simulate this patch by uncommenting the line #RUN sed -i 's/#include </#include <cstdint>\n#include </' ../libs/s25main/notifications/NotificationManager.h, and then running docker build . again.

FROM ubuntu:25.10
RUN apt-get update && apt-get install -y \
    libcurl4-gnutls-dev \
    git \
    build-essential \
    cmake \
    libsdl2-dev \
    libsdl2-mixer-dev \
    libboost-all-dev \
    libminiupnpc-dev \
    lua5.3 \
    liblua5.3-dev \
    libbz2-dev \
    gettext

RUN git clone --recursive https://github.com/Return-To-The-Roots/s25client.git

RUN mkdir s25client/build
WORKDIR s25client/build
#RUN sed -i 's/#include </#include <cstdint>\n#include </' ../libs/s25main/notifications/NotificationManager.h
RUN cmake -DRRTR_ENABLE_WERROR=off -DCMAKE_BUILD_TYPE=Release ..
RUN make

Flamefire
Flamefire previously approved these changes Oct 30, 2025
Copy link
Member

@Flamefire Flamefire left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for also adding it to CI!

@Flamefire
Copy link
Member

Flamefire commented Oct 30, 2025

GCC 15 isn't available until Ubuntu 25, I merged a change using a container-based CI job. Just pull your branch to update your local branch

However it seems the tests now start to fail. Do you see that locally too?

@Flow86
Copy link
Member

Flow86 commented Oct 30, 2025

until ubuntu 25 is available, I wouldn't add it to the CI. Lets keep this change simple. Add the missing cstdint.h - the ci is already much too complex and big.

@Flamefire
Copy link
Member

Yes, failures seem to be caused by using containers:

ALSA lib conf.c:5205:(_snd_config_evaluate) function snd_func_card_inum returned error: No such file or directory
unknown location(0): fatal error: in "GameClientTests/ClientFollowsConnectProtocol/_0": std::runtime_error: Could not get username
/s25client/tests/s25Main/drivers/testDriverWrapper.cpp(31): fatal error: in "AllAudioDriversAreLoadable": critical check AudioDriverWrapper::inst().LoadDriver(preference) has failed

The DeadSingleton-errors shouldn't happen, but anyway: Wouldn't overthink this.

@sjoblomj Can you reset your branch to contain only the fix for the missing include? Would be great to have CI for that but seems to not be worth the effort

@sjoblomj
Copy link
Contributor Author

I force-pushed (hope that's ok) so that now only the include is in the PR. Thank you for looking at it :)

@Flow86 Flow86 merged commit 65d5d90 into Return-To-The-Roots:master Oct 31, 2025
17 checks passed
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.

Support GCC 15

3 participants