Commit 6c367590 authored by Robert Schmidt's avatar Robert Schmidt

Merge remote-tracking branch 'origin/support-ubuntu-24.04' into integration_2024_w26

parents 707aab3a ee57ae65
......@@ -21,7 +21,7 @@
# Author: laurent THOMAS, Lionel GAUTHIER
cmake_minimum_required (VERSION 3.12)
cmake_minimum_required (VERSION 3.16)
project (OpenAirInterface LANGUAGES C CXX)
#########################################################
......@@ -180,22 +180,6 @@ add_boolean_option(SANITIZE_ADDRESS False "enable the address sanitizer (ASan)"
if (SANITIZE_ADDRESS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -fno-common")
# There seems to be some incompatibility with pthread_create and the RT scheduler, which
# results in pthread_create hanging.
#
# When we switch from Ubuntu 16.04 to 18.04, we found that running with the address sanitizer,
# the pthread_create function calls were not working. The inital thought was that we were
# trying to create a thread that was not-blocking and would eventually crash the machine during
# the run. After more debugging, we found that we would never even start the thread. We narrowed
# down the first two instances of pthread_create in the gNB and NR UE to be sctp_eNB_task and
# one_thread, respectively. We found that adding sleeps, and various other pauses to the threads
# had not effect. From there, we found that if we add an abort(); prior to the thread loop, we
# do not execute that. This indicated to us that the problem is not likely to be a non-blocking
# thread, but perhaps and issue with pthread_create itself. From there we begain to research the
# issue on the web. See: https://github.com/google/sanitizers/issues/1125
#
# Google searching indicates this appears to be a problem since at least 2018. This could be something
# wrong in the pthread library, or something subtly wrong in this CMakeLists.txt. Use Ubuntu 20.04 instead.
endif ()
add_boolean_option(SANITIZE_THREAD False "enable the address sanitizer (TSan)" ON)
......
......@@ -4,12 +4,12 @@
<p align="center">
<a href="https://gitlab.eurecom.fr/oai/openairinterface5g/-/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-OAI--Public--V1.1-blue" alt="License"></a>
<a href="https://releases.ubuntu.com/18.04/"><img src="https://img.shields.io/badge/OS-Ubuntu18-Green" alt="Supported OS Ubuntu 18"></a>
<a href="https://releases.ubuntu.com/20.04/"><img src="https://img.shields.io/badge/OS-Ubuntu20-Green" alt="Supported OS Ubuntu 20"></a>
<a href="https://releases.ubuntu.com/22.04/"><img src="https://img.shields.io/badge/OS-Ubuntu22-Green" alt="Supported OS Ubuntu 22"></a>
<a href="https://releases.ubuntu.com/24.04/"><img src="https://img.shields.io/badge/OS-Ubuntu24-Green" alt="Supported OS Ubuntu 24"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL8-Green" alt="Supported OS RHEL8"></a>
<a href="https://www.redhat.com/en/technologies/linux-platforms/enterprise-linux"><img src="https://img.shields.io/badge/OS-RHEL9-Green" alt="Supported OS RELH9"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore37-Green" alt="Supported OS Fedora 37"></a>
<a href="https://getfedora.org/en/workstation/"><img src="https://img.shields.io/badge/OS-Fedore40-Green" alt="Supported OS Fedora 40"></a>
</p>
<p align="center">
......
......@@ -286,7 +286,7 @@ class Containerize():
self.host = result.group(0)
if self.host == 'Ubuntu':
self.cli = 'docker'
self.dockerfileprefix = '.ubuntu20'
self.dockerfileprefix = '.ubuntu22'
self.cliBuildOptions = ''
elif self.host == 'Red Hat':
self.cli = 'sudo podman'
......@@ -321,7 +321,7 @@ class Containerize():
imageNames.append(('oai-nr-cuup', 'nr-cuup', 'oai-nr-cuup-asan', '--build-arg "BUILD_OPTION=--sanitize"'))
result = re.search('build_cross_arm64', self.imageKind)
if result is not None:
self.dockerfileprefix = '.ubuntu20.cross-arm64'
self.dockerfileprefix = '.ubuntu22.cross-arm64'
# Workaround for some servers, we need to erase completely the workspace
if self.forcedWorkspaceCleanup:
......@@ -677,7 +677,7 @@ class Containerize():
return False
# build ran-unittests image
dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu20"
dockerfile = "ci-scripts/docker/Dockerfile.unittest.ubuntu22"
ret = cmd.run(f'docker build --progress=plain --tag ran-unittests:{baseTag} --file {dockerfile} . &> {lSourcePath}/cmake_targets/log/unittest-build.log')
if ret.returncode != 0:
build_log_name = f'build_log_{self.testCase_id}'
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
......
......@@ -12,7 +12,7 @@
</tr>
</table>
This page is only valid for an `Ubuntu18` host.
This page is only valid for an `Ubuntu 22` host.
**Table of Contents**
......
......@@ -12,10 +12,8 @@
</tr>
</table>
This page is valid for an `Ubuntu18` host.
It is also valid for `Ubuntu 20.04`.
It is also valid for `Ubuntu 22.04`.
This tutorial is only valid once this file is merged into the `develop` branch.
# 1. Adapt the `docker-compose` to your environment #
The yaml file is in the following directory: `ci-scripts/yaml_files/5g_l2sim_tdd`
......
......@@ -12,7 +12,7 @@
</tr>
</table>
This page is only valid for an `Ubuntu18` host.
This page is only valid for an `Ubuntu 22` host.
**NOTE: this version (2023-01-27) has been updated for the `v1.5.0` version of the `OAI 5G CN`.**
......
......@@ -52,7 +52,7 @@ TARGET_LIST=""
function print_help() {
echo_info "
This script compiles OpenAirInterface Software, and can install dependencies
for a number of distributions (Ubuntu 18-22, Fedora, RHEL7/8).
for a number of distributions (Ubuntu 22-24, Fedora, RHEL9).
Options:
--arch-native
Passes -march=native to the compiler.
......@@ -418,7 +418,6 @@ function main() {
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_ADDRESS=True -DSANITIZE_UNDEFINED=True"
shift;;
--sanitize-address | -fsanitize=address)
grep -sq "Ubuntu 18.04" /etc/os-release && echo_error "Bug in OS with this option, see CMakeLists.txt"
CMAKE_CMD="$CMAKE_CMD -DSANITIZE_ADDRESS=True"
shift;;
--sanitize-undefined | -fsanitize=undefined)
......
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-9)
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-9)
set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc-11)
set(CMAKE_CXX_COMPILER /usr/bin/aarch64-linux-gnu-g++-11)
set(CROSS_COMPILE 1)
set(bnProc_gen_128_DIR ${CMAKE_CURRENT_BINARY_DIR}/${NATIVE_DIR}) # /../build)
......
......@@ -103,11 +103,11 @@ get_distribution_release() {
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
"ubuntu24.04") return 0 ;;
"ubuntu23.10") return 0 ;;
"ubuntu22.04") return 0 ;;
"ubuntu21.04") return 0 ;;
"ubuntu20.04") return 0 ;;
"ubuntu18.04") return 0 ;;
"debian11") return 0 ;;
"fedora36") return 0 ;;
"fedora37") return 0 ;;
......@@ -321,7 +321,7 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get remove libuhd3.14.1 -y || true
$SUDO apt-get remove libuhd3.15.0 -y || true
local distribution=$(get_distribution_release)
if [[ "$distribution" == "ubuntu18.04" || "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then
if [[ "$distribution" == "ubuntu20.04" || "$distribution" == "ubuntu22.04" ]]; then
$SUDO apt-get remove libuhd4.?.? -y || true
fi
v=$(lsb_release -cs)
......@@ -351,7 +351,7 @@ check_install_usrp_uhd_driver(){
$SUDO apt-get update
$SUDO apt-get -y install python-tk $boost_libs_ubuntu libusb-1.0-0-dev
case "$(get_distribution_release)" in
"ubuntu18.04" | "ubuntu20.04" | "ubuntu22.04")
"ubuntu20.04" | "ubuntu22.04")
$SUDO apt-get -y install libuhd-dev libuhd4.5.0 uhd-host
;;
esac
......@@ -528,24 +528,11 @@ check_install_soapy () {
install_soapy_iris_from_source
}
# for ubuntu 18 we need a special repository (https://apt.kitware.com/) to install cmake >= 3.12
add_cmake_repo () {
$SUDO $INSTALLER -y install wget
wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | $SUDO tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ bionic main' | $SUDO tee /etc/apt/sources.list.d/kitware.list >/dev/null
$SUDO $INSTALLER -y update
$SUDO rm /usr/share/keyrings/kitware-archive-keyring.gpg
$SUDO $INSTALLER -y install kitware-archive-keyring
}
check_install_additional_tools (){
$SUDO $INSTALLER update -y
local optional_packages=""
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
case "$(get_distribution_release)" in
"ubuntu18.04")
optional_packages="python-dev python-pip python-pyroute2 python python-numpy python-scipy python-matplotlib ctags"
;;
"ubuntu20.04" | "ubuntu21.04" | "ubuntu22.04" | "debian11" )
optional_packages="python3 python3-pip python3-dev python3-scipy python3-matplotlib python3-pyroute2 universal-ctags"
;;
......@@ -586,10 +573,6 @@ check_install_oai_software() {
if [[ "$OS_BASEDISTRO" == "debian" ]]; then
$SUDO apt install -y software-properties-common
case "$(get_distribution_release)" in
"ubuntu18.04")
add_cmake_repo
specific_packages=""
;;
"debian11")
specific_packages="libz-dev"
;;
......@@ -602,7 +585,6 @@ check_install_oai_software() {
ninja-build \
pkg-config \
git \
libatlas-base-dev \
libblas-dev \
liblapack-dev \
liblapacke-dev \
......
......@@ -202,8 +202,8 @@ With the nvIPC sources in the project directory, the docker image can be built.
In order to build the final image, there is an intermediary image to be built (ran-base)
```bash
~$ cd ~/openairinterface5g/
~/openairinterface5g$ docker build . -f docker/Dockerfile.base.ubuntu20 --tag ran-base:latest
~/openairinterface5g$ docker build . -f docker/Dockerfile.gNB.aerial.ubuntu20 --tag oai-gnb-aerial:latest
~/openairinterface5g$ docker build . -f docker/Dockerfile.base.ubuntu22 --tag ran-base:latest
~/openairinterface5g$ docker build . -f docker/Dockerfile.gNB.aerial.ubuntu22 --tag oai-gnb-aerial:latest
```
......
......@@ -89,8 +89,8 @@ information on how the images are built.
- [RAN-ARM-Cross-Compile-Builder](https://jenkins-oai.eurecom.fr/job/RAN-ARM-Cross-Compile-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
- orion: Cross-compilation from Intel to ARM
- base image from `Dockerfile.base.ubuntu20.cross-arm64`
- build image from `Dockerfile.build.ubuntu20.cross-arm64` (no target images)
- base image from `Dockerfile.base.ubuntu22.cross-arm64`
- build image from `Dockerfile.build.ubuntu22.cross-arm64` (no target images)
- [RAN-cppcheck](https://jenkins-oai.eurecom.fr/job/RAN-cppcheck/)
~BUILD-ONLY ~4G-LTE ~5G-NR
- bellatrix
......@@ -112,16 +112,16 @@ information on how the images are built.
- [RAN-Ubuntu18-Image-Builder](https://jenkins-oai.eurecom.fr/job/RAN-Ubuntu18-Image-Builder/)
~BUILD-ONLY ~4G-LTE ~5G-NR
- run formatting check from `ci-scripts/docker/Dockerfile.formatting.bionic`
- obelix: Ubuntu 20 image build using docker (Note: builds U20 images while pipeline is named U18!)
- base image from `Dockerfile.base.ubuntu20`
- build image from `Dockerfile.build.ubuntu20`, followed by
- target image from `Dockerfile.eNB.ubuntu20`
- target image from `Dockerfile.gNB.ubuntu20`
- target image from `Dockerfile.nr-cuup.ubuntu20`
- target image from `Dockerfile.nrUE.ubuntu20`
- target image from `Dockerfile.lteUE.ubuntu20`
- target image from `Dockerfile.lteRU.ubuntu20`
- build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu20`, and run them
- obelix: Ubuntu 22 image build using docker (Note: builds U22 images while pipeline is named U18!)
- base image from `Dockerfile.base.ubuntu22`
- build image from `Dockerfile.build.ubuntu22`, followed by
- target image from `Dockerfile.eNB.ubuntu22`
- target image from `Dockerfile.gNB.ubuntu22`
- target image from `Dockerfile.nr-cuup.ubuntu22`
- target image from `Dockerfile.nrUE.ubuntu22`
- target image from `Dockerfile.lteUE.ubuntu22`
- target image from `Dockerfile.lteRU.ubuntu22`
- build unit tests from `ci-scripts/docker/Dockerfile.unittest.ubuntu22`, and run them
#### Image Test pipelines
......
......@@ -5,7 +5,7 @@
## Environment
- OS: ubuntu 20.04
- OS: ubuntu 22.04
### Set up the environment
......@@ -15,21 +15,21 @@ Set up for install the package for aarch64.
sudo dpkg --add-architecture arm64
echo -e \
"deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n"\
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse"\
| sudo tee /etc/apt/sources.list.d/arm-cross-compile-sources.list
sudo cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup"
sudo sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list
sudo apt update
sudo apt install -y gcc-9-aarch64-linux-gnu \
g++-9-aarch64-linux-gnu
sudo apt install -y gcc-11-aarch64-linux-gnu \
g++-11-aarch64-linux-gnu
sudo apt-get install -y \
libatlas-base-dev:arm64 \
......@@ -46,11 +46,15 @@ sudo apt-get install -y \
zlib1g-dev:arm64
```
The above enables apt to download packages for arm64. It also installs
gcc cross-compilers for aarch64 in version 11. This version needs to match the
versions of gcc defined in the cmake cross-compilation file (`cross-arm.cmake`).
## Install and Build
### Install required packages
Use the host compiler to install some dependencies.
Use the host compiler to install its dependencies.
```shell
cd cmake_targets
......@@ -85,9 +89,9 @@ be defined in order to tell cmake where the host tools have been built.
```shell
cd ../build-cross
cmake ../../.. -DCMAKE_TOOLCHAIN_FILE=../../../cmake_targets/cross-arm.cmake -DNATIVE_DIR=../build
cmake ../../.. -GNinja -DCMAKE_TOOLCHAIN_FILE=../../../cmake_targets/cross-arm.cmake -DNATIVE_DIR=../build
make -j`nproc` dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim
make -j`nproc` lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem
make -j`nproc` params_libconfig coding rfsimulator
ninja -j`nproc` dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim
ninja -j`nproc` lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem
ninja -j`nproc` params_libconfig coding rfsimulator
```
......@@ -21,12 +21,12 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
FROM ubuntu:focal AS ran-base
FROM ubuntu:jammy AS ran-base
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......@@ -34,6 +34,7 @@ ENV BUILD_UHD_FROM_SOURCE=True
ENV UHD_VERSION=4.4.0.0
#install developers pkg/repo
#use gcc-12 to avoid problems of default gcc-11 in FlexRIC
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
......@@ -41,9 +42,12 @@ RUN apt-get update && \
build-essential \
psmisc \
git \
gcc-12 \
g++-12 \
xxd \
# python3-pip for conf template generation
python3-pip && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12 && \
pip3 install --ignore-installed pyyaml
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
......
......@@ -21,12 +21,12 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04 to cross-compile for ARM64
# Valid for Ubuntu 22.04 to cross-compile for ARM64
#
#---------------------------------------------------------------------
# Very important, the focal image shall not be using mirrors. A lot of them do NOT support ARM64.
FROM ubuntu:focal AS ran-base
# Very important, the jammy image shall not be using mirrors. A lot of them do NOT support ARM64.
FROM ubuntu:jammy AS ran-base
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
# Specifying a working version of SIMDE for ARM:
......@@ -37,13 +37,13 @@ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
#enabling arm64 architecture
dpkg --add-architecture arm64 && \
echo "deb [arch=arm64] http://ports.ubuntu.com/ focal main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-updates multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse" \
echo "deb [arch=arm64] http://ports.ubuntu.com/ jammy main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates main restricted\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates universe\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-updates multiverse\n" \
"deb [arch=arm64] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse" \
| tee /etc/apt/sources.list.d/arm-cross-compile-sources.list && \
cp /etc/apt/sources.list "/etc/apt/sources.list.`date`.backup" && \
sed -i -E "s/(deb)\ (http:.+)/\1\ [arch=amd64]\ \2/" /etc/apt/sources.list && \
......@@ -69,8 +69,8 @@ RUN apt-get update && \
zlib1g-dev:arm64 \
# cross build libs and compilers
libc6-dev-i386 \
gcc-9-aarch64-linux-gnu \
g++-9-aarch64-linux-gnu && \
gcc-11-aarch64-linux-gnu \
g++-11-aarch64-linux-gnu && \
apt-get clean
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
......@@ -42,6 +42,6 @@ RUN /bin/sh oaienv && \
-w USRP -t Ethernet \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF \
--noavx512 \
--cmake-opt -DCMAKE_C_FLAGS="-Werror -fstack-protector-strong" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror -fstack-protector-strong" $BUILD_OPTION && \
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror" $BUILD_OPTION && \
# Mainly to see if the sanitize option was perfectly executed
ldd ran_build/build/nr-softmodem
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04 to cross-compile for ARM64
# Valid for Ubuntu 22.04 to cross-compile for ARM64
#
#---------------------------------------------------------------------
......@@ -47,6 +47,6 @@ RUN /bin/sh oaienv && \
ninja dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim lte-softmodem nr-softmodem nr-cuup oairu lte-uesoftmodem nr-uesoftmodem params_libconfig coding rfsimulator > ../../log/all.txt 2>&1; \
# displaying errors and warnings
egrep -A3 "warning:|error:" ../../log/all.txt || true && \
# will fail only for errors
egrep -L "error:" ../../log/all.txt && \
# will fail only if string "errors:" is found
egrep "error:" -vqz ../../log/all.txt && \
echo "====== End of log for cross-build executables ======"
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
......@@ -31,7 +31,7 @@ FROM ran-build:latest AS enb-build
#start from scratch for target executable
FROM ubuntu:focal as oai-enb
FROM ubuntu:jammy as oai-enb
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......@@ -42,38 +42,50 @@ RUN apt-get update && \
software-properties-common \
procps \
libsctp1 \
libboost-chrono1.71.0 \
libboost-date-time1.71.0 \
libboost-filesystem1.71.0 \
libboost-regex1.71.0 \
libboost-serialization1.71.0 \
libboost-thread1.71.0 \
libboost-system1.71.0 \
libboost-program-options1.71.0 \
libboost-chrono1.74.0 \
libboost-date-time1.74.0 \
libboost-filesystem1.74.0 \
libboost-regex1.74.0 \
libboost-serialization1.74.0 \
libboost-thread1.74.0 \
libboost-system1.74.0 \
libboost-program-options1.74.0 \
tzdata \
libblas3 \
libatlas3-base \
libconfig9 \
openssl \
net-tools \
iperf \
wget \
iperf3 \
iputils-ping \
iproute2 \
gdb \
python \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 && \
# Installing older version of iperf2 for feMBMS test
wget --quiet http://fr.archive.ubuntu.com/ubuntu/pool/universe/i/iperf/iperf_2.0.13+dfsg1-1build1_amd64.deb && \
dpkg -i iperf_2.0.13+dfsg1-1build1_amd64.deb && \
# iperf --version returns 1 that fails docker build
iperf --version || true && \
rm -f iperf_2.0.13+dfsg1-1build1_amd64.deb && \
apt-get remove -y wget && \
# 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 \
libasan5 \
#libasan5 \ # see below
libubsan1 \
liblapacke; fi' && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
# we select another compile (gcc-12) for compilation, requiring another libasan
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=enb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
WORKDIR /opt/oai-enb/bin
COPY --from=enb-build \
/oai-ran/cmake_targets/ran_build/build/lte-softmodem ./
......
......@@ -58,7 +58,7 @@ RUN /bin/sh oaienv && \
#start from scratch for target executable
FROM ubuntu:focal as oai-gnb-aerial
FROM ubuntu:jammy as oai-gnb-aerial
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
......
......@@ -58,7 +58,7 @@ RUN /bin/sh oaienv && \
#start from scratch for target executable
FROM ubuntu:focal as oai-gnb-aerial
FROM ubuntu:jammy as oai-gnb-aerial
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu18.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
......
......@@ -31,7 +31,7 @@ FROM ran-build:latest AS gnb-build
#start from scratch for target executable
FROM ubuntu:focal as oai-gnb
FROM ubuntu:jammy as oai-gnb
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......@@ -42,14 +42,14 @@ RUN apt-get update && \
software-properties-common \
procps \
libsctp1 \
libboost-chrono1.71.0 \
libboost-date-time1.71.0 \
libboost-filesystem1.71.0 \
libboost-regex1.71.0 \
libboost-serialization1.71.0 \
libboost-thread1.71.0 \
libboost-system1.71.0 \
libboost-program-options1.71.0 \
libboost-chrono1.74.0 \
libboost-date-time1.74.0 \
libboost-filesystem1.74.0 \
libboost-regex1.74.0 \
libboost-serialization1.74.0 \
libboost-thread1.74.0 \
libboost-system1.74.0 \
libboost-program-options1.74.0 \
tzdata \
libblas3 \
libatlas3-base \
......@@ -61,19 +61,24 @@ RUN apt-get update && \
iproute2 \
iputils-ping \
gdb \
python \
python3 \
python3-six \
python3-requests \
libusb-1.0-0 && \
# 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 \
libasan5 \
#libasan5 \ # see below
libubsan1 \
liblapacke; fi' && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
# we select another compile (gcc-12) for compilation, requiring another libasan
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-softmodem ./
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
......@@ -31,7 +31,7 @@ FROM ran-build:latest AS ru-build
#start from scratch for target executable
FROM ubuntu:focal as oai-lte-ru
FROM ubuntu:jammy as oai-lte-ru
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......@@ -46,7 +46,6 @@ RUN apt-get update && \
libconfig9 \
net-tools \
gdb \
python \
python3 \
python3-six \
python3-requests \
......@@ -74,13 +73,13 @@ COPY --from=ru-base /usr/local/lib/libuhd.so.4.4.0 /usr/local/lib
COPY --from=ru-base /usr/local/lib/uhd/utils/uhd_images_downloader.py /opt/oai-lte-ru/bin
COPY --from=ru-base \
/usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.71.0 \
/usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_date_time.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.74.0 \
/usr/lib/x86_64-linux-gnu/
RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai_device.so" && \
......
......@@ -31,7 +31,7 @@ FROM ran-build:latest AS lte-ue-build
#start from scratch for target executable
FROM ubuntu:focal as oai-lte-ue
FROM ubuntu:jammy as oai-lte-ue
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......@@ -42,38 +42,50 @@ RUN apt-get update && \
software-properties-common \
procps \
libsctp1 \
libboost-chrono1.71.0 \
libboost-date-time1.71.0 \
libboost-filesystem1.71.0 \
libboost-regex1.71.0 \
libboost-serialization1.71.0 \
libboost-thread1.71.0 \
libboost-system1.71.0 \
libboost-program-options1.71.0 \
libboost-chrono1.74.0 \
libboost-date-time1.74.0 \
libboost-filesystem1.74.0 \
libboost-regex1.74.0 \
libboost-serialization1.74.0 \
libboost-thread1.74.0 \
libboost-system1.74.0 \
libboost-program-options1.74.0 \
tzdata \
liblapacke \
libatlas3-base \
libconfig9 \
openssl \
net-tools \
python \
python3 \
python3-six \
python3-requests \
libpython3.8 \
libpython3.10 \
libusb-1.0-0 \
iputils-ping \
iproute2 \
iperf3 \
iperf && \
wget && \
# Installing older version of iperf2 for feMBMS test
wget --quiet http://fr.archive.ubuntu.com/ubuntu/pool/universe/i/iperf/iperf_2.0.13+dfsg1-1build1_amd64.deb && \
dpkg -i iperf_2.0.13+dfsg1-1build1_amd64.deb && \
# iperf --version returns 1 that fails docker build
iperf --version || true && \
rm -f iperf_2.0.13+dfsg1-1build1_amd64.deb && \
apt-get remove -y wget && \
# 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 \
libasan5 \
#libasan5 \ # see below
libubsan1 \
liblapacke; fi' && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
# we select another compile (gcc-12) for compilation, requiring another libasan
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=lte-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
WORKDIR /opt/oai-lte-ue/bin
COPY --from=lte-ue-build \
/oai-ran/cmake_targets/ran_build/build/lte-uesoftmodem \
......
......@@ -30,7 +30,7 @@ FROM ran-base:latest as gnb-base
FROM ran-build:latest AS gnb-build
FROM ubuntu:focal as oai-nr-cuup
FROM ubuntu:jammy as oai-nr-cuup
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
......@@ -45,11 +45,17 @@ RUN apt-get update && \
openssl && \
# 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 \
libasan5 \
#libasan5 \ see below
libubsan1 \
liblapacke; fi' && \
rm -rf /var/lib/apt/lists/*
# we select another compile (gcc-12) for compilation, requiring another libasan
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=gnb-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
WORKDIR /opt/oai-gnb/bin
COPY --from=gnb-build \
/oai-ran/cmake_targets/ran_build/build/nr-cuup \
......
......@@ -21,7 +21,7 @@
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface BUILD service
# Valid for Ubuntu 20.04
# Valid for Ubuntu 22.04
#
#---------------------------------------------------------------------
......@@ -31,7 +31,7 @@ FROM ran-build:latest AS nr-ue-build
#start from scratch for target executable
FROM ubuntu:focal as oai-nr-ue
FROM ubuntu:jammy as oai-nr-ue
ARG BUILD_OPTION
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
......@@ -42,14 +42,14 @@ RUN apt-get update && \
software-properties-common \
procps \
libsctp1 \
libboost-chrono1.71.0 \
libboost-date-time1.71.0 \
libboost-filesystem1.71.0 \
libboost-regex1.71.0 \
libboost-serialization1.71.0 \
libboost-thread1.71.0 \
libboost-system1.71.0 \
libboost-program-options1.71.0 \
libboost-chrono1.74.0 \
libboost-date-time1.74.0 \
libboost-filesystem1.74.0 \
libboost-regex1.74.0 \
libboost-serialization1.74.0 \
libboost-thread1.74.0 \
libboost-system1.74.0 \
libboost-program-options1.74.0 \
tzdata \
liblapacke \
libatlas3-base \
......@@ -57,7 +57,6 @@ RUN apt-get update && \
openssl \
net-tools \
gdb \
python \
python3 \
python3-six \
python3-requests \
......@@ -68,11 +67,17 @@ RUN apt-get update && \
iperf && \
# 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 \
libasan5 \
#libasan5 \ # see below
libubsan1; fi' && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
# we select another compile (gcc-12) for compilation, requiring another libasan
# library version. Installing it above would install the wrong version. Hence,
# copy the right version from ran-build. When upgrading to Ubuntu24, install
# the correct one above!
COPY --from=nr-ue-build /usr/lib/x86_64-linux-gnu/libasan.so.8.0.0 /usr/lib/x86_64-linux-gnu/
WORKDIR /opt/oai-nr-ue/bin
COPY --from=nr-ue-build \
/oai-ran/cmake_targets/ran_build/build/nr-uesoftmodem \
......
......@@ -75,18 +75,18 @@ Targets can be:
The currently-supported OS are:
- `rhel9` for Red Hat Entreprise Linux (including images for an OpenShift cluster)
- `ubuntu20` for Ubuntu 20.04 LTS
- `ubuntu22` for Ubuntu 22.04 LTS
- `rocky` for Rocky-Linux 8.7
For more details regarding the build on an Openshift Cluster, see [OpenShift README](../openshift/README.md).
# 3. Building using `docker` under Ubuntu 20.04 #
# 3. Building using `docker` under Ubuntu 22.04 #
## 3.1. Pre-requisites ##
* `git` installed
* `docker-ce` installed
* Pulling `ubuntu:focal` from DockerHub
* Pulling `ubuntu:jammy` from DockerHub
## 3.2. Building the shared images ##
......@@ -96,8 +96,8 @@ There are two shared images: one that has all dependencies, and a second that co
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd openairinterface5g
git checkout develop
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu20 .
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu20 .
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu22 .
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu22 .
```
After building both:
......@@ -115,12 +115,12 @@ Note that the steps are identical for `rocky-linux`.
### 3.2.1. Additional build otions
This is only available for the Ubuntu-20 version.
This is only available for the Ubuntu version of Dockerfiles.
You can, for example, create a `sanitizer` version of the ran-build image.
```bash
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu20 --build-arg "BUILD_OPTION=--sanitize" .
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu22 --build-arg "BUILD_OPTION=--sanitize" .
```
Currently the `--sanitize` option for `build_oai` enables:
......@@ -146,7 +146,7 @@ You can also use this docker build arguments to pass any available option(s) on
For example, the eNB:
```bash
docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu20 .
docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu22 .
```
After a while:
......@@ -171,7 +171,7 @@ Note that the steps are identical for `rocky-linux`.
If you have used the sanitizer option, then you should also pass it when building the target image:
```bash
docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.ubuntu20 --build-arg "BUILD_OPTION=--sanitize" .
docker build --target oai-gnb --tag oai-gnb:latest --file docker/Dockerfile.gNB.ubuntu22 --build-arg "BUILD_OPTION=--sanitize" .
```
Normally the target image will be around 200 Mbytes bigger.
......
......@@ -11,7 +11,12 @@ data storage. */
#include<math.h>
#include<complex.h>
#include <stdlib.h>
#include <linux/version.h>
#if defined RHEL_RELEASE_CODE
#include <cblas/cblas.h>
#else
#include <cblas.h>
#endif
#include <string.h>
#include <linux/version.h>
#include <lapacke_utils.h>
......@@ -22,8 +27,8 @@ data storage. */
void transpose (int N, float complex *A, float complex *Result)
{
// COnputes C := alpha*op(A)*op(B) + beta*C,
enum CBLAS_TRANSPOSE transa = CblasTrans;
enum CBLAS_TRANSPOSE transb = CblasNoTrans;
CBLAS_TRANSPOSE transa = CblasTrans;
CBLAS_TRANSPOSE transb = CblasNoTrans;
int rows_opA = N; // number of rows in op(A) and in C
int col_opB = N; //number of columns of op(B) and in C
int col_opA = N; //number of columns in op(A) and rows in op(B)
......@@ -62,8 +67,8 @@ void transpose (int N, float complex *A, float complex *Result)
void conjugate_transpose (int N, float complex *A, float complex *Result)
{
// Computes C := alpha*op(A)*op(B) + beta*C,
enum CBLAS_TRANSPOSE transa = CblasConjTrans;
enum CBLAS_TRANSPOSE transb = CblasNoTrans;
CBLAS_TRANSPOSE transa = CblasConjTrans;
CBLAS_TRANSPOSE transb = CblasNoTrans;
int rows_opA = N; // number of rows in op(A) and in C
int col_opB = N; //number of columns of op(B) and in C
int col_opA = N; //number of columns in op(A) and rows in op(B)
......@@ -100,8 +105,8 @@ void conjugate_transpose (int N, float complex *A, float complex *Result)
void H_hermH_plus_sigma2I (int N, int M, float complex *A, float sigma2, float complex *Result)
{
//C := alpha*op(A)*op(B) + beta*C,
enum CBLAS_TRANSPOSE transa = CblasConjTrans;
enum CBLAS_TRANSPOSE transb = CblasNoTrans;
CBLAS_TRANSPOSE transa = CblasConjTrans;
CBLAS_TRANSPOSE transb = CblasNoTrans;
int rows_opA = N; // number of rows in op(A) and in C
int col_opB = N; //number of columns of op(B) and in C
int col_opA = N; //number of columns in op(A) and rows in op(B)
......@@ -127,8 +132,8 @@ void H_hermH_plus_sigma2I (int N, int M, float complex *A, float sigma2, float c
void HH_herm_plus_sigma2I (int M, int N, float complex *A, float sigma2, float complex *Result)
{
//C := alpha*op(A)*op(B) + beta*C,
enum CBLAS_TRANSPOSE transa = CblasNoTrans;
enum CBLAS_TRANSPOSE transb = CblasConjTrans;
CBLAS_TRANSPOSE transa = CblasNoTrans;
CBLAS_TRANSPOSE transb = CblasConjTrans;
int k = N; //number of columns in op(A) and rows in op(B),k
float complex alpha = 1.0+I*0;
int lda = N;
......@@ -195,8 +200,8 @@ void eigen_vectors_values (int N, float complex *A, float complex *Vectors, floa
}
void mutl_matrix_matrix_row_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result ){
enum CBLAS_TRANSPOSE transa = CblasNoTrans;
enum CBLAS_TRANSPOSE transb = CblasNoTrans;
CBLAS_TRANSPOSE transa = CblasNoTrans;
CBLAS_TRANSPOSE transb = CblasNoTrans;
int rows_opA = rows_M0; // number of rows in op(A) and in C
int col_opB = col_M1; //number of columns of op(B) and in C
int col_opA = col_M0; //number of columns in op(A) and rows in op(B)
......@@ -226,8 +231,8 @@ void mutl_matrix_matrix_row_based(float complex* M0, float complex* M1, int rows
}
void mutl_matrix_matrix_col_based(float complex* M0, float complex* M1, int rows_M0, int col_M0, int rows_M1, int col_M1, float complex* Result ){
enum CBLAS_TRANSPOSE transa = CblasNoTrans;
enum CBLAS_TRANSPOSE transb = CblasNoTrans;
CBLAS_TRANSPOSE transa = CblasNoTrans;
CBLAS_TRANSPOSE transb = CblasNoTrans;
int rows_opA = rows_M0; // number of rows in op(A) and in C
int col_opB = col_M1; //number of columns of op(B) and in C
int col_opA = col_M0; //number of columns in op(A) and rows in op(B)
......
flexric @ beabdd07
Subproject commit f1c08ed2b9b1eceeda7941dd7bf435db0168dd56
Subproject commit beabdd072ca9e381d4d27c9fbc6bb19382817489
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment