-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update CI Linux Docker file to use latest GNU and Clang toolchains #17849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
This commit will update Linux Docker to latest GNU and Clang toolchains. Signed-off-by: Bartosz <bartol2205@gmail.com>
|
Question for @Barto22 and everyone: Does this bump resolve the known issues? Before proceeding with the merge, I would recommend testing the new Nuttx Docker image by compiling all 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 I remind myself and everyone else: The Inviolable Principles of NuttX |
lupyuen
left a comment
There was a problem hiding this 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!
|
@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 |
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. |
|
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. |
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>
|
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. |
|
Hmm I am working on BSD, macOS also uses Clang. Do you mean you want to replace Clang with GCC 15.2 everywhere? There are some differences and some people prefer Clang. It would be nice to keep Clang build coverage. Also as @raiden00pl pointed out in #17850 it is possible to pass build time parameter which toolchain to use. Maybe SIM build with Clang AND Gcc is possible / desired? |
I mean I will not touch current test builds configurations. Of course Clang will stay, I updated it to version 21 cause I also use it mostly as GCC alternative and for build comparison and checks. |
|
@Barto22 Why is it necessary to completely update the Dockerfile? Wouldn't it be preferable to update it step by step? I quickly tested only job arm-01 and found these errors. |
tools/ci/docker/linux/Dockerfile
Outdated
| # Configure out base setup for adding python packages | ||
| # Download, build and install GCC 15.2.0 | ||
| RUN mkdir -p /tmp/gcc-build && cd /tmp/gcc-build && \ | ||
| wget -q https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, do we really need to compile the compiler on each CI run? This will starve us from service quotas really quickly.. which we already hit several times.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can use no LTS version of Ubuntu we can download as package GCC version 15.
|
Do I get this right that you want to build the whole GCC 15.2 from sources @Barto22? Is GCC package unavailable? This is a lot more work than building the NuttX itself and seems out of scope. This will drain us from CI quotas rapidly after several forced pushes. We already limited CI due to hitting build quotas several times. Also for this reason macOS is disabled :-( Would it be possible to provide time / cpu usage comparison between current CI setup and your proposition? If we are supposed to build GCC 15.2 on our own on each CI run this seems a blocker here. But it may be solved by providing system package to the build host so we could just fetch a binary package :-) |
The GCC 15 is available from Ubuntu 25 so if we can use no LTS version of Ubuntu it will be possible to pull GCC 15 as package, I will check that. |
I will check that errors, I see that this are mostly some int conversion errors, I will check that. Thanks for pointing out. |
We prefer LTS. Too many changes in non-lts. And its good common reference point. Please contact Ubuntu package managers and ask for GCC 15.2 package. Without this package ready for use this change will be hard to merge as it puts too much burden on the compiler build rather than NuttX builds. If you need support / confirmation form our side let us know :-) |
cederom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Building GCC 15.2 from source on each CI invocation will exhaust our CI quota rapidly. This is far more work than NuttX build itself.
- We want to stick to LTS releases for the build machines.
- Please request for GCC 15.2 package for the build host.
|
Ok, I will let know about update for GCC 15 on Ubuntu. |
|
Look here #17914 @Barto22 we already run out of runners with "standard" daily PR reviews. There is absolutely no way we can build GCC on each run, we need to use the package, preferably something already offered by GitHub or Ubuntu just to make runner time as short as possible (but not shorter :-) ). |
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>
|
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. |
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
Testing
CI pipeline was executed across standard Linux configurations. The following was verified:
ostestand 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.