When I run the make command, a bunch of errors appear in the log
Environment:
OS: Ubuntu 18.04 Desktop
Kernel version: 5.0.0-23-generic
GCC version: gcc 7.5.0
Log:
make all-recursive
make[1]: Entering directory '/home/fengyu/radio_simulator/lib/libgtp5gnl'
Making all in src
make[2]: Entering directory '/home/fengyu/radio_simulator/lib/libgtp5gnl/src'
CC genl.lo
genl.c:54:14: warning: data definition has no type or storage class
EXPORT_SYMBOL(genl_nlmsg_build_hdr);
^
genl.c:54:15: warning: type defaults to ‘int’ in declaration of ‘genl_nlmsg_build_hdr’ [-Wimplicit-int]
EXPORT_SYMBOL(genl_nlmsg_build_hdr);
^~~~~~~~
genl.c:54:15: error: ‘genl_nlmsg_build_hdr’ redeclared as different kind of symbol
genl.c:37:1: note: previous definition of ‘genl_nlmsg_build_hdr’ was here
genl_nlmsg_build_hdr(char buf, uint16_t type, uint16_t flags, uint32_t seq,
^~~~~~~~
genl.c:108:14: warning: data definition has no type or storage class
EXPORT_SYMBOL(genl_socket_open);
^
genl.c:108:15: warning: type defaults to ‘int’ in declaration of ‘genl_socket_open’ [-Wimplicit-int]
EXPORT_SYMBOL(genl_socket_open);
^~~~
genl.c:108:15: error: ‘genl_socket_open’ redeclared as different kind of symbol
genl.c:91:20: note: previous definition of ‘genl_socket_open’ was here
struct mnl_socket genl_socket_open(void)
^~~~
genl.c:114:14: warning: data definition has no type or storage class
EXPORT_SYMBOL(genl_socket_close);
^
genl.c:114:15: warning: type defaults to ‘int’ in declaration of ‘genl_socket_close’ [-Wimplicit-int]
EXPORT_SYMBOL(genl_socket_close);
^~~~~
genl.c:114:15: error: ‘genl_socket_close’ redeclared as different kind of symbol
genl.c:110:6: note: previous definition of ‘genl_socket_close’ was here
void genl_socket_close(struct mnl_socket nl)
^~~~~
genl.c:139:14: warning: data definition has no type or storage class
EXPORT_SYMBOL(genl_socket_talk);
^
genl.c:139:15: warning: type defaults to ‘int’ in declaration of ‘genl_socket_talk’ [-Wimplicit-int]
EXPORT_SYMBOL(genl_socket_talk);
^~~~
genl.c:139:15: error: ‘genl_socket_talk’ redeclared as different kind of symbol
genl.c:116:5: note: previous definition of ‘genl_socket_talk’ was here
int genl_socket_talk(struct mnl_socket nl, struct nlmsghdr nlh, uint32_t seq,
^~~~
genl.c: In function ‘genl_lookup_family’:
genl.c:169:8: error: called object ‘genl_socket_talk’ is not a function or function pointer
err = genl_socket_talk(nl, nlh, nlh->nlmsg_seq, genl_ctrl_cb, &genl_id);
^~~~
genl.c:139:15: note: declared here
EXPORT_SYMBOL(genl_socket_talk);
^~~~
genl.c: At top level:
genl.c:175:14: warning: data definition has no type or storage class
EXPORT_SYMBOL(genl_lookup_family);
^
genl.c:175:15: warning: type defaults to ‘int’ in declaration of ‘genl_lookup_family’ [-Wimplicit-int]
EXPORT_SYMBOL(genl_lookup_family);
^~~~~~
genl.c:175:15: error: ‘genl_lookup_family’ redeclared as different kind of symbol
genl.c:162:5: note: previous definition of ‘genl_lookup_family’ was here
int genl_lookup_family(struct mnl_socket nl, const char *family)
^~~~~~
Makefile:454: recipe for target 'genl.lo' failed
make[2]: [genl.lo] Error 1
make[2]: Leaving directory '/home/fengyu/radio_simulator/lib/libgtp5gnl/src'
Makefile:469: recipe for target 'all-recursive' failed
make[1]: [all-recursive] Error 1
make[1]: Leaving directory '/home/fengyu/radio_simulator/lib/libgtp5gnl'
Makefile:377: recipe for target 'all' failed
make: *** [all] Error 2
Description:
When I run the make command, a bunch of errors appear in the log
Environment:
OS: Ubuntu 18.04 Desktop
Kernel version: 5.0.0-23-generic
GCC version: gcc 7.5.0
Log:
make all-recursive make[1]: Entering directory '/home/fengyu/radio_simulator/lib/libgtp5gnl' Making all in src make[2]: Entering directory '/home/fengyu/radio_simulator/lib/libgtp5gnl/src' CC genl.lo genl.c:54:14: warning: data definition has no type or storage class EXPORT_SYMBOL(genl_nlmsg_build_hdr); ^ genl.c:54:15: warning: type defaults to ‘int’ in declaration of ‘genl_nlmsg_build_hdr’ [-Wimplicit-int] EXPORT_SYMBOL(genl_nlmsg_build_hdr); ^
~~~~~~~ genl.c:54:15: error: ‘genl_nlmsg_build_hdr’ redeclared as different kind of symbol genl.c:37:1: note: previous definition of ‘genl_nlmsg_build_hdr’ was here genl_nlmsg_build_hdr(char buf, uint16_t type, uint16_t flags, uint32_t seq, ^~~~~~~~ genl.c:108:14: warning: data definition has no type or storage class EXPORT_SYMBOL(genl_socket_open); ^ genl.c:108:15: warning: type defaults to ‘int’ in declaration of ‘genl_socket_open’ [-Wimplicit-int] EXPORT_SYMBOL(genl_socket_open); ^~~~genl.c:108:15: error: ‘genl_socket_open’ redeclared as different kind of symbol genl.c:91:20: note: previous definition of ‘genl_socket_open’ was here struct mnl_socket genl_socket_open(void) ^~~~genl.c:114:14: warning: data definition has no type or storage class EXPORT_SYMBOL(genl_socket_close); ^ genl.c:114:15: warning: type defaults to ‘int’ in declaration of ‘genl_socket_close’ [-Wimplicit-int] EXPORT_SYMBOL(genl_socket_close); ^~~~~ genl.c:114:15: error: ‘genl_socket_close’ redeclared as different kind of symbol genl.c:110:6: note: previous definition of ‘genl_socket_close’ was here void genl_socket_close(struct mnl_socket nl) ^~~~~ genl.c:139:14: warning: data definition has no type or storage class EXPORT_SYMBOL(genl_socket_talk); ^ genl.c:139:15: warning: type defaults to ‘int’ in declaration of ‘genl_socket_talk’ [-Wimplicit-int] EXPORT_SYMBOL(genl_socket_talk); ^~~~genl.c:139:15: error: ‘genl_socket_talk’ redeclared as different kind of symbol genl.c:116:5: note: previous definition of ‘genl_socket_talk’ was here int genl_socket_talk(struct mnl_socket nl, struct nlmsghdr nlh, uint32_t seq, ^~~~genl.c: In function ‘genl_lookup_family’: genl.c:169:8: error: called object ‘genl_socket_talk’ is not a function or function pointer err = genl_socket_talk(nl, nlh, nlh->nlmsg_seq, genl_ctrl_cb, &genl_id); ^~~~genl.c:139:15: note: declared here EXPORT_SYMBOL(genl_socket_talk); ^~~~genl.c: At top level: genl.c:175:14: warning: data definition has no type or storage class EXPORT_SYMBOL(genl_lookup_family); ^ genl.c:175:15: warning: type defaults to ‘int’ in declaration of ‘genl_lookup_family’ [-Wimplicit-int] EXPORT_SYMBOL(genl_lookup_family); ^~~~~~ genl.c:175:15: error: ‘genl_lookup_family’ redeclared as different kind of symbol genl.c:162:5: note: previous definition of ‘genl_lookup_family’ was here int genl_lookup_family(struct mnl_socket nl, const char *family) ^~~~~~ Makefile:454: recipe for target 'genl.lo' failed make[2]: [genl.lo] Error 1 make[2]: Leaving directory '/home/fengyu/radio_simulator/lib/libgtp5gnl/src' Makefile:469: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '/home/fengyu/radio_simulator/lib/libgtp5gnl' Makefile:377: recipe for target 'all' failed make: *** [all] Error 2