Build according to instructions failed

Hi,

not much of a programmer but can speak fluently 3GPP TS’ish. I tried to setup it up on a clean ubuntu according to | free5GC When I run the AMF it gives and error about the NGAP (probably because there is no corresponding gNB). When i then tried to install the UPF, the make -j nproc gave many errors regarding to N4 and PFCP support (not SBI core network interface, so this is the protocol that replaces the S1_C from 4G). The look like this:

/home/myname/go/src/free5gc/src/upf/src/n4/n4_pfcp_handler.c:488:52: error: taking address of packed member of ‘struct _PfcpOuterHdr’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
488 | 0, &(outerHdr->addr4),
| ^~~~~~~~~~~~~~~~~~
Any help appreciated, and best on “for dummies level”, but feel free to ask me about how a mobile network works…

here the final “verdict” of the make:
make[2]: *** [src/CMakeFiles/free5GC_UPF_main.dir/build.make:89: src/CMakeFiles/free5GC_UPF_main.dir/n4/n4_pfcp_handler.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:168: src/CMakeFiles/free5GC_UPF_main.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

I found that you followed up the stage 2 of free5GC. And I guess that you run that on a Ubuntu newer than 18.04 (since it’s 2021 now)?
Usually it’s your best bet to run exactly the same version as recommend.
And maybe you can also try stage 3 with Ubuntu 20.04.

Hi John, thanks for the help and anser. I used Ubuntu 20.04 and started clean. I would need stage 2 for my task. But as said, I think the problem lies in the build of the N4 interface modules and the lower protocols there.

It seems that all versions mentioned, need to be exactly like that. Including, the Ubuntu 18.04 kernel, the kernel needs to be 5.0.0-23-generic. Not 5.4 whatever.