OpenAirInterface is a famous open source LTE/NR implementation. Its buidling guide doc BUILD.md says that it can be build with below commands:
source oaienv
cd cmake_targets/
./build_oai -I -w USRP --eNB --UE --nrUE --gNB
However if just doing in this way, below error will be reported:
......
Compiling lte-softmodem...
Log file for compilation is being written to: /home/ath/workspace/oai/openairinterface5g/cmake_targets/log/lte-softmodem.txt
ERROR: 3 error. See /home/ath/workspace/oai/openairinterface5g/cmake_targets/log/lte-softmodem.txt
......
In the log file, the detail error report is
[ 0%] Generating ../../../common/utils/T/T_IDs.h
make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
[ 0%] Building C object CMakeFiles/CONFIG_LIB.dir/common/config/config_load_configmodule.c.o
[ 0%] Building C object CMakeFiles/CONFIG_LIB.dir/common/config/config_userapi.c.o
make[4]: gcc: Permission denied
make[4]: *** [Makefile:13: genids.o] Error 127
make[3]: *** [CMakeFiles/generate_T.dir/build.make:75: ../../../common/utils/T/T_IDs.h] Error 2
make[2]: *** [CMakeFiles/Makefile2:2972: CMakeFiles/generate_T.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 0%] Building C object CMakeFiles/CONFIG_LIB.dir/common/config/config_cmdline.c.o
In file included from $openairinterface5g/common/config/config_load_configmodule.h:42,
from $openairinterface5g/common/config/config_load_configmodule.c:42:
$openairinterface5g/common/utils/T/T.h:15:10: fatal error: T_IDs.h: No such file or directory
15 | #include "T_IDs.h"
| ^~~~~~~~~
compilation terminated.
So the root cause is T_IDs.h is not generated correctly. Checking the Makefile under $openairinterface5g/common/utils/T and it is found that below script can generate the file correctly:
gcc -Wall -g -c genids.c -o genids.o
gcc -Wall -g -o genids genids.o
./genids T_messages.txt T_IDs.h
After the file is generated, go back to cmake_targets and run build_oai, it can build successfully now.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)