Linux-Distribution agnosticism... well, Debian at least
OAI currently only supports a whitelist of Linux distributions. Clearly, it is healthy to avoid wasting work into supporting exotic distribs with poor support for the (many) dependencies, and/or exotic package managers.
However, given the "home" distrib is Ubuntu, leaving Debian out is an unexpected pain for many. And, as it turns out, the work needed to support Debian 11 (current stable) is tiny, see below. This issue is here to consider mainstreaming those steps.
Supporting Debian 11
The following works on a 11.6
.
build_oai -I
Prerequisite step, aka - Out of the box, we get
Your distribution debian11 is not supported by oai !
.
This is easily fixed by adding the adequate case. Here I narrowed to debian11
out of caution and to mimick existing practice, though debian*
is more in the spirit of agnosticism.
diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper
index facbb5ea0c..7a4d959e38 100755
--- a/cmake_targets/tools/build_helper
+++ b/cmake_targets/tools/build_helper
@@ -103,6 +103,7 @@ get_distribution_release() {
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
+ "debian11") return 0 ;;
"ubuntu22.04") return 0 ;;
"ubuntu21.04") return 0 ;;
"ubuntu20.04") return 0 ;;
-
then, the script generates several errors, all linked to the warning "
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
" (which should be fatal instead). This can be fixed byapt install pkg-config
. -
last, a series of unmet dependencies prevent execution. These are fixed with
apt install libxml2-dev libxslt-dev libssl-dev libconfig-dev nettle-dev
After this, build_oai -I
succeeds. Time to do the Real Thing.
build_oai
Build itself, aka The build line, as documented in Laurent's tutorial, is:
build_oai -w USRP --ninja --nrUE --gNB --build-lib all -c
-
The first hurdle is supporting
ninja
, which looks like a good idea, as it is way faster thanmake
in this context.apt install ninja-build
does the job. -
Then, a series of missing
.h
's and.so
's stand in the way. They are fixed withapt install libsctp-dev libforms-dev libopenblas-dev libatlas-base-dev liblapacke-dev libreadline-dev
Note: Being ignorant about the details, I did not try to minimize the scope of these dependencies. One could probably trim them a bit with adequate knowledge, and by going into case-specific deps for optional components.