From 8880f95792483a87295625674adfd6b2372275f0 Mon Sep 17 00:00:00 2001 From: Hannes Diethelm Date: Wed, 26 Aug 2026 22:14:34 +0200 Subject: [PATCH 1/3] CI: Update to ubuntu-26.04 This solves an issue with po4a that does not translates all the documents. However, some build jobs fail now and will be fixed in the following commits. --- .github/workflows/ci.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d04b5052449..f3b44755aaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ env: jobs: rip-and-test: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 45 steps: - name: Dump GitHub context @@ -74,7 +74,7 @@ jobs: .github/scripts/verify-clean-repo.sh rip-headless: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 45 steps: - name: Dump GitHub context @@ -126,7 +126,7 @@ jobs: .github/scripts/verify-clean-repo.sh rip-rtai: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 45 steps: - name: Dump GitHub context @@ -155,7 +155,7 @@ jobs: .github/scripts/verify-clean-repo.sh rip-and-test-clang: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 45 steps: - name: Dump GitHub context @@ -206,7 +206,7 @@ jobs: .github/scripts/verify-clean-repo.sh cppcheck: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 45 steps: - name: Checkout repository @@ -226,7 +226,7 @@ jobs: scripts/cppcheck.sh shellcheck: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 45 steps: - name: Checkout repository @@ -249,7 +249,7 @@ jobs: scripts/shellcheck.sh htmldocs: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 60 steps: - name: Dump GitHub context @@ -275,15 +275,15 @@ jobs: run: scripts/manpage-name-check.py --enforce docs/build/man - name: Check for derived-id section references run: scripts/docs-anchor-check.py --enforce - - name: Verify no untracked or modified files after build - run: | - #*.po and documentation.pot are modifyed by build. Ignore them for now. - .github/scripts/verify-clean-repo.sh ':(exclude)docs/po/*.po' ':(exclude)docs/po/documentation.pot' - name: HTML checks run: | set -x #-w sets warn only, remove to generate a CI failure on error scripts/htmlcheck.sh -w + - name: Verify no untracked or modified files after build + run: | + #*.po and documentation.pot are modified by build. Ignore them for now. + .github/scripts/verify-clean-repo.sh ':(exclude)docs/po/*.po' ':(exclude)docs/po/documentation.pot' - name: Tar linuxcnc-doc run: | set -x @@ -301,7 +301,7 @@ jobs: timeout-minutes: 75 strategy: matrix: - runner: ["ubuntu-24.04", "ubuntu-24.04-arm"] + runner: ["ubuntu-26.04", "ubuntu-26.04-arm"] image: ["debian:bookworm", "debian:trixie", "debian:sid"] include: - allow_fail: False @@ -391,7 +391,7 @@ jobs: if-no-files-found: error package-indep: - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 timeout-minutes: 75 strategy: matrix: @@ -444,7 +444,7 @@ jobs: .github/scripts/build-package-indep.sh - name: Verify no untracked or modified files after build run: | - #*.po and documentation.pot are modifyed by build. Ignore them for now. + #*.po and documentation.pot are modified by build. Ignore them for now. .github/scripts/verify-clean-repo.sh ':(exclude)VERSION' ':(exclude)debian/changelog' ':(exclude)docs/po/*.po' ':(exclude)docs/po/documentation.pot' - name: Install debian packages run: | @@ -481,7 +481,7 @@ jobs: if: (github.event_name == 'release' && github.event.action == 'published') || startsWith(github.ref, 'refs/tags/') permissions: contents: write - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Download artifacts uses: actions/download-artifact@v8 From 2115ca67082eabf69c545769119fc43efe1755d9 Mon Sep 17 00:00:00 2001 From: Hannes Diethelm Date: Wed, 26 Aug 2026 23:13:58 +0200 Subject: [PATCH 2/3] CI: Update to ubuntu-26.04: cppcheck cppcheck passes now. Replace #ifdef AAAAA with #if 0 so cppcheck does not check unused code. "make headers" before cppckeck, so include is populated. --- .github/scripts/build-headers.sh | 11 +++++++++++ .github/workflows/ci.yml | 7 +++++-- src/emc/rs274ngc/gcodemodule.cc | 2 +- src/emc/sai/driver.cc | 2 +- src/emc/task/emctaskmain.cc | 2 +- src/hal/classicladder/classicladder_gtk.c | 2 +- src/hal/classicladder/drawing.c | 2 +- src/hal/classicladder/vars_names.c | 2 +- 8 files changed, 22 insertions(+), 8 deletions(-) create mode 100755 .github/scripts/build-headers.sh diff --git a/.github/scripts/build-headers.sh b/.github/scripts/build-headers.sh new file mode 100755 index 00000000000..da4b339d46c --- /dev/null +++ b/.github/scripts/build-headers.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -eu #Needed so CI fails when anything is wrong +set -x + +#Any arguments are passed to configure + +cd src +./autogen.sh +./configure "$@" --disable-check-runtime-deps --enable-werror +make headers diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3b44755aaf..ecfe55090d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -217,9 +217,12 @@ jobs: - name: Install dependencies run: | set -x - .github/scripts/use-main-ubuntu-mirror.sh - sudo apt-get -q update + .github/scripts/install-deps.sh sudo apt-get --yes install cppcheck + - name: Build headers + run: | + set -x + .github/scripts/build-headers.sh --with-realtime=uspace - name: Cppcheck run: | set -x diff --git a/src/emc/rs274ngc/gcodemodule.cc b/src/emc/rs274ngc/gcodemodule.cc index 58df5809b06..cbd48bd0c19 100644 --- a/src/emc/rs274ngc/gcodemodule.cc +++ b/src/emc/rs274ngc/gcodemodule.cc @@ -374,7 +374,7 @@ class MoveBatch { // have still been handed over once, and re-delivering them from a later // flush would duplicate them in the consumer's program. count_ = 0; - PyObject *view = PyMemoryView_FromMemory((char*)buf_, + PyObject *view = PyMemoryView_FromMemory(reinterpret_cast(buf_), (Py_ssize_t)n * ROW * sizeof(double), PyBUF_READ); if(!view) { interp_error ++; return; } PyObject *result = callmethod(callback, "move_batch", "O", view); diff --git a/src/emc/sai/driver.cc b/src/emc/sai/driver.cc index b0275236c3a..5f4ad25aa81 100644 --- a/src/emc/sai/driver.cc +++ b/src/emc/sai/driver.cc @@ -564,7 +564,7 @@ int main (int argc, char ** argv) go_flag = 0; #ifdef TOOL_NML //{ - tool_nml_register((CANON_TOOL_TABLE*)& _sai._tools); + tool_nml_register(& _sai._tools); #else //}{ const int random_toolchanger = 0; // sai gets its OWN mmap. tool_mmap_creator() opens the file O_TRUNC, and it diff --git a/src/emc/task/emctaskmain.cc b/src/emc/task/emctaskmain.cc index 5e41127a5a2..8bcb498a247 100644 --- a/src/emc/task/emctaskmain.cc +++ b/src/emc/task/emctaskmain.cc @@ -2434,7 +2434,7 @@ static int emcTaskIssueCommand(NMLmsg * cmd) break; case EMC_TRAJ_SELECT_KINS_TYPE: - kSwitch_msg = (EMC_TRAJ_SELECT_KINS *) cmd; + kSwitch_msg = reinterpret_cast(cmd); retval = emcSelectKinsType(kSwitch_msg->switchkins_type); break; diff --git a/src/hal/classicladder/classicladder_gtk.c b/src/hal/classicladder/classicladder_gtk.c index b78690638d5..85a46c33a6b 100644 --- a/src/hal/classicladder/classicladder_gtk.c +++ b/src/hal/classicladder/classicladder_gtk.c @@ -1059,7 +1059,7 @@ void MainSectionWindowInitGtk() //no more used since menu/toolbar added... -#ifdef AAAAAAAAAAAAAAAAAAAAAA +#if 0 hboxbottom = gtk_hbox_new (FALSE,0); gtk_container_add (GTK_CONTAINER (vbox), hboxbottom); gtk_widget_show(hboxbottom); diff --git a/src/hal/classicladder/drawing.c b/src/hal/classicladder/drawing.c index 9a6f65b363f..35d24d39b01 100644 --- a/src/hal/classicladder/drawing.c +++ b/src/hal/classicladder/drawing.c @@ -352,7 +352,7 @@ void DrawElement( cairo_t * cr,int x,int y,int Width,int Height,StrElement Eleme char DisplayColorState = ( DrawingOption==DRAW_NORMAL && !EditDatas.ModeEdit && InfosGene->LadderState==STATE_RUN ); //Cairo.... -#ifdef AAAAAAAAAAAAA +#if 0 GdkGC * DynaGcOff; GdkGC * TheGc; GdkColor DynaGdkColor; diff --git a/src/hal/classicladder/vars_names.c b/src/hal/classicladder/vars_names.c index 97f569ea617..6fae792db71 100644 --- a/src/hal/classicladder/vars_names.c +++ b/src/hal/classicladder/vars_names.c @@ -42,7 +42,7 @@ //===OLD CODE NO MORE USED=== //with names directly in it... //to be deleted, but some precise errors codes aren't present in the new function... -#ifdef AAAAAAAAA +#if 0 char * CreateVarName(int Type, int Offset) { From bd118f511bd5c0ab8e2b5c81d888dffc2c571fa1 Mon Sep 17 00:00:00 2001 From: Hannes Diethelm Date: Wed, 26 Aug 2026 23:21:55 +0200 Subject: [PATCH 3/3] CI: Update to ubuntu-26.04: clang build clang needs -latomic: See https://en.cppreference.com/cpp/atomic/atomic Quote: On GCC and Clang, some of the functionality described here requires linking against -latomic. --- src/rtapi/Submakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rtapi/Submakefile b/src/rtapi/Submakefile index bb36cc34260..87890fbcae6 100644 --- a/src/rtapi/Submakefile +++ b/src/rtapi/Submakefile @@ -14,7 +14,7 @@ $(call TOOBJSDEPS, $(RTAPI_APP_SRCS)): EXTRAFLAGS += -DSIM \ -UULAPI -DRTAPI -pthread ../bin/rtapi_app: $(call TOOBJS, $(RTAPI_APP_SRCS)) $(ECHO) Linking $(notdir $@) - $(Q)$(CXX) -rdynamic -o $@ $^ $(LIBDL) -pthread -lrt -lfmt $(LIBUDEV_LIBS) -ldl -lcap $(LDFLAGS) + $(Q)$(CXX) -rdynamic -o $@ $^ $(LIBDL) -pthread -lrt -lfmt -latomic $(LIBUDEV_LIBS) -ldl -lcap $(LDFLAGS) TARGETS += ../bin/rtapi_app USPACE_POSIX_SRCS := rtapi/uspace_posix.cc