Gtp5g build failed

While doing

git clone https://github.com/PrinzOwO/gtp5g.git

cd gtp5g

make

sudo make install

Getting below error

open5gcore@open5gcore-VirtualBox:~/gtp5g$ make

make -C /usr/src/linux-headers-5.3.0-53-generic/ M=/home/open5gcore/gtp5g modules

make[1]: Entering directory ‘/usr/src/linux-headers-5.3.0-53-generic’

CC [M] /home/open5gcore/gtp5g/gtp5g.o

/home/open5gcore/gtp5g/gtp5g.c: In function ‘ip4_find_route’:

/home/open5gcore/gtp5g/gtp5g.c:770:2: error: too few arguments to function ‘rt->dst.ops->update_pmtu’

rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu);

^~

scripts/Makefile.build:288: recipe for target ‘/home/open5gcore/gtp5g/gtp5g.o’ failed

make[2]: *** [/home/open5gcore/gtp5g/gtp5g.o] Error 1

Makefile:1656: recipe for target ‘module/home/open5gcore/gtp5g’ failed

make[1]: *** [module/home/open5gcore/gtp5g] Error 2

make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-53-generic’

Makefile:10: recipe for target ‘all’ failed

make: *** [all] Error 2

open5gcore@open5gcore-VirtualBox:~/gtp5g$

To install another kernel version in Ubuntu:

  1. Check your previous kernel version: uname -r
  2. Check specific kernel version and install
    sudo apt search 'linux-image-5*'
    sudo apt install 'linux-image-5.0.0-23-generic'
    
  3. Update initramfs and grub then reboot
    sudo update-initramfs -u -k all
    sudo update-grub
    sudo reboot
    uname -r # check version again
    
  4. Install kernel header file
    sudo apt install linux-headers-$(uname -r)
    

In addition, for downgrading kernel version, after running sudo update-initramfs -u -k all, set the default kernel version for GRUB before reboot. See How to downgrade kernel after bad update (16.04).

Thanks a Lot It worked !!

1 Like

thanks. It worked. Now we just ran Option A and ran the test scripts and now getting below error:
INFO[2020-06-02T15:07:24+05:30]/home/open5gcore/go/src/github.com/sirupsen/logrus/entry.go:314 github_com_sirupsen_logrus.Entry.Logf() amfconfig Info: Version[1.0.0] Description[AMF initial local configuration] AMF=Util
INFO[2020-06-02T15:07:24+05:30]/home/open5gcore/go/src/github.com/sirupsen/logrus/entry.go:314 github_com_sirupsen_logrus.Entry.Logf() Listen on 127.0.0.1:38412 NGAP=NGAP
AMF register to NRF Error[Put http://localhost:29510/nnrf-nfm/v1/nf-instances/6e45dfea-b89f-4bb2-9c89-e4cb7591de24: dial tcp 127.0.0.1:29510: connect: connection refused]
AMF register to NRF Error[Put http://localhost:29510/nnrf-nfm/v1/nf-instances/6e45dfea-b89f-4bb2-9c89-e4cb7591de24: dial tcp 127.0.0.1:29510: connect: connection refused]
AMF register to NRF Error[Put http://localhost:29510/nnrf-nfm/v1/nf-instances/6e45dfea-b89f-4bb2-9c89-e4cb7591de24: dial tcp 127.0.0.1:29510: connect: connection refused]
AMF register to NRF Error[Put http://localhost:29510/nnrf-nfm/v1/nf-instances/6e45dfea-b89f-4bb2-9c89-e4cb7591de24: dial tcp 127.0.0.1:29510: connect: connection refused]

We are using a VM in an Oracle Virtual Box with Ubuntu 16.0.4

Your kernel version is 5.3.0-53.
The current gtp5g module is needed to be compiled with kernel version 5.0.0-23-generic as described in readme.

Hello chi,
I am also facing the same error.
How to Install a specific kernel version presently using 5.3.0-53-generic and how to remove the old version also…

can you please help

That’s quite right,
thanks@chi,

In the notice in gtp5g

Due to the evolution of Linux kernel , the current module does not support any version. But it can support 5.0.0-23-generic version .


For more details in kernel changes , please refer to free5gc wiki below.
1 Like

hi @shwetasachdeva ,

You can create another QA of the NRF issue.
Also provide what script are you running.