From 30c03ad8f20e2c99a9cdd47c91ec3c011f06ce96 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Wed, 10 Dec 2025 21:13:09 +0100 Subject: [PATCH 1/3] add top configure script for simpler usage, and compatibility with autotools generic script --- configure | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100755 configure diff --git a/configure b/configure new file mode 100755 index 0000000000..c8feeacdf7 --- /dev/null +++ b/configure @@ -0,0 +1,133 @@ +#!/bin/bash +#/* +# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more +# * contributor license agreements. See the NOTICE file distributed with +# * this work for additional information regarding copyright ownership. +# * The OpenAirInterface Software Alliance licenses this file to You under +# * the OAI Public License, Version 1.1 (the "License"); you may not use this file +# * except in compliance with the License. +# * You may obtain a copy of the License at +# * +# * http://www.openairinterface.org/?page_id=698 +# * +# * Unless required by applicable law or agreed to in writing, software +# * distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +# *------------------------------------------------------------------------------- +# * For more information about the OpenAirInterface (OAI) Software Alliance: +# * contact@openairinterface.org +# */ +#set -xv +function print_help() { + echo " +By default, it creates a build directory and creates building files in this directory +The external packages needs to be installed before +See doc/BUILD.md for more details +The simplest starting point is to: +install asn1c from source (in doc/BUILD.md: you can also just install asn1c like this ...) +Then, running ./configure will fail on the packages missing in your Linux, you can install by trial/error + +Possible options are all cmake available options, and OpenAirInterface specific options + *** input/output directory + --build-dir + The building directory (instead of 'current directory'/build) + The input file is the current directory file CMakeLists.txt + + *** Binary generation options *** + -GNinja or -G\"Unix Makefiles\" + cmake method to use Ninja or other build tools (default to standard make) + -DCMAKE_C_COMPILER=gcc-4.2 -DCMAKE_CXX_COMPILER=g++-4.2 + choose compiler + -DCMAKE_BUILD_TYPE=Release|RelWithDebInfo|MinSizeRel|Debug + predefined cmake options to the compiles (Debug adds -O0 for example) + -DAVX512=OFF + block AVX512 instructions generation (AVX2 is mandatory in OAI) + -DSANITIZE_ADDRESS=True -DSANITIZE_UNDEFINED=True -DSANITIZE_THREAD=True + gcc/clang sanitizers + + *** memory dimensioning + -DUE_EXPANSION=True + Change the maximum managed UEs in one Cell for 4G and 5G nodeB for 40 to 256 + -DNB_ANTENNAS_RX=xxx + limit the number of managable RX antennas at runtime + -DNB_ANTENNAS_TX=xxx + limit the number of managable TX antennas at runtime + + + *** Features generation options *** + -DOAI_xxx=ON + Enable specific RF boards or simulation + xxx can be: USRP BLADERF LMSSDR IRIS SIMU AW2SORI AERIAL ETHERNET FHI72 FHI72_MPLANE + WLS (WLS for nfapi instead of regular sockets interface) + -DENABLE_xxx=ON + enable specific add-on + xxx can be + TELNETSRV + ENBSCOPE UESCOPE NRSCOPE IMSCOPE IMSCOPE_RECORD + OAI_IQPLAYER + WEBSRV + LDPC_CUDA LPDC_AAL LDPC_XDMA + -DE2_AGENT=ON + Enable the E2 Agent + + *** Tracing options ** + -DENABLE_LTTNG=ON + use lttng as trace output + -DT_TRACER=ON + Enable T tracer tool instead of regular trace output + -DT_TRACER_GUI + Adds a GUI to T tracer + -DUE_DEBUG_TRACE=ON + Adds more traces in UE + -DENABLE_VCD_FIFO=ON + enable VCD trace tool (deprecated) + -DTRACE_ASN1C_ENC_DEC=ON + Enable asn1c internal traces via OAI logging system (huge trace) + -DTRACY_ENABLE=ON + Enable tracy code profiler instrumentation + + *** testing options *** + -DENABLE_PHYSIM_TESTS=ON + create test scripts to run a set of physical layer auto-tests + more details in doc/physical-simulators.md + if you run "ctest" after compilation, a set of prepared executions will run + -DENABLE_TESTS + create unitary test scripts based on ctest googletest + more details in docs/UnitTests.md + if you run "ctest" after compilation, a set of prepared executions will run + + *** documentation generation + -DGENERATE_DOXYGEN=ON + generate doxygen documentation + +--build-lib + Build optional shared library, can be one or several of $OPTIONAL_LIBRARIES or \"all\" +-h | --help + Print this help" +} + +args=() +BUILD_DIR=build +until [ -z "$1" ] +do + case "$1" in + -d | --build-dir) + BUILD_DIR=$2 + shift 2;; + -h | --help) + print_help + exit 1;; + *) + args+=("$1") + shift;; + esac +done + +cur_dir=$PWD +mkdir -p "$BUILD_DIR" || exit +pushd "$BUILD_DIR" || exit +cmake -DT_TRACER=OFF "${args[@]}" "$cur_dir" +echo "You can now go in this directory and run compilation (example: make -j$(nproc))" + From 3564f07434b80cab4623006b156ab750e44e3dac Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 29 Dec 2025 10:31:40 +0100 Subject: [PATCH 2/3] Error in unitary tests without T tracer --- openair2/RRC/NR/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/RRC/NR/tests/CMakeLists.txt b/openair2/RRC/NR/tests/CMakeLists.txt index 01d0f21c95..50b996c9a2 100644 --- a/openair2/RRC/NR/tests/CMakeLists.txt +++ b/openair2/RRC/NR/tests/CMakeLists.txt @@ -4,7 +4,7 @@ add_executable(rrc_bearers_test rrc_bearers_test.c ../rrc_gNB_radio_bearers.c ${ add_dependencies(tests rrc_bearers_test) add_test(NAME rrc_bearers_test COMMAND rrc_bearers_test) target_include_directories(rrc_bearers_test PRIVATE ./common/utils/ds common/utils/LOG) -target_link_libraries(rrc_bearers_test PRIVATE ds alg asn1_e1ap asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs LOG T) +target_link_libraries(rrc_bearers_test PRIVATE ds alg asn1_e1ap asn1_lte_rrc_hdrs asn1_nr_rrc_hdrs LOG ${T_LIB}) target_compile_definitions(rrc_bearers_test PRIVATE ENABLE_TESTS) add_executable(rrc_cell_management_test rrc_cell_management_test.c) From 890d0bb48641accd9dbff64f3e59eb33b14d2428 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 16 Mar 2026 10:17:25 +0100 Subject: [PATCH 3/3] add Makefile generation for ./configure ; make --- configure | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure b/configure index c8feeacdf7..ba016e0526 100755 --- a/configure +++ b/configure @@ -129,5 +129,12 @@ cur_dir=$PWD mkdir -p "$BUILD_DIR" || exit pushd "$BUILD_DIR" || exit cmake -DT_TRACER=OFF "${args[@]}" "$cur_dir" -echo "You can now go in this directory and run compilation (example: make -j$(nproc))" +if [ -f build.ninja ] ; then + cmd=ninja +else + cmd="make -j$(nproc)" +fi +popd +echo "all:" > Makefile +echo -e "\\tcd $BUILD_DIR; $cmd" >> Makefile