free5gc / free5gc-stage-3

Open source 5G core network base on 3GPP R15
https://free5gc.org
Apache License 2.0
34 stars 24 forks source link

Build failure seen in upf while building libgtp5gnl #3

Open sudhir-intc opened 4 years ago

sudhir-intc commented 4 years ago

I have tried to build the upf on the cascade lake server machine with Ubuntu 18.04.4 LTS and 5.0.0-23-generic kernel. I get the below error, looks in the build configuration there's some include missing to the kernel modules.

Making all in src CC genl.lo CC gtp5g-genl-pdr.lo CC gtp5g-genl-far.lo CC gtp5g-rtnl.lo CC gtp5g.lo gtp5g.c:71:14: warning: data definition has no type or storage class EXPORT_SYMBOL(gtp5g_dev_alloc); ^ gtp5g.c:71:15: warning: type defaults to ‘int’ in declaration of ‘gtp5g_dev_alloc’ [-Wimplicit-int] EXPORT_SYMBOL(gtp5g_dev_alloc); ^~~~~~~ gtp5g.c:71:15: error: ‘gtp5g_dev_alloc’ redeclared as different kind of symbol gtp5g.c:60:19: note: previous definition of ‘gtp5g_dev_alloc’ was here struct gtp5g_dev *gtp5g_dev_alloc(void) ^~~~~~~ gtp5g.c:48:14: warning: data definition has no type or storage class EXPORT_SYMBOL(GTP5G_STRUCT_FUNC_NAME(__func_name)) ^ gtp5g.c:73:1: note: in expansion of macro ‘gtp5g_struct_alloc_exp’ gtp5g_struct_alloc_exp(pdr, struct gtp5g_pdr); ^~~~~~ gtp5g.c:38:35: warning: type defaults to ‘int’ in declaration of ‘gtp5g_pdr_alloc’ [-Wimplicit-int]

define GTP5G_STRUCT_FUNCNAME(x) gtp5g ##x## _alloc

Attaching the generated build folder content

build.zip

sudhir-intc commented 4 years ago

I tried this build on a VM based on i7 too. Here the cpu configuration of the VM

Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 8 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 26 Model name: Intel Core i7 9xx (Nehalem Core i7, IBRS update) Stepping: 3 CPU MHz: 2294.608 BogoMIPS: 4589.21 Hypervisor vendor: KVM Virtualization type: full L1d cache: 32K L1i cache: 32K L2 cache: 4096K NUMA node0 CPU(s): 0-7

sudhir-intc commented 4 years ago

Many thanks for the quick fix. This has resolved the build issue for me.