Closed kevin25 closed 7 months ago
Hi,
Looks like we are missing some info here. Could you give us the full output of "make -j1 V=1" please? No need to clean or run ./configure before
On Sun, May 7, 2023, 19:16 Kevin @.***> wrote:
I got the error
cc1: all warnings being treated as errors make[2]: [Makefile:934: vmod_bodyaccess.lo] Error 1 make[2]: Leaving directory '/usr/local/src/varnish-modules-0.15.1/src' make[1]: [Makefile:539: all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/varnish-modules-0.15.1' make: *** [Makefile:450: all] Error 2
How can I resolve this?
— Reply to this email directly, view it on GitHub https://github.com/varnish/varnish-modules/issues/214, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA42AKNB5PVX4O5PFC4ZG6DXFB6SRANCNFSM6AAAAAAXZODGT4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thank you for getting back to me. Here is the detail
`make all-recursive make[1]: Entering directory '/usr/local/src/varnish-modules-0.15.1' Making all in src make[2]: Entering directory '/usr/local/src/varnish-modules-0.15.1/src' /usr/bin/python3.9 /usr/share/varnish/vmodtool.py -o vcc_bodyaccess_if ./vmod_bodyaccess.vcc
NOTICE: Please put $Module description in quotes.
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c -o vmod_bodyaccess.lo vmod_bodyaccess.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c vmod_bodyaccess.c -fPIC -DPIC -o .libs/vmod_bodyaccess.o In file included from /usr/include/varnish/cache/cache_varnishd.h:34, from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache.h:206:1: error: data definition has no type or storage class [-Werror] 206 | VRBT_HEAD(vrt_privs, vrt_priv); | ^ |
struct vrt_privs privs[1]; | ^~~~~ /usr/include/varnish/cache/cache.h:454:19: error: array type has incomplete element type ‘struct vrt_privs’ 454 | struct vrt_privs privs[1]; | ^~~~~ In file included from /usr/include/varnish/cache/cache_varnishd.h:34, from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache.h:541:19: error: array type has incomplete element type ‘struct vrt_privs’ 541 | struct vrt_privs privs[1]; | ^~~~~ In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:457:25: error: array type has incomplete element type ‘struct vrt_privs’ 457 | extern struct vrt_privs cli_task_privs[1]; | ^ |
l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
struct req * const |
In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:21: note: expected ‘struct worker ’ but argument is of type ‘struct req const’ 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, | ^ |
l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); | ^ |
---|---|---|---|---|
int ()(void , int, const void , ssize_t) {aka int ()(void , int, const void , long int)} |
In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:38: note: expected ‘struct vsl_log ’ but argument is of type ‘int ()(void , int, const void , ssize_t)’ {aka ‘int ()(void , int, const void *, long int)’} 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, | ^ |
l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); | ^~~ |
---|---|---|---|---|
struct vsb * |
In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:56: note: expected ‘struct req ’ but argument is of type ‘struct vsb ’ 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, | ^ |
l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); | ^ |
ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, | ^ |
if (ctx->req->req_body_status != REQ_BODY_CACHED) { | ^ |
VSB_delete(vsb); | ^ |
void VSB_delete(struct vsb *) vdeprecated; | ^ |
if (ctx->req->req_body_status != REQ_BODY_CACHED) { | ^ |
return (ctx->req->req_bodybytes); | ^ |
req_body_status vmod_bodyaccess.c: In function ‘vmod_rematch_req_body’: vmod_bodyaccess.c:219:35: error: ‘REQ_BODY_CACHED’ undeclared (first use in this function) 219 | if (ctx->req->req_body_status != REQ_BODY_CACHED) { | ^ |
VSB_delete(vsb); | ^ |
void VSB_delete(struct vsb *) vdeprecated; | ^ |
if (ctx->req->req_body_status != REQ_BODY_CACHED) { | ^ |
ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx); | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
struct req * const |
In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:21: note: expected ‘struct worker ’ but argument is of type ‘struct req const’ 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, | ^ |
ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx); | ^ |
---|---|---|---|---|
int ()(void , int, const void , ssize_t) {aka int ()(void , int, const void , long int)} |
In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:38: note: expected ‘struct vsl_log ’ but argument is of type ‘int ()(void , int, const void , ssize_t)’ {aka ‘int ()(void , int, const void *, long int)’} 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, | ^ |
ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx); | ^ |
---|---|---|---|---|
struct bodyaccess_log_ctx * |
In file included from vmod_bodyaccess.c:37:
/usr/include/varnish/cache/cache_varnishd.h:361:56: note: expected ‘struct req ’ but argument is of type ‘struct bodyaccess_log_ctx ’
361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req ,
| ^~~~
vmod_bodyaccess.c:287:8: error: too few arguments to function ‘VRB_Iterate’
287 | ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx);
| ^~~
In file included from vmod_bodyaccess.c:37:
/usr/include/varnish/cache/cache_varnishd.h:361:9: note: declared here
361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req ,
| ^~~
vmod_bodyaccess.c: In function ‘vmod_len_req_body’:
vmod_bodyaccess.c:206:1: error: control reaches end of non-void function [-Werror=return-type]
206 | }
| ^
cc1: all warnings being treated as errors
make[2]: [Makefile:934: vmod_bodyaccess.lo] Error 1
make[2]: Leaving directory '/usr/local/src/varnish-modules-0.15.1/src'
make[1]: [Makefile:539: all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/varnish-modules-0.15.1'
make: *** [Makefile:450: all] Error 2
`
Thanks Kevin,
I'm away from the computer making things a bit hard to try and debug but I'm thinking it's just a matter of picking the right varnish-modules release/commit to match you varnish version.
Notably, i think thay the 15.1 release was missing this commit: https://github.com/varnish/varnish-modules/commit/3608d1ec11793de1bc94492b4a2d1b8d48a6ca98
Which trigger the tagging of 15.3, but we didn't publish a release. Would you be able to try the 15.3 or 15.4 tag from git a see if that solves your issue?
(In truth, just building from git should work, but you might as well grab on of the latest tags)
On Sun, May 7, 2023, 21:48 Kevin @.***> wrote:
Thank you for getting back to me. Here is the detail
`make all-recursive make[1]: Entering directory '/usr/local/src/varnish-modules-0.15.1' Making all in src make[2]: Entering directory '/usr/local/src/varnish-modules-0.15.1/src' /usr/bin/python3.9 /usr/share/varnish/vmodtool.py -o vcc_bodyaccess_if ./vmod_bodyaccess.vcc
NOTICE: Please put $Module description in quotes.
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c -o vmod_bodyaccess.lo vmod_bodyaccess.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I../src/foreign -Wall -Werror -Wall -Wno-format-y2k -Wstrict-prototypes -Wmissing-prototypes -Werror=missing-field-initializers -Wpointer-arith -Wreturn-type -Wwrite-strings -Wcast-qual -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Wnested-externs -Wextra -Wno-sign-compare -g -O2 -MT vmod_bodyaccess.lo -MD -MP -MF .deps/vmod_bodyaccess.Tpo -c vmod_bodyaccess.c -fPIC -DPIC -o .libs/vmod_bodyaccess.o In file included from /usr/include/varnish/cache/cache_varnishd.h:34, from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache.h:206:1: error: data definition has no type or storage class [-Werror] 206 VRBT_HEAD(vrt_privs, vrt_priv); ^ ~~~~ /usr/include/varnish/cache/cache.h:206:1: error: type defaults to ‘int’ in declaration of ‘VRBT_HEAD’ [-Werror=implicit-int] /usr/include/varnish/cache/cache.h:206:1: error: parameter names (without types) in function declaration [-Werror] In file included from /usr/include/varnish/cache/cache_varnishd.h:34, from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache.h:440:19: error: array type has incomplete element type ‘struct vrt_privs’ 440struct vrt_privs privs[1]; ^~~~~ /usr/include/varnish/cache/cache.h:454:19: error: array type has incomplete element type ‘struct vrt_privs’ 454 struct vrt_privs privs[1]; ^~~~~ In file included from /usr/include/varnish/cache/cache_varnishd.h:34, from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache.h:541:19: error: array type has incomplete element type ‘struct vrt_privs’ 541 struct vrt_privs privs[1]; ^~~~~ In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:457:25: error: array type has incomplete element type ‘struct vrt_privs’ 457 extern struct vrt_privs cli_task_privs[1]; ^ ~~~~~ vmod_bodyaccess.c: In function ‘bodyaccess_bcat’: vmod_bodyaccess.c:149:21: error: passing argument 1 of ‘VRB_Iterate’ from incompatible pointer type [-Werror=incompatible-pointer-types] 149l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); ~^~~struct req * const In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:21: note: expected ‘struct worker ’ but argument is of type ‘struct req const’ 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req
*, ^ ~~~~~~ vmod_bodyaccess.c:149:28: error: passing argument 2 of ‘VRB_Iterate’ from incompatible pointer type [-Werror=incompatible-pointer-types] 149l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); ^ ~~~~~int ()(void , int, const void , ssize_t) {aka int ()(void , int, const void , long int)} In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:38: note: expected ‘struct vsl_log ’ but argument is of type ‘int ()(void , int, const void , ssize_t)’ {aka ‘int ()(void , int, const void *, long int)’} 361 ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, ^ ~~~vmod_bodyaccess.c:149:48: error: passing argument 3 of ‘VRB_Iterate’ from incompatible pointer type [-Werror=incompatible-pointer-types] 149l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); ^~~ struct vsb *
In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:56: note: expected ‘struct req ’ but argument is of type ‘struct vsb ’ 361 ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, ^ ~~~ vmod_bodyaccess.c:149:6: error: too few arguments to function ‘VRB_Iterate’ 149l = VRB_Iterate(ctx->req, bodyaccess_bcat_cb, vsb); ^ ~~In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:9: note: declared here 361ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, ^ ~~vmod_bodyaccess.c: In function ‘vmod_hash_req_body’: vmod_bodyaccess.c:164:35: error: ‘REQ_BODY_CACHED’ undeclared (first use in this function) 164if (ctx->req->req_body_status != REQ_BODY_CACHED) { ^ ~~~~~~ vmod_bodyaccess.c:164:35: note: each undeclared identifier is reported only once for each function it appears in vmod_bodyaccess.c:184:2: error: ‘VSB_delete’ is deprecated [-Werror=deprecated-declarations] 184VSB_delete(vsb); ^ ~~~~~ In file included from /usr/include/varnish/cache/cache_varnishd.h:36, from vmod_bodyaccess.c:37: /usr/include/varnish/vsb.h:79:8: note: declared here 79void VSB_delete(struct vsb *) vdeprecated; ^ ~~~~~ vmod_bodyaccess.c: In function ‘vmod_len_req_body’: vmod_bodyaccess.c:193:35: error: ‘REQ_BODY_CACHED’ undeclared (first use in this function) 193if (ctx->req->req_body_status != REQ_BODY_CACHED) { ^ ~~~~~~ vmod_bodyaccess.c:205:20: error: ‘struct req’ has no member named ‘req_bodybytes’; did you mean ‘req_body_status’? 205return (ctx->req->req_bodybytes); ^ ~~~~req_body_status vmod_bodyaccess.c: In function ‘vmod_rematch_req_body’: vmod_bodyaccess.c:219:35: error: ‘REQ_BODY_CACHED’ undeclared (first use in this function) 219 if (ctx->req->req_body_status != REQ_BODY_CACHED) { ^ ~~~~~~ vmod_bodyaccess.c:252:2: error: ‘VSB_delete’ is deprecated [-Werror=deprecated-declarations] 252VSB_delete(vsb); ^ ~~~~~ In file included from /usr/include/varnish/cache/cache_varnishd.h:36, from vmod_bodyaccess.c:37: /usr/include/varnish/vsb.h:79:8: note: declared here 79void VSB_delete(struct vsb *) vdeprecated; ^ ~~~~~ vmod_bodyaccess.c: In function ‘vmod_log_req_body’: vmod_bodyaccess.c:282:35: error: ‘REQ_BODY_CACHED’ undeclared (first use in this function) 282if (ctx->req->req_body_status != REQ_BODY_CACHED) { ^ ~~~~~~ vmod_bodyaccess.c:287:23: error: passing argument 1 of ‘VRB_Iterate’ from incompatible pointer type [-Werror=incompatible-pointer-types] 287ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx); ~^~~struct req * const In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:21: note: expected ‘struct worker ’ but argument is of type ‘struct req const’ 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req
*, ^ ~~~~~~ vmod_bodyaccess.c:287:30: error: passing argument 2 of ‘VRB_Iterate’ from incompatible pointer type [-Werror=incompatible-pointer-types] 287ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx); ^ ~~~~int ()(void , int, const void , ssize_t) {aka int ()(void , int, const void , long int)} In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:38: note: expected ‘struct vsl_log ’ but argument is of type ‘int ()(void , int, const void , ssize_t)’ {aka ‘int ()(void , int, const void *, long int)’} 361 ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req *, ^ ~~~vmod_bodyaccess.c:287:49: error: passing argument 3 of ‘VRB_Iterate’ from incompatible pointer type [-Werror=incompatible-pointer-types] 287ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx); ^ ~~~struct bodyaccess_log_ctx * In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:56: note: expected ‘struct req ’ but argument is of type ‘struct bodyaccess_log_ctx ’ 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req , | ^
~~~ vmod_bodyaccess.c:287:8: error: too few arguments to function ‘VRB_Iterate’ 287 | ret = VRB_Iterate(ctx->req, bodyaccess_log_cb, &log_ctx); | ^~~In file included from vmod_bodyaccess.c:37: /usr/include/varnish/cache/cache_varnishd.h:361:9: note: declared here 361 | ssize_t VRB_Iterate(struct worker , struct vsl_log , struct req , | ^~~vmod_bodyaccess.c: In function ‘vmod_len_req_body’: vmod_bodyaccess.c:206:1: error: control reaches end of non-void function [-Werror=return-type] 206 | } | ^ cc1: all warnings being treated as errors make[2]: [Makefile:934: vmod_bodyaccess.lo] Error 1 make[2]: Leaving directory '/usr/local/src/varnish-modules-0.15.1/src' make[1]: [Makefile:539: all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/varnish-modules-0.15.1' make: *** [Makefile:450: all] Error 2 `— Reply to this email directly, view it on GitHub https://github.com/varnish/varnish-modules/issues/214#issuecomment-1537908826, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA42AKMMBO65XEEIVDRZOXLXFCQNFANCNFSM6AAAAAAXZODGT4 . You are receiving this because you commented.Message ID: @.***>
Thank you so much
I got the error
cc1: all warnings being treated as errors make[2]: [Makefile:934: vmod_bodyaccess.lo] Error 1 make[2]: Leaving directory '/usr/local/src/varnish-modules-0.15.1/src' make[1]: [Makefile:539: all-recursive] Error 1 make[1]: Leaving directory '/usr/local/src/varnish-modules-0.15.1' make: *** [Makefile:450: all] Error 2
How can I resolve this?