Closed crisdeleon closed 8 years ago
This should have been fixed in commit ce15a9667c4108e41a3f76c642153b490660b6d2.
Graybox Kernel module compiles correctly.
However Graybox Userspace application doesn't (this happens with Ubuntu kernels 3.10
throughout 4.4.1
). It does create a bunch of *.o
files, but not the graybox
executable needed to run the tests.
Here's the stacktrace; note that if you try to run make
again, the stacktrace will be a lot shorter (since it is not trying to create all the *.o
files). However if you run make clean
then make
again, it will show the full stacktrace.
jool@jool:~/git/Jool/test/graybox/usr$ make
gcc -Wall -g -I/usr/include/libnl3 -I../include -c -o device.o device.c
device.c:8:39: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_add_response(struct nl_core_buffer *buffer, void *arg)
^
device.c:8:39: warning: its scope is only this definition or declaration, which is probably not what you want
device.c: In function ‘dev_add’:
device.c:30:4: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
handle_add_response, NULL);
^
In file included from device.c:3:0:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
device.c: At top level:
device.c:33:42: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_remove_response(struct nl_core_buffer *buffer, void *arg)
^
device.c: In function ‘dev_remove’:
device.c:55:4: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
handle_remove_response, NULL);
^
In file included from device.c:3:0:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
device.c: At top level:
device.c:58:43: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_display_response(struct nl_core_buffer *buffer, void *arg)
^
device.c: In function ‘dev_display’:
device.c:71:48: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
return netlink_request(&request, request.len, handle_display_response, NULL);
^
In file included from device.c:3:0:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
device.c: At top level:
device.c:74:41: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_flush_response(struct nl_core_buffer *buffer, void *arg)
^
device.c: In function ‘dev_flush’:
device.c:87:48: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
return netlink_request(&request, request.len, handle_flush_response, NULL);
^
In file included from device.c:3:0:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
gcc -Wall -g -I/usr/include/libnl3 -I../include -c -o communication.o communication.c
communication.c:9:44: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_send_pkt_response(struct nl_core_buffer *buffer, void *arg)
^
communication.c:9:44: warning: its scope is only this definition or declaration, which is probably not what you want
communication.c: In function ‘send_packet’:
communication.c:38:4: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
handle_send_pkt_response, NULL);
^
In file included from communication.h:5:0,
from communication.c:1:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
communication.c: At top level:
communication.c:42:44: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_flush_op_response(struct nl_core_buffer *buffer, void *arg)
^
communication.c: In function ‘send_flush_op’:
communication.c:58:43: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
return netlink_request(request, HDR_LEN, handle_flush_op_response, NULL);
^
In file included from communication.h:5:0,
from communication.c:1:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
communication.c: At top level:
communication.c:61:42: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_update_response(struct nl_core_buffer *buffer, void *arg)
^
communication.c: In function ‘global_update’:
communication.c:82:46: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
return netlink_request(hdr, HDR_LEN + size, handle_update_response, NULL);
^
In file included from communication.h:5:0,
from communication.c:1:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
communication.c: At top level:
communication.c:85:43: warning: ‘struct nl_core_buffer’ declared inside parameter list
static int handle_display_response(struct nl_core_buffer *buffer, void *arg)
^
communication.c: In function ‘general_display_array’:
communication.c:99:48: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
return netlink_request(&request, request.len, handle_display_response, NULL);
^
In file included from communication.h:5:0,
from communication.c:1:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
communication.c: In function ‘receiver_display’:
communication.c:110:48: warning: passing argument 3 of ‘netlink_request’ from incompatible pointer type
return netlink_request(&request, request.len, handle_display_response, NULL);
^
In file included from communication.h:5:0,
from communication.c:1:
netlink.h:14:5: note: expected ‘int (*)(struct nl_msg *, void *)’ but argument is of type ‘int (*)(struct nl_core_buffer *, void *)’
int netlink_request(void *request, __u16 request_len,
^
gcc -Wall -g -I/usr/include/libnl3 -I../include -c -o graybox.o graybox.c
gcc -Wall -g -I/usr/include/libnl3 -I../include -c -o netlink.o netlink.c
In file included from netlink.c:3:0:
netlink.c: In function ‘error_handler’:
netlink.c:7:54: error: invalid type argument of ‘->’ (have ‘struct nlmsghdr’)
log_err("this is the message length: %d", nlerr->msg->nlmsg_len) ;
^
../include/types.h:23:57: note: in definition of macro ‘log_error’
#define log_error(func, text, ...) printf(text "\n", ##__VA_ARGS__)
^
netlink.c:7:2: note: in expansion of macro ‘log_err’
log_err("this is the message length: %d", nlerr->msg->nlmsg_len) ;
^
make: *** [netlink.o] Error 1
Ok so it's been a while since this issue has been addressed.
I've successfully compiled both graybox
kernel module and userspace application with kernels 3.10, 3.13, 4.3, 4.4, and more importantly I've also tested graybox works with 4.5.
The graybox tests also run properly. I'm not sure exactly which commit fixed this, but it has been fixed.
I'm adding the Tested (needs release)
tag.
Thanks!
The tests were refactored in the 3.5 branch; switching milestone.
The graybox module is not compiling on kernel 4.4.0, even when using this codebase.
Stacktrace: