cederom commented on code in PR #17849: URL: https://github.com/apache/nuttx/pull/17849#discussion_r2704636636
########## tools/ci/docker/linux/Dockerfile: ########## @@ -380,30 +371,64 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" TZ=Etc/UTC apt-get in zip \ && rm -rf /var/lib/apt/lists/* -# Set GCC-12 as Default compiler -RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 20 && \ - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 20 && \ - update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 && \ - update-alternatives --set cc /usr/bin/gcc && \ - update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 && \ - update-alternatives --set c++ /usr/bin/g++ +# Add LLVM repository for clang-21 (Targeting Noble) +# Note: Clang-21 is a snapshot, ensured repo is noble +RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc +RUN echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-21 main" | tee /etc/apt/sources.list.d/llvm.list +RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ + clang-21 \ + clang++-21 \ + clang-tidy-21 \ + && rm -rf /var/lib/apt/lists/* + +# Set Clang-21 as Default clang compiler +RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-21 50 && \ + update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-21 50 && \ + update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-21 50 -# Configure out base setup for adding python packages +# Install GCC 14 from Ubuntu packages +RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -qq \ + gcc-14 \ + g++-14 \ + && rm -rf /var/lib/apt/lists/* + +# Remove existing cpp symlinks to avoid circular reference +RUN rm -f /lib/cpp /usr/bin/cpp /etc/alternatives/cpp + +# Set up update-alternatives for GCC 14 and system GCC 13 +RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 && \ + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 50 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100 && \ + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 50 && \ + update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-14 100 && \ + update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-13 50 && \ + update-alternatives --install /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-14 100 && \ + update-alternatives --install /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-13 50 && \ + update-alternatives --install /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-14 100 && \ + update-alternatives --install /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-13 50 && \ + update-alternatives --install /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-14 100 && \ + update-alternatives --install /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-13 50 && \ + update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-14 100 && \ + update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-13 50 && \ + update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-14 100 && \ + update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-13 50 && \ + update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-14 100 && \ + update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-13 50 && \ + update-alternatives --install /usr/bin/lto-dump lto-dump /usr/bin/lto-dump-14 100 && \ + update-alternatives --install /usr/bin/lto-dump lto-dump /usr/bin/lto-dump-13 50 + +# 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 ENV PIP_DISABLE_PIP_VERSION_CHECK=true -# This disables the cache with value 0. We do not want caching as it -# increases the images size. ENV PIP_NO_CACHE_DIR=0 -# We are using the minimal python installation from the system so include -# setuptools and also wheel so we can use the binary releases of packages -# instead of requiring them to be compiled. -RUN pip3 install setuptools -RUN pip3 install wheel + +RUN pip3 install --upgrade --ignore-installed pip setuptools wheel + +# Install Python Tools RUN pip3 install cmake-format -# Install CodeChecker and use it to statically analyze the code. -# RUN pip3 install CodeChecker -# Install cvt2utf to check for non-UTF characters. RUN pip3 install cvt2utf -# Install pytest RUN pip3 install cxxfilt RUN pip3 install construct RUN pip3 install esptool==4.8.dev4 Review Comment: 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 ? :-) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
