Free5GC Install problem

I’ve been following the install process for Free5GC ‘Stage One: all-in-one’

At the ‘restart uptun interface’ stage I had to change:
sudo systemctl restart networking
to
sudo systemctl restart NetworkManager.service

I’m now at the ‘Git clone and compile’ section trying to run:
make -j nproc
but this gives me errors which I cannot resolve. The console output ifrom this command is posted below along with my OS and bison version info. The error starts at line 167. It looks like an issue with the software rather than a problem with my machine.

Please could you advise on fixing this error?

Please find OS version info below:

mre16utu@cmp-20swlinux:~/free5gc-stage-1$ cat /etc/os-release
NAME=“Ubuntu”
VERSION=“20.04.1 LTS (Focal Fossa)”
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME=“Ubuntu 20.04.1 LTS”
VERSION_ID=“20.04”
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal
mre16utu@cmp-20swlinux:~/free5gc-stage-1$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
mre16utu@cmp-20swlinux:~/free5gc-stage-1$ hostnamectl
mre16utu@cmp-20swlinux:~/free5gc-stage-1$ uname -r
5.4.0-42-generic
mre16utu@cmp-20swlinux:~/free5gc-stage-1$ bison --version
bison (GNU Bison) 3.5.1

Console output:

mre16utu@cmp-20swlinux:~/free5gc-stage-1$ make -j nproc
make all-recursive
make[1]: Entering directory ‘/home/mre16utu/free5gc-stage-1’
Making all in lib
make[2]: Entering directory ‘/home/mre16utu/free5gc-stage-1/lib’
Making all in freeDiameter-1.2.1
make[3]: Entering directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1’
Making all in libfdproto
make[4]: Entering directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdproto’
CC dictionary.lo
CC dictionary_functions.lo
CC dispatch.lo
CC fifo.lo
CC init.lo
CC lists.lo
CC log.lo
CC messages.lo
CC ostr.lo
CC portability.lo
CC rt_data.lo
CC sessions.lo
CC utils.lo
CC version.lo
CCLD libfdproto.la
make[4]: Leaving directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdproto’
Making all in libfdcore
make[4]: Entering directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore’
YACC fdd.tab.c
/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore/fdd.tab.y:46.1-14: warning: POSIX Yacc does not support %error-verbose [-Wyacc]
46 | %error-verbose
| ^~~~~~~~~~~~~~
/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore/fdd.tab.y:46.1-14: warning: deprecated directive: ‘%error-verbose’, use ‘%define parse.error verbose’ [-Wdeprecated]
46 | %error-verbose
| ^~~~~~~~~~~~~~
| %define parse.error verbose
/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore/fdd.tab.y:52.1-12: warning: POSIX Yacc does not support %pure-parser [-Wyacc]
52 | %pure-parser
| ^~~~~~~~~~~~
/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore/fdd.tab.y:52.1-12: warning: deprecated directive: ‘%pure-parser’, use ‘%define api.pure’ [-Wdeprecated]
52 | %pure-parser
| ^~~~~~~~~~~~
| %define api.pure
/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore/fdd.tab.y: warning: fix-its can be applied. Rerun with option ‘–update’. [-Wother]
updating fdd.tab.h
make all-am
make[5]: Entering directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore’
CC apps.lo
CC config.lo
CC core.lo
CC cnxctx.lo
cnxctx.c: In function ‘fd_cnx_cli_connect_tcp’:
cnxctx.c:99:19: warning: ‘%s’ directive output may be truncated writing up to 80 bytes into a region of size between 35 and 45 [-Wformat-truncation=]
99 | #define CC_ID_HDR "{----} "
| ^~~~~~~~~
cnxctx.c:320:44: note: in expansion of macro ‘CC_ID_HDR’
320 | snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “TCP,#%d->%s”, cnx->cc_socket, sa_buf);
| ^~~~~~~~~
cnxctx.c:385:64: note: format string is defined here
385 | snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “SCTP,#%d->%s”, cnx->cc_socket, sa_buf);
| ^~

In file included from /usr/include/stdio.h:867,
from …/include/freeDiameter/libfdproto.h:77,
from …/include/freeDiameter/libfdcore.h:44,
from fdcore-internal.h:42,
from cnxctx.c:36:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 16 and 106 bytes into a destination of size 60
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cnxctx.c: In function ‘fd_cnx_serv_tcp’:
cnxctx.c:99:19: warning: ‘%s’ directive output may be truncated writing up to 45 bytes into a region of size 44 [-Wformat-truncation=]
99 | #define CC_ID_HDR "{----} "
| ^~~~~~~~~
cnxctx.c:144:44: note: in expansion of macro ‘CC_ID_HDR’
144 | snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “TCP srv [%s]:%hu (%d)”, addrbuf, port, cnx->cc_socket);
| ^~~~~~~~~
cnxctx.c:385:64: note: format string is defined here
385 | snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “SCTP,#%d->%s”, cnx->cc_socket, sa_buf);
| ^~

cnxctx.c:99:19: note: directive argument in the range [1, 65535]
99 | #define CC_ID_HDR "{----} "
| ^~~~~~~~~
cnxctx.c:144:44: note: in expansion of macro ‘CC_ID_HDR’
144 | snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “TCP srv [%s]:%hu (%d)”, addrbuf, port, cnx->cc_socket);
| ^~~~~~~~~
In file included from /usr/include/stdio.h:867,
from …/include/freeDiameter/libfdproto.h:77,
from …/include/freeDiameter/libfdcore.h:44,
from fdcore-internal.h:42,
from cnxctx.c:36:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 24 and 83 bytes into a destination of size 60
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cnxctx.c: In function ‘fd_cnx_serv_accept’:
cnxctx.c:99:19: warning: ‘%s’ directive output may be truncated writing up to 45 bytes into a region of size between 39 and 43 [-Wformat-truncation=]
99 | #define CC_ID_HDR "{----} "
| ^~~~~~~~~
cnxctx.c:254:44: note: in expansion of macro ‘CC_ID_HDR’
254 | snprintf(cli->cc_id, sizeof(cli->cc_id), CC_ID_HDR “%s from [%s]:%s (%d<-%d)”,
| ^~~~~~~~~
cnxctx.c:385:64: note: format string is defined here
385 | snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “SCTP,#%d->%s”, cnx->cc_socket, sa_buf);
| ^~

In file included from /usr/include/stdio.h:867,
from …/include/freeDiameter/libfdproto.h:77,
from …/include/freeDiameter/libfdcore.h:44,
from fdcore-internal.h:42,
from cnxctx.c:36:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 27 and 105 bytes into a destination of size 60
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cnxctx.c: In function ‘fd_cnx_cli_connect_sctp’:
cnxctx.c:99:19: warning: ‘%s’ directive output may be truncated writing up to 80 bytes into a region of size between 34 and 44 [-Wformat-truncation=]
99 | #define CC_ID_HDR "{----} "
| ^~~~~~~~~
cnxctx.c:385:44: note: in expansion of macro ‘CC_ID_HDR’
385 | snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “SCTP,#%d->%s”, cnx->cc_socket, sa_buf);
| ^~~~~~~~~
cnxctx.c:385:65: note: format string is defined here
385 | nprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR “SCTP,#%d->%s”, cnx->cc_socket, sa_buf);
| ^~

In file included from /usr/include/stdio.h:867,
from …/include/freeDiameter/libfdproto.h:77,
from …/include/freeDiameter/libfdcore.h:44,
from fdcore-internal.h:42,
from cnxctx.c:36:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 17 and 107 bytes into a destination of size 60
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC endpoints.lo
CC events.lo
CC extensions.lo
CC fifo_stats.lo
CC hooks.lo
CC dict_base_proto.lo
CC messages.lo
CC queues.lo
CC peers.lo
CC p_ce.lo
CC p_cnx.lo
CC p_dw.lo
CC p_dp.lo
CC p_expiry.lo
CC p_out.lo
CC p_psm.lo
CC p_sr.lo
CC routing_dispatch.lo
CC server.lo
CC tcp.lo
CC fdd.tab.lo
LEX lex.fdd.c
updating lex.fdd.c
CC lex.fdd.lo
CC version.lo
CC sctp.lo
sctp.c: In function ‘fd_sctp_recvmeta’:
sctp.c:1262:9: error: ‘SCTP_SEND_FAILED_EVENT’ undeclared (first use in this function); did you mean ‘SCTP_SEND_FAILED’?
1262 | case SCTP_SEND_FAILED_EVENT:
| ^~~~~~~~~~~~~~~~~~~~~~
| SCTP_SEND_FAILED
sctp.c:1262:9: note: each undeclared identifier is reported only once for each function it appears in
sctp.c:1274:9: error: ‘SCTP_NOTIFICATIONS_STOPPED_EVENT’ undeclared (first use in this function)
1274 | case SCTP_NOTIFICATIONS_STOPPED_EVENT:
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[5]: *** [Makefile:530: sctp.lo] Error 1
make[5]: Leaving directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore’
make[4]: *** [Makefile:398: all] Error 2
make[4]: Leaving directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1/libfdcore’
make[3]: *** [Makefile:425: all-recursive] Error 1
make[3]: Leaving directory ‘/home/mre16utu/free5gc-stage-1/lib/freeDiameter-1.2.1’
make[2]: *** [Makefile:380: all-recursive] Error 1
make[2]: Leaving directory ‘/home/mre16utu/free5gc-stage-1/lib’
make[1]: *** [Makefile:640: all-recursive] Error 1
make[1]: Leaving directory ‘/home/mre16utu/free5gc-stage-1’
make: *** [Makefile:454: all] Error 2

you need to use ubuntu 18.04 not 20.04

Please could you direct me to this requirement? Is it not possible to use later versions?

OK, I found the requirements. Do I require the exact listed kernel/gcc/go/qemu or are updated versions of any of those OK?
Thanks

install kernal and kernal header
sudo apt-get install linux-image-5.0.0-23-generic
sudo apt-get install linux-headers-5.0.0-23-generic
sudo apt-get install linux-modules-extra-5.0.0-23-generic

sudo nano /etc/default/grub
change GRUB_TIMEOUT=0 to -1
sudo update-grub

reboot