From 9c1603cfbb80356d67f84b59761ae897273a1b37 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 16 Feb 2026 09:12:44 +0100 Subject: [PATCH 1/2] Remove BUILD_ARG: Will never build sanitize xran does not work with Address Sanitizer. Thus, there is no reason to keep these build arguments. --- docker/Dockerfile.build.fhi72.native_arm.ubuntu | 3 +-- docker/Dockerfile.build.fhi72.ubuntu | 3 +-- docker/Dockerfile.nrORU.fhi72.ubuntu | 6 ------ 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/docker/Dockerfile.build.fhi72.native_arm.ubuntu b/docker/Dockerfile.build.fhi72.native_arm.ubuntu index 96f50fa485..30c1df5962 100644 --- a/docker/Dockerfile.build.fhi72.native_arm.ubuntu +++ b/docker/Dockerfile.build.fhi72.native_arm.ubuntu @@ -81,8 +81,7 @@ RUN /bin/sh oaienv && \ --ninja --gNB \ --build-lib "telnetsrv enbscope uescope nrscope" \ -t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \ - --build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \ - $BUILD_OPTION && \ + --build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION && \ # Mainly to see if the sanitize option was perfectly executed ldd ran_build/build/nr-softmodem && \ ldd ran_build/build/liboran_fhlib_5g.so && \ diff --git a/docker/Dockerfile.build.fhi72.ubuntu b/docker/Dockerfile.build.fhi72.ubuntu index 3d483618cd..63ec8a440e 100644 --- a/docker/Dockerfile.build.fhi72.ubuntu +++ b/docker/Dockerfile.build.fhi72.ubuntu @@ -71,8 +71,7 @@ RUN /bin/sh oaienv && \ --ninja --gNB --nrRU \ --build-lib "telnetsrv enbscope uescope nrscope" \ -t oran_fhlib_5g --cmake-opt -Dxran_LOCATION=/opt/phy/fhi_lib/lib \ - --build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \ - $BUILD_OPTION && \ + --build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION && \ # Mainly to see if the sanitize option was perfectly executed ldd ran_build/build/nr-softmodem && \ ldd ran_build/build/liboran_fhlib_5g.so && \ diff --git a/docker/Dockerfile.nrORU.fhi72.ubuntu b/docker/Dockerfile.nrORU.fhi72.ubuntu index 0db881c734..9c4e1b3971 100644 --- a/docker/Dockerfile.nrORU.fhi72.ubuntu +++ b/docker/Dockerfile.nrORU.fhi72.ubuntu @@ -25,7 +25,6 @@ FROM ran-build-fhi72:latest AS ran-build #start from scratch for target executable FROM ubuntu:noble AS oai-nr-oru -ARG BUILD_OPTION ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Europe @@ -50,11 +49,6 @@ RUN apt-get update && \ xz-utils \ libnuma-dev \ libyaml-cpp-dev && \ -# if the --sanitize option was used to build, additional packages are required - /bin/bash -c 'if [[ "$BUILD_OPTION" = "--sanitize" ]]; then DEBIAN_FRONTEND=noninteractive apt-get install --yes \ - libasan8 \ - libubsan1 \ - liblapacke; fi' && \ rm -rf /var/lib/apt/lists/* WORKDIR /opt/nr-oru/bin From a159f1b78a860e049ce6363015a0392e2019b37f Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 16 Feb 2026 11:04:11 +0100 Subject: [PATCH 2/2] Revert "Compile everything in Ubuntu builder" This reverts commit 16c333b1a3850a79647ca2bf6387b1b14391b821. I tried to build everything in Ubuntu images, but - this introduced a regression (ignores $BUILD_OPTION) - made that we don't use -Werror (when we should) I tried to fix the use of the first, but it would involve more changes than I prefer. On the second, we cannot enable -Werror, as FlexRIC does not build warning-free (in Release mode). We thus have to build only the targets that we require, and therefore we can keep using build_oai, which is the simplest option (cf. the first point). --- docker/Dockerfile.build.ubuntu | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/docker/Dockerfile.build.ubuntu b/docker/Dockerfile.build.ubuntu index bc2ed577a6..2fb391c9cf 100644 --- a/docker/Dockerfile.build.ubuntu +++ b/docker/Dockerfile.build.ubuntu @@ -42,15 +42,22 @@ RUN \ # Mount CPM package cache --mount=type=cache,target=/root/.cache/cpm/ \ /bin/sh oaienv && \ - mkdir -p cmake_targets/ran_build/build && \ - cd cmake_targets/ran_build/build && \ - cmake ../../../ -GNinja \ - -DENABLE_TELNETSRV=ON -DENABLE_ENBSCOPE=ON -DENABLE_UESCOPE=ON -DENABLE_NRSCOPE=ON \ - -DOAI_USRP=ON -DOAI_BLADERF=ON -DOAI_ETHERNET=ON -DOAI_VRTSIM_TAPS_CLIENT=ON \ - -DE2_AGENT=ON -DKPM_VERSION=KPM_V3_00 -DE2AP_VERSION=E2AP_V3 \ - -DAVX512=OFF && \ - # -DCMAKE_C_FLAGS=-Werror -DCMAKE_CXX_FLAGS=-Werror && \ - ninja + cd cmake_targets && \ + mkdir -p log && \ + ./build_oai -c --ninja \ + --eNB --gNB --RU --UE --nrUE \ + --build-lib "telnetsrv enbscope uescope nrscope" \ + -w USRP -t Ethernet -w BLADERF \ + --build-e2 --cmake-opt -DKPM_VERSION=$KPM_VERSION --cmake-opt -DE2AP_VERSION=$E2AP_VERSION \ + --cmake-opt -DOAI_VRTSIM_TAPS_CLIENT=ON \ + --noavx512 \ + --build-tool-opt -k10 \ + --cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \ + # Mainly to see if the sanitize option was perfectly executed + echo "---- ldd on executables ----" && \ + ldd ran_build/build/*softmodem* ran_build/build/nr-cuup ran_build/build/oairu && \ + echo "---- ldd on shared libraries ----" && \ + ldd ran_build/build/*.so ## Build FlexRIC for SM Models RUN \