varnish / varnish-modules

Collection of Varnish Cache modules (vmods) by Varnish Software
Other
182 stars 86 forks source link

Build fails on varnish:7.0.2 image #195

Closed glensc closed 2 years ago

glensc commented 2 years ago

Using official docker image for varnish:7.0.2:

#14 4.779   CC       vmod_bodyaccess.lo
#14 5.379 vmod_bodyaccess.c: In function 'vmod_rematch_req_body':
#14 5.379 vmod_bodyaccess.c:213:6: error: implicit declaration of function 'VRE_exec' [-Werror=implicit-function-declaration]
#14 5.379   213 |  i = VRE_exec(re, VSB_data(vsb), VSB_len(vsb), 0, 0, NULL,
#14 5.379       |      ^~~~~~~~
#14 5.379 vmod_bodyaccess.c:213:6: error: nested extern declaration of 'VRE_exec' [-Werror=nested-externs]
#14 5.785 cc1: all warnings being treated as errors
#14 5.811 make[2]: Leaving directory '/usr/src/varnish-modules/src'
#14 5.811 make[2]: *** [Makefile:936: vmod_bodyaccess.lo] Error 1
#14 5.819 make[1]: Leaving directory '/usr/src/varnish-modules'
#14 5.819 make[1]: *** [Makefile:542: all-recursive] Error 1
#14 5.821 make: *** [Makefile:453: all] Error 2

Dockerfile for reproducing:

gquintard commented 2 years ago

works for me, did you use the 7.0 branch?

gquintard commented 2 years ago

just saw the Dockerfile, let me check

gquintard commented 2 years ago

the Dockerfile is using 0.18.0 which targets 6.6. Using 0.19.0 instead works as expected. (to be fair, it compiles but fails to install, you need to install python3-sphinx too)

glensc commented 2 years ago

Duh. silly. I updated comment to be 0.19.0, but not the actual VERSION. thanks for quick response!

gquintard commented 2 years ago

no worries. For info, the next version of the docker image (in about 2 weeks) will include varnish-modules directly, that will save you that dance