mkschreder / orangerpcd

Websocket RPC server for OpenWRT
Other
27 stars 11 forks source link

error #6

Closed dfaofeng closed 7 years ago

dfaofeng commented 8 years ago

mips-openwrt-linux-uclibc-gcc -DPACKAGE_NAME=\"jucid\" -DPACKAGE_TARNAME=\"jucid\" -DPACKAGE_VERSION=\"0.1.0\" -DPACKAGE_STRING=\"jucid\ 0.1.0\" -DPACKAGE_BUGREPORT=\"mkschreder.uk@gmail.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"jucid\" -DVERSION=\"0.1.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LUA_H=1 -DHAVE_UCI_H=1 -I. -I/home/df2016/15.05/staging_dir/target-mips_34kc_uClibc-0.9.33.2/usr/include -I/home/df2016/15.05/staging_dir/target-mips_34kc_uClibc-0.9.33.2/include -I/home/df2016/15.05/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/usr/include -I/home/df2016/15.05/staging_dir/toolchain-mips_34kc_gcc-4.8-linaro_uClibc-0.9.33.2/include -std=gnu99 -Wall -Werror -Os -pipe -mno-branch-likely -mips32r2 -mtune=34kc -fno-caller-saves -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -MT revorpcd-juci_ws_server.o -MD -MP -MF .deps/revorpcd-juci_ws_server.Tpo -c -o revorpcd-juci_ws_server.otest -f 'juci_ws_server.c' || echo './'`juci_ws_server.c juci_ws_server.c:119:56: error: 'enum lws_callback_reasons' declared inside parameter list [-Werror] static int _ubus_socket_callback(struct lws _wsi, enum lws_callback_reasons reason, void _user, void in, size_t len){ ^ juci_ws_server.c:119:56: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] juci_ws_server.c:119:77: error: parameter 2 ('reason') has incomplete type static int _ubus_socket_callback(struct lws wsi, enum lws_callback_reasons reason, void _user, void in, size_t len){ ^ juci_ws_server.c: In function '_ubus_socket_callback': juci_ws_server.c:121:15: error: implicit declaration of function 'lws_get_protocol' [-Werror=implicit-function-declaration] const struct lws_protocols proto = lws_get_protocol(wsi); ^ juci_ws_server.c:121:38: error: initialization makes pointer from integer without a cast [-Werror] const struct lws_protocols proto = lws_get_protocol(wsi); ^ juci_ws_server.c:129:2: error: implicit declaration of function 'lws_get_socket_fd' [-Werror=implicit-function-declaration] int32_t peer_id = lws_get_socket_fd(wsi); ^ juci_ws_server.c:132:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:138:4: error: implicit declaration of function 'lws_get_peer_addresses' [-Werror=implicit-function-declaration] lws_get_peer_addresses(wsi, peer_id, hostname, sizeof(hostname), ipaddr, sizeof(ipaddr)); ^ juci_ws_server.c:143:4: error: implicit declaration of function 'lws_callback_on_writable' [-Werror=implicit-function-declaration] lws_callback_on_writable(wsi);
^ juci_ws_server.c:151:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:161:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:179:5: error: implicit declaration of function 'lws_write' [-Werror=implicit-function-declaration] int n = lws_write(wsi, &frame->buf[LWS_SEND_BUFFER_PRE_PADDING]+frame->sent_count, len, flags); ^ juci_ws_server.c:198:4: error: implicit declaration of function 'lws_rx_flow_control' [-Werror=implicit-function-declaration] lws_rx_flow_control(wsi, 1); ^ juci_ws_server.c:205:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:213:4: error: implicit declaration of function 'lws_is_final_fragment' [-Werror=implicit-function-declaration] if((!(_user)->buffer_start && lws_is_final_fragment(wsi)) || lws_is_final_fragment(wsi)){ ^ juci_ws_server.c: In function '_websocket_destroy': juci_ws_server.c:286:2: error: implicit declaration of function 'lws_context_destroy' [-Werror=implicit-function-declaration] if(self->ctx) lws_context_destroy(self->ctx); ^ juci_ws_server.c: In function '_websocket_listen': juci_ws_server.c:321:17: error: assignment from incompatible pointer type [-Werror] info.protocols = self->protocols; ^ juci_ws_server.c:323:17: error: 'LWS_SERVER_OPTION_VALIDATE_UTF8' undeclared (first use in this function) info.options = LWS_SERVER_OPTION_VALIDATE_UTF8; ^ juci_ws_server.c:323:17: note: each undeclared identifier is reported only once for each function it appears in juci_ws_server.c:325:2: error: implicit declaration of function 'lws_create_context' [-Werror=implicit-function-declaration] self->ctx = lws_create_context(&info); ^ juci_ws_server.c:325:12: error: assignment makes pointer from integer without a cast [-Werror] self->ctx = lws_create_context(&info); ^ juci_ws_server.c: In function '_websocket_server_thread': juci_ws_server.c:339:3: error: implicit declaration of function 'lws_service' [-Werror=implicit-function-declaration] lws_service(self->ctx, 10); ^ juci_ws_server.c: In function 'juci_ws_server_new': juci_ws_server.c:421:37: error: invalid application of 'sizeof' to incomplete type 'struct lws_protocols' self->protocols = calloc(2, sizeof(struct lws_protocols)); ^ juci_ws_server.c:423:2: error: invalid use of undefined type 'struct lws_protocols' self->protocols[0] = (struct lws_protocols){ ^ juci_ws_server.c:423:17: error: dereferencing pointer to incomplete type self->protocols[0] = (struct lws_protocols){ ^ juci_ws_server.c:424:3: error: unknown field 'name' specified in initializer .name = "", ^ juci_ws_server.c:424:3: error: excess elements in struct initializer [-Werror] juci_ws_server.c:424:3: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:425:3: error: unknown field 'callback' specified in initializer .callback = _ubus_socket_callback, ^ juci_ws_server.c:425:3: error: excess elements in struct initializer [-Werror] juci_ws_server.c:425:3: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:426:3: error: unknown field 'per_session_data_size' specified in initializer .per_session_data_size = sizeof(struct ubus_srv_wsclient), ^ juci_ws_server.c:426:42: error: excess elements in struct initializer [-Werror] .per_session_data_size = sizeof(struct ubus_srv_wsclient), ^ juci_ws_server.c:426:42: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:427:3: error: unknown field 'user' specified in initializer .user = self ^ juci_ws_server.c:428:2: error: excess elements in struct initializer [-Werror] }; ^ juci_ws_server.c:428:2: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:428:2: error: invalid use of undefined type 'struct lws_protocols' cc1: all warnings being treated as errors Makefile:476: recipe for target 'revorpcd-juci_wsserver.o' failed make[5]: ** [revorpcd-juci_ws_server.o] Error 1 make[5]: Leaving directory '/home/df2016/15.05/build_dir/target-mips_34kc_uClibc-0.9.33.2/jucid-78b8753ef2af15ec119d85b1e13350a4cced9a39/src' Makefile:338: recipe for target 'all-recursive' failed make[4]: * [all-recursive] Error 1 make[4]: Leaving directory '/home/df2016/15.05/build_dir/target-mips_34kc_uClibc-0.9.33.2/jucid-78b8753ef2af15ec119d85b1e13350a4cced9a39' Makefile:45: recipe for target '/home/df2016/15.05/build_dir/target-mips_34kc_uClibc-0.9.33.2/jucid-78b8753ef2af15ec119d85b1e13350a4cced9a39/.built' failed make[3]: * [/home/df2016/15.05/build_dir/target-mips_34kc_uClibc-0.9.33.2/jucid-78b8753ef2af15ec119d85b1e13350a4cced9a39/.built] Error 2 make[3]: Leaving directory '/home/df2016/15.05/feeds/juci/jucid' package/Makefile:191: recipe for target 'package/feeds/juci/jucid/compile' failed make[2]: * [package/feeds/juci/jucid/compile] Error 2 make[2]: Leaving directory '/home/df2016/15.05' package/Makefile:188: recipe for target '/home/df2016/15.05/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile' failed make[1]: * [/home/df2016/15.05/staging_dir/target-mips_34kc_uClibc-0.9.33.2/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/df2016/15.05' /home/df2016/15.05/include/toplevel.mk:181: recipe for target 'world' failed make: *\ [world] Error 2 df2016@Df2016-pc:~/15.05$

mkschreder commented 8 years ago

(or old version) On 13 Jul 2016 13:23, "蒋" notifications@github.com wrote:

juci_ws_server.c:119:56: error: 'enum lws_callback_reasons' declared inside parameter list [-Werror] static int _ubus_socket_callback(struct lws

_wsi, enum lws_callback_reasons reason, void _user, void in, size_t len){ ^ juci_ws_server.c:119:56: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] juci_ws_server.c:119:77: error: parameter 2 ('reason') has incomplete type static int _ubus_socket_callback(struct lws wsi, enum lws_callback_reasons reason, void _user, void in, size_t len){ ^ juci_ws_server.c: In function '_ubus_socket_callback': juci_ws_server.c:121:15: error: implicit declaration of function 'lws_get_protocol' [-Werror=implicit-function-declaration] const struct lws_protocols proto = lws_get_protocol(wsi); ^ juci_ws_server.c:121:38: error: initialization makes pointer from integer without a cast [-Werror] const struct lws_protocols proto = lws_get_protocol(wsi); ^ juci_ws_server.c:129:2: error: implicit declaration of function 'lws_get_socket_fd' [-Werror=implicit-function-declaration] int32_t peer_id = lws_get_socket_fd(wsi); ^ juci_ws_server.c:132:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws self = (struct ubus_srvws)proto->user;

^ juci_ws_server.c:138:4: error: implicit declaration of function 'lws_get_peer_addresses' [-Werror=implicit-function-declaration] lws_get_peer_addresses(wsi, peer_id, hostname, sizeof(hostname), ipaddr, sizeof(ipaddr)); ^ juci_ws_server.c:143:4: error: implicit declaration of function 'lws_callback_on_writable' [-Werror=implicit-function-declaration] lws_callback_on_writable(wsi);

^ juci_ws_server.c:151:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:161:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:179:5: error: implicit declaration of function 'lws_write' [-Werror=implicit-function-declaration] int n = lws_write(wsi, &frame->buf[LWS_SEND_BUFFER_PRE_PADDING]+frame->sent_count, len, flags); ^ juci_ws_server.c:198:4: error: implicit declaration of function 'lws_rx_flow_control' [-Werror=implicit-function-declaration] lws_rx_flow_control(wsi, 1); ^ juci_ws_server.c:205:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:213:4: error: implicit declaration of function 'lws_is_final_fragment' [-Werror=implicit-function-declaration] if((!(

_user)->buffer_start && lws_is_final_fragment(wsi)) || lws_is_final_fragment(wsi)){ ^ juci_ws_server.c: In function '_websocket_destroy': juci_ws_server.c:286:2: error: implicit declaration of function 'lws_context_destroy' [-Werror=implicit-function-declaration] if(self->ctx) lws_context_destroy(self->ctx); ^ juci_ws_server.c: In function '_websocket_listen': juci_ws_server.c:321:17: error: assignment from incompatible pointer type [-Werror] info.protocols = self->protocols; ^ juci_ws_server.c:323:17: error: 'LWS_SERVER_OPTION_VALIDATE_UTF8' undeclared (first use in this function) info.options = LWS_SERVER_OPTION_VALIDATE_UTF8; ^ juci_ws_server.c:323:17: note: each undeclared identifier is reported only once for each function it appears in juci_ws_server.c:325:2: error: implicit declaration of function 'lws_create_context' [-Werror=implicit-function-declaration] self->ctx = lws_create_context(&info); ^ juci_ws_server.c:325:12: error: assignment makes pointer from integer without a cast [-Werror] self->ctx = lws_create_context(&info); ^ juci_ws_server.c: In function '_websocket_server_thread': juci_ws_server.c:339:3: error: implicit declaration of function 'lws_service' [-Werror=implicit-function-declaration] lws_service(self->ctx, 10); ^ juci_ws_server.c: In function 'juci_ws_server_new': juci_ws_server.c:421:37: error: invalid application of 'sizeof' to incomplete type 'struct lws_protocols' self->protocols = calloc(2, sizeof(struct lws_protocols)); ^ juci_ws_server.c:423:2: error: invalid use of undefined type 'struct lws_protocols' self->protocols[0] = (struct lws_protocols){ ^ juci_ws_server.c:423:17: error: dereferencing pointer to incomplete type self->protocols[0] = (struct lws_protocols){ ^ juci_ws_server.c:424:3: error: unknown field 'name' specified in initializer .name = "", ^ juci_ws_server.c:424:3: error: excess elements in struct initializer [-Werror] juci_ws_server.c:424:3: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:425:3: error: unknown field 'callback' specified in initializer .callback = _ubus_socket_callback, ^ juci_ws_server.c:425:3: error: excess elements in struct initializer [-Werror] juci_ws_server.c:425:3: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:426:3: error: unknown field 'per_session_data_size' specified in initializer .per_session_data_size = sizeof(struct ubus_srv_wsclient), ^ juci_ws_server.c:426:42: error: excess elements in struct initializer [-Werror] .per_session_data_size = sizeof(struct ubus_srv_ws_client

_), ^ juci_ws_server.c:426:42: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:427:3: error: unknown field 'user' specified in initializer .user = self ^ juci_ws_server.c:428:2: error: excess elements in struct initializer [-Werror] }; ^ juci_ws_server.c:428:2: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:428:2: error: invalid use of undefined type 'struct lws_protocols' cc1: all warnings being treated as errors Makefile:476: recipe for target 'revorpcd-juci_wsserver.o' failed make[5]: ** [revorpcd-juci_ws_server.o] Error

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mkschreder/jucid/issues/6, or mute the thread https://github.com/notifications/unsubscribe/AERqiYSRQtIYDUtDdNXSlyW9tJWscrn6ks5qVMq8gaJpZM4JLUVm .

mkschreder commented 8 years ago

no libwebsockets. On 13 Jul 2016 13:23, "蒋" notifications@github.com wrote:

juci_ws_server.c:119:56: error: 'enum lws_callback_reasons' declared inside parameter list [-Werror] static int _ubus_socket_callback(struct lws

_wsi, enum lws_callback_reasons reason, void _user, void in, size_t len){ ^ juci_ws_server.c:119:56: error: its scope is only this definition or declaration, which is probably not what you want [-Werror] juci_ws_server.c:119:77: error: parameter 2 ('reason') has incomplete type static int _ubus_socket_callback(struct lws wsi, enum lws_callback_reasons reason, void _user, void in, size_t len){ ^ juci_ws_server.c: In function '_ubus_socket_callback': juci_ws_server.c:121:15: error: implicit declaration of function 'lws_get_protocol' [-Werror=implicit-function-declaration] const struct lws_protocols proto = lws_get_protocol(wsi); ^ juci_ws_server.c:121:38: error: initialization makes pointer from integer without a cast [-Werror] const struct lws_protocols proto = lws_get_protocol(wsi); ^ juci_ws_server.c:129:2: error: implicit declaration of function 'lws_get_socket_fd' [-Werror=implicit-function-declaration] int32_t peer_id = lws_get_socket_fd(wsi); ^ juci_ws_server.c:132:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws self = (struct ubus_srvws)proto->user;

^ juci_ws_server.c:138:4: error: implicit declaration of function 'lws_get_peer_addresses' [-Werror=implicit-function-declaration] lws_get_peer_addresses(wsi, peer_id, hostname, sizeof(hostname), ipaddr, sizeof(ipaddr)); ^ juci_ws_server.c:143:4: error: implicit declaration of function 'lws_callback_on_writable' [-Werror=implicit-function-declaration] lws_callback_on_writable(wsi);

^ juci_ws_server.c:151:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:161:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:179:5: error: implicit declaration of function 'lws_write' [-Werror=implicit-function-declaration] int n = lws_write(wsi, &frame->buf[LWS_SEND_BUFFER_PRE_PADDING]+frame->sent_count, len, flags); ^ juci_ws_server.c:198:4: error: implicit declaration of function 'lws_rx_flow_control' [-Werror=implicit-function-declaration] lws_rx_flow_control(wsi, 1); ^ juci_ws_server.c:205:57: error: dereferencing pointer to incomplete type struct ubus_srv_ws _self = (struct ubus_srvws)proto->user; ^ juci_ws_server.c:213:4: error: implicit declaration of function 'lws_is_final_fragment' [-Werror=implicit-function-declaration] if((!(

_user)->buffer_start && lws_is_final_fragment(wsi)) || lws_is_final_fragment(wsi)){ ^ juci_ws_server.c: In function '_websocket_destroy': juci_ws_server.c:286:2: error: implicit declaration of function 'lws_context_destroy' [-Werror=implicit-function-declaration] if(self->ctx) lws_context_destroy(self->ctx); ^ juci_ws_server.c: In function '_websocket_listen': juci_ws_server.c:321:17: error: assignment from incompatible pointer type [-Werror] info.protocols = self->protocols; ^ juci_ws_server.c:323:17: error: 'LWS_SERVER_OPTION_VALIDATE_UTF8' undeclared (first use in this function) info.options = LWS_SERVER_OPTION_VALIDATE_UTF8; ^ juci_ws_server.c:323:17: note: each undeclared identifier is reported only once for each function it appears in juci_ws_server.c:325:2: error: implicit declaration of function 'lws_create_context' [-Werror=implicit-function-declaration] self->ctx = lws_create_context(&info); ^ juci_ws_server.c:325:12: error: assignment makes pointer from integer without a cast [-Werror] self->ctx = lws_create_context(&info); ^ juci_ws_server.c: In function '_websocket_server_thread': juci_ws_server.c:339:3: error: implicit declaration of function 'lws_service' [-Werror=implicit-function-declaration] lws_service(self->ctx, 10); ^ juci_ws_server.c: In function 'juci_ws_server_new': juci_ws_server.c:421:37: error: invalid application of 'sizeof' to incomplete type 'struct lws_protocols' self->protocols = calloc(2, sizeof(struct lws_protocols)); ^ juci_ws_server.c:423:2: error: invalid use of undefined type 'struct lws_protocols' self->protocols[0] = (struct lws_protocols){ ^ juci_ws_server.c:423:17: error: dereferencing pointer to incomplete type self->protocols[0] = (struct lws_protocols){ ^ juci_ws_server.c:424:3: error: unknown field 'name' specified in initializer .name = "", ^ juci_ws_server.c:424:3: error: excess elements in struct initializer [-Werror] juci_ws_server.c:424:3: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:425:3: error: unknown field 'callback' specified in initializer .callback = _ubus_socket_callback, ^ juci_ws_server.c:425:3: error: excess elements in struct initializer [-Werror] juci_ws_server.c:425:3: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:426:3: error: unknown field 'per_session_data_size' specified in initializer .per_session_data_size = sizeof(struct ubus_srv_wsclient), ^ juci_ws_server.c:426:42: error: excess elements in struct initializer [-Werror] .per_session_data_size = sizeof(struct ubus_srv_ws_client

_), ^ juci_ws_server.c:426:42: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:427:3: error: unknown field 'user' specified in initializer .user = self ^ juci_ws_server.c:428:2: error: excess elements in struct initializer [-Werror] }; ^ juci_ws_server.c:428:2: error: (near initialization for '(anonymous)') [-Werror] juci_ws_server.c:428:2: error: invalid use of undefined type 'struct lws_protocols' cc1: all warnings being treated as errors Makefile:476: recipe for target 'revorpcd-juci_wsserver.o' failed make[5]: ** [revorpcd-juci_ws_server.o] Error

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mkschreder/jucid/issues/6, or mute the thread https://github.com/notifications/unsubscribe/AERqiYSRQtIYDUtDdNXSlyW9tJWscrn6ks5qVMq8gaJpZM4JLUVm .