Skip to content

Conversation

@Barto22
Copy link

@Barto22 Barto22 commented Jan 13, 2026

This commit updates the Linux CI Docker image to the latest GNU and Clang toolchains. This PR is related to: #17826

Summary

This change updates the GNU (gcc/g++) and Clang (clang/clang++) toolchains used by the Linux CI Docker image to their latest stable versions.
The motivation is to ensure CI builds track supported compilers, improve warning coverage, and detect issues earlier during development.
The update includes minor adjustments to package names and installation scripts to align with distribution changes.

Impact

  • CI builds will use newer compilers with expanded warnings and better C/C++23 support.
  • No impact on downstream users unless they explicitly rely on CI-provided compiler versions.
  • No functional changes to runtime behavior or board configurations.
  • Improves compatibility with modern host toolchains and prevents bit-rot for newer distributions.
  • No documentation changes needed.

Testing

CI pipeline was executed across standard Linux configurations. The following was verified:

  • Full NuttX build matrix completed without regressions.
  • GCC and Clang builds both succeeded for representative board targets.
  • ostest and common example applications executed successfully within CI environment (logs available in CI artifacts).

Host: GitHub Actions CI (Ubuntu Linux)
Boards tested in CI: sim, nsh, plus standard matrix defaults.

No build regressions observed.

This commit will update Linux Docker to latest GNU and Clang toolchains.

Signed-off-by: Bartosz <bartol2205@gmail.com>
@github-actions github-actions bot added Area: Tooling Area: CI Size: S The size of the change in this PR is small labels Jan 13, 2026
@simbit18
Copy link
Contributor

simbit18 commented Jan 13, 2026

Question for @Barto22 and everyone:

Does this bump resolve the known issues?

#16896

Before proceeding with the merge, I would recommend testing the new Nuttx Docker image by compiling all <board name>:<board configuration>.

We also need to check the toolchain update for the other operating systems (macOS and Windows - MSYS2/Native) present in the CI, so that the update does not leave anyone behind.

Otherwise, there is a risk that all attention will be focused on one OS at the expense of others.

For example macOS issues on NuttX Mirror
#17818

I remind myself and everyone else:

The Inviolable Principles of NuttX
https://nuttx.apache.org/docs/latest/introduction/inviolables.html#all-users-matter

Copy link
Member

@lupyuen lupyuen left a comment

Choose a reason for hiding this comment

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

@Barto22 Do you have Build Logs of the updated Docker Image, compiling the various NuttX Targets? Thanks!

@lupyuen
Copy link
Member

lupyuen commented Jan 13, 2026

@Barto22: Here are the steps for building and testing an updated Dockerfile for NuttX

https://lupyuen.org/articles/pr#appendix-downloading-the-docker-image-for-nuttx-ci

@Barto22
Copy link
Author

Barto22 commented Jan 13, 2026

@Barto22 Do you have Build Logs of the updated Docker Image, compiling the various NuttX Targets? Thanks!

I will test it and provide logs.

@Barto22
Copy link
Author

Barto22 commented Jan 13, 2026

@Barto22 Do you have Build Logs of the updated Docker Image, compiling the various NuttX Targets? Thanks!

I will test it and provide logs.

Currently I'm testing builds, docker image build successfully, I will test all configurations, I see that on gcc 15 there is a problem with libcxx, my PR #17826 fix it because it switches to latest LLVM libcxx and libcxxabi but before we merge it I will try to repair it here.

@cederom
Copy link
Contributor

cederom commented Jan 13, 2026

Thank you @Barto22 :-) You may want to replicate our CI build process for Linux too that could be best benchmark for comparison :-)

If that works fine locally and here on github then it should be fine :-)

More Linux users welcome for testing on different distros, please call for action on our dev@ mailing list :-)

@Barto22
Copy link
Author

Barto22 commented Jan 14, 2026

Thank you @Barto22 :-) You may want to replicate our CI build process for Linux too that could be best benchmark for comparison :-)

If that works fine locally and here on github then it should be fine :-)

More Linux users welcome for testing on different distros, please call for action on our dev@ mailing list :-)

Of course. I'm testing all CI builds and I will fix the errors,if anyone want to join testing I can share the docker already builded image.

@Barto22
Copy link
Author

Barto22 commented Jan 14, 2026

Question for @Barto22 and everyone:

Does this bump resolve the known issues?

#16896

Before proceeding with the merge, I would recommend testing the new Nuttx Docker image by compiling all <board name>:<board configuration>.

We also need to check the toolchain update for the other operating systems (macOS and Windows - MSYS2/Native) present in the CI, so that the update does not leave anyone behind.

Otherwise, there is a risk that all attention will be focused on one OS at the expense of others.

For example macOS issues on NuttX Mirror

#17818

I remind myself and everyone else:

The Inviolable Principles of NuttX

https://nuttx.apache.org/docs/latest/introduction/inviolables.html#all-users-matter

I will update all CI scripts according to results from tests of Docker image. But I will really appreciate tests on other platforms cause I'm mainly working on Linux.

All tools are updated to most recent stable versions.

Signed-off-by: Bartosz <bartol2205@gmail.com>
@github-actions github-actions bot added the Size: M The size of the change in this PR is medium label Jan 14, 2026
@Barto22
Copy link
Author

Barto22 commented Jan 14, 2026

I have updated in Dockerfile all tools to most recent versions, compilers too, Ubuntu to 24.04 LTS from 22.04. GCC and G++ are in version 15.2 so after merging my PR #17826 there will be no need of using clang for SIM boards tests - but clang is also in latest stable version 21, so I will remove this PR: #17850 because there will be no need of using clang for SIM board tests with libcxx. Now I'm working on fixing the compile errors and I will get back with the results.

Change GCC versions to older ones.

Signed-off-by: Bartosz <bartol2205@gmail.com>
/nuttx/drivers/video/: Fix uninitialized variables

Fix compile errors.

 Signed-off-by: Bartosz <bartol2205@gmail.com>
@Barto22
Copy link
Author

Barto22 commented Jan 16, 2026

For now Ubuntu 24.04 does not provide a package for GCC 15. Because of that, in this PR I will only update GCC (and the related toolchains) to version 14. The upcoming Ubuntu 26 LTS release on April is expected to include GCC 15 packages, so once that is available I plan to update the Dockerfile again to move the toolchains to the latest versions.

Regarding Clang/LLVM: the embedded LLVM/Clang toolchain currently has stable builds only up to version 19. Because of this, in my other PR (#17826) I will revert the libc++ and libc++abi versions to the latest stable v19 release - which will be still newer that current version v17. Version 21 (as used now) is not supported by the ARM embedded toolchain v19, so upgrading to it causes unnecessary problems for other users.

The intent of these changes is to update NuttX’s Docker environment to modern stable toolchain versions (even if not the very latest) so that we can benefit from the recent improvements while avoiding known breakage. After the Ubuntu release lands we can then move forward to GCC 15 and embedded Clang/LLVM 20 which is pre-relase for now (https://github.com/ARM-software/LLVM-embedded-toolchain-for-Arm/releases), which should also allow us to move libc++/libc++abi forward again.

I’ll run all the builds over the weekend and push fixes for any issues introduced by the current Dockerfile changes with new upragded toolchains. I think it's worth to even update this tools now because newer compilers will have a chance to catch more bugs, as it does now.

@github-actions github-actions bot added Area: Networking Effects networking subsystem Arch: arm Issues related to ARM (32-bit) architecture Area: Drivers Drivers issues Board: arm Board: simulator Size: L The size of the change in this PR is large labels Jan 19, 2026
@cederom
Copy link
Contributor

cederom commented Jan 19, 2026

Thank you @Barto22 :-) Yes, small reasonable steps, measurable results :-)

We are quite conservative here, not necessarily follow bleeding edge fashions, quite the opposite we prefer "unix old-school" and what works best. For instance we prefer stable 14.2 gcc as most users use it and work with C. There are not that many C++ users here so updating compilers / libstdc++ should be well justified and must not break anything for anyone else. No problem to wait for new LTS release of build host OS. There is no need to switch at the day of release unless we are sure all works as expected and there are no known growing pains. We prefer long-term self-compatibility over short-lived modernity :-)

As you can see we have many limitations, including the GH Runners quotas, that were strongly exceeded by just few GCC 15 builds plus end of year in CN that usually results in increased CI usage.


leave_critical_section(flags);

return OK;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why code changes when PR is about Docker configuration update? This is out of scope and hidden change that impacts existing code. If this fixes some other issue this should be provided as separate PR.

Please give a careful read to: https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md

RUN curl -s -L https://bitbucket.org/nuttx/tools/get/9ad3e1ee75c7.tar.gz \
| tar -C nuttx-tools --strip-components=1 -xz

# Bloaty
Copy link
Contributor

Choose a reason for hiding this comment

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

Is package unavailable? Using package would save us precious runner time :-)

&& cd /tools && rm -rf bloaty-src

# Kconfig Frontends
# Note: kconfig-frontends is sensitive to gperf versions, but generally works on 24.04
Copy link
Contributor

Choose a reason for hiding this comment

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

How about using package? I created FreeBSD port for kconfig-fontends using the same source location as Debian thus I know package is available..? :-)

&& ./configure --enable-mconf --disable-gconf --disable-qconf --enable-static --prefix=/tools/kconfig-frontends \
&& make install && cd /tools && rm -rf nuttx-tools

# GN
Copy link
Contributor

Choose a reason for hiding this comment

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

package?

RUN npm install -g n && n 20.10.0 node && hash -r
# Install Zap
# 24.04 has a recent node, but we ensure specific version management
RUN npm install -g n && n 24.13.0 node && hash -r
Copy link
Contributor

Choose a reason for hiding this comment

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

@lupyuen do we always need node? maybe a conditional?

###############################################################################
FROM nuttx-toolchain-base AS nuttx-toolchain-arm
# Download the latest ARM clang toolchain prebuilt by ARM
# ARM Clang 19.1.5
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏻

# ARM GCC 14.3
RUN mkdir -p gcc-arm-none-eabi && \
curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-arm-none-eabi.tar.xz" \
curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/14.3.Rel1/binrel/arm-gnu-toolchain-14.3.Rel1-x86_64-arm-none-eabi.tar.xz" \
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏻

Copy link
Contributor

Choose a reason for hiding this comment

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

btw are project source code changes caused by switch to gcc 14.3? are they here with 14.2?

# ARM64 GCC 14.3
RUN mkdir gcc-aarch64-none-elf && \
curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/13.2.Rel1/binrel/arm-gnu-toolchain-13.2.Rel1-x86_64-aarch64-none-elf.tar.xz" \
curl -s -L "https://developer.arm.com/-/media/Files/downloads/gnu/14.3.Rel1/binrel/arm-gnu-toolchain-14.3.Rel1-x86_64-aarch64-none-elf.tar.xz" \
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏻

# Build image for tool required by Pinguino builds
###############################################################################
FROM nuttx-toolchain-base AS nuttx-toolchain-pinguino
# Download the pinguino compilers. Note this includes both 8bit and 32bit
Copy link
Contributor

Choose a reason for hiding this comment

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

i would leave these comments, some insight provided.


###############################################################################
# Build image for tool required by Renesas builds
# CRITICAL: We use ubuntu:22.04 here because compiling GCC 8.3 sources
Copy link
Contributor

@cederom cederom Jan 19, 2026

Choose a reason for hiding this comment

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

ugh, no packages provided?

can we ask renesas / ubuntu for packages?

that would save us lots of gh runners time!

###############################################################################
FROM nuttx-toolchain-base AS nuttx-toolchain-esp32
# Download the latest ESP32, ESP32-S2 and ESP32-S3 GCC toolchain prebuilt by Espressif
# ESP 14.2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

they already seem to have 15.2.. but lets stick to 14.2 for now :-)

# This is used for the final images so make sure to not store apt cache
# Note: xtensa-esp32-elf-gdb is linked to libpython2.7

# Install dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

👍🏻

clang-tidy-21 \
&& rm -rf /var/lib/apt/lists/*

# Set Clang-21 as Default clang compiler
Copy link
Contributor

Choose a reason for hiding this comment

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

no need to --set cc and --set c++ as before ?

# Configure Python Environment
# PEP 668 in Ubuntu 24.04 prevents global pip install.
# We explicitly allow breaking system packages for this CI container.
ENV PIP_BREAK_SYSTEM_PACKAGES=1
Copy link
Contributor

Choose a reason for hiding this comment

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

not using venv?

Copy link
Contributor

Choose a reason for hiding this comment

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

i know we save doubled disk space.. but python became self-incompatible.. just worried if that won't break the system?

what do you think @lupyuen ? :-)

# We explicitly allow breaking system packages for this CI container.
ENV PIP_BREAK_SYSTEM_PACKAGES=1
ENV PIP_DISABLE_PIP_VERSION_CHECK=true
# This disables the cache with value 0. We do not want caching as it
Copy link
Contributor

Choose a reason for hiding this comment

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

please keep the comments, gave some insight what and why :-)

# Install pytest
RUN pip3 install cxxfilt
RUN pip3 install construct
RUN pip3 install esptool==4.8.dev4
Copy link
Contributor

Choose a reason for hiding this comment

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

we may want latest esptool (i.e. 4.1.0) as this is used to build images for espressif family mcu.. but we do NOT want version 5 (yet?) as it changed basic commands syntax ;-)

correct @tmedicci @fdcavalcanti ? :-)

@cederom
Copy link
Contributor

cederom commented Jan 19, 2026

Thank you @Barto22 amazing work! I left my remarks in the code :-)

  • Am I correct this docker is created each time CI is launched and we should keep it as light (time) as possible or it is created one time only and then reused by all following CI invocations @lupyuen @xiaoxiang781216 @simbit18 @acassis @raiden00pl @linguini1 @michallenc @jerpelea ?

  • Regarding the build tools compilation I am wondering how to offload the rest of source code build and just use pre-built packages?

    • The simplest way would be to have build host packages ready (Ubuntu 24LTS) but that may not be always possible.
    • How about adding missing tools to bigger projects like https://github.com/xpack-dev-tools ? :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Area: CI Area: Drivers Drivers issues Area: Networking Effects networking subsystem Area: Tooling Area: Video Board: arm Board: simulator Size: L The size of the change in this PR is large Size: M The size of the change in this PR is medium Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants