### :school: TEEP 2024_RT LAB_ORAN DPDK #### :book: FlexRIC Install and Test RIC E2AP(example file) :::success List the essential information of this chapter. 1. FlexRIC Installation 2. Test RIC E2AP(RIC example file) ::: --- ## 1. FlexRIC Installation ### 1.1 Architecture #### 1.1.1 FlexRIC If you want to check your system information, you can use this command ```= lsb_release -a #displays the release information of the currently running Linux distribution lscpu #information about the CPU sudo dmidecode -t memory | grep -i size #information about the memory modules installed in the system sudo lshw -short -C disk #information about disk ``` **Hardware** | Items | Content | | -------- | -------- | | OS | ubuntu 22.04 LTS | | IP | 10.99.1.221 | **Software** | Items | Version | | -------- | -------- | | FlexRIC | v1.0.0| ### 1.2 Build FlexRIC #### 1.2.1 Prerequisite * A recent CMake (at least v3.15). CMake is a software used to automate the process of compiling and configuring software. It is a frequently used tool in software development to easily manage the cross-platform development process. * SWIG (at least v.4.0). SWIG as an interface generator to enable the multi-language feature (i.e., C/C++ and Python) for the xApps. Please, check your SWIG version (i.e, swig -version) and install it from scratch if necessary as described here: https://swig.org/svn.html or via the code below: **Install Cmake** Please refer in this link for the installation, [Click here](https://apt.kitware.com/) **Install automake** ```= sudo apt-get install autotools-dev sudo apt-get install automake ``` **Install bison for swig make** ```= sudo apt-get install bison -y sudo apt-get install byacc -y ``` ![image](https://hackmd.io/_uploads/S1IXjLa6T.png) **Install swig** Please, check your SWIG version (i.e, swig -version) and install it from scratch if necessary as described here: https://swig.org/svn.html or via the code below: ``` git clone https://github.com/swig/swig.git cd swig ./autogen.sh ./configure --prefix=/usr/ make sudo make install ``` ![image](https://hackmd.io/_uploads/Sk_2y82Tp.png) :::danger Error: ![image](https://hackmd.io/_uploads/Hy8r0B2TT.png) Troubleshooot: ```= sudo apt-get install libpcre2-dev ``` ![image](https://hackmd.io/_uploads/BkU20Bnaa.png) ::: **Install asn1c compiler** ```= sudo apt-get -y install asn1c ``` **Install swig** ```= sudo apt-get install swig ``` #### 1.2.2 Download the required dependencies Install required dependencies ``` sudo apt install libsctp-dev python3.8 cmake-curses-gui libpcre2-dev python-dev-is-python3 ``` #### 1.2.3 Clone the FlexRIC project, build and install it **Download the code** ``` git clone https://gitlab.eurecom.fr/mosaic5g/flexric.git git checkout <here put the release tag> # i.e. git checkout v1.0.0 #i use v1.0.0 ``` You can use git tag to choose get version ``` git tag ``` ![image](https://hackmd.io/_uploads/H1FO492Tp.png) ![image](https://hackmd.io/_uploads/rJK9AFha6.png) ![image](https://hackmd.io/_uploads/rkvjx9nT6.png) **Build FlexRIC** :::danger Error When Build: ![image](https://hackmd.io/_uploads/HkLVQq3Tp.png) Try Troubleshoot: ``` which swig # find path cmake -DCMAKE_MODULE_PATH=/usr/local/share/cmake-3.28/Modules -DSWIG_EXECUTABLE=/usr/bin/swig ``` ![image](https://hackmd.io/_uploads/SJguhyA6Tp.png) I try build again, but it still error I try to change E2AP and KPM version with: ``` cd flexric && mkdir build && cd build && cmake .. -DE2AP_VERSION=v3.01 -DKPM_VERSION=v3.00 && make -j8 ``` and still error ![image](https://hackmd.io/_uploads/HyiQgCpap.png) ::: :::success Solution: by default Ubuntu 22.04.1 uses gcc-11, the used FlexRIC version can be built only with gcc-10. One possible way to switch gcc version is to use update-alternatives tool or you can downgrade/install the gcc-10 version. ::: success build ![image](https://hackmd.io/_uploads/B1UzJ4VAp.png) sudo make install ![image](https://hackmd.io/_uploads/SkGwk4V0a.png) **CTEST** Check that everything went fine running the tests: ``` ctest ``` ![ctest build flexric](https://hackmd.io/_uploads/ByR6SoLJ0.png) --- ### 1.3 Test RIC E2AP(RIC example file) Execute RIC file ```= cd flexric ./build/examples/ric/nearRT-RIC ``` Execute E2AP agent from flexric ```= cd flexric ./build/examples/emulator/agent/emu_agent_gnb_cu ``` Log from RIC ![image](https://hackmd.io/_uploads/rk2jbVN0a.png) Log from E2AP agent from flexric ![image](https://hackmd.io/_uploads/rkuA-4NAT.png)