Hello,
I want to use this vmod on my system but when I install I got tons of errors messages:
My steps:
-- Download libvmod-dynamic into directory /var/lib/varnish/vmods/
-- Unzip file
-- ./autogent.sh --> OK
-- ./configure --> OK
-- make --> Errrors:
[root@vultr libvmod-dynamic-master]# make
make all-recursive
make[1]: Entering directory `/var/lib/varnish/vmods/libvmod-dynamic-master'
Making all in src
make[2]: Entering directory `/var/lib/varnish/vmods/libvmod-dynamic-master/src'
CC vmod_dynamic.lo
vmod_dynamic.c:105:33: error: array type has incomplete element type
static const struct vdi_methods vmod_dynamic_methods[1] = {{
^
vmod_dynamic.c:106:2: error: field name not in record or union initializer
.magic = VDI_METHODS_MAGIC,
^
vmod_dynamic.c:106:2: error: (near initialization for ‘vmod_dynamic_methods’)
vmod_dynamic.c:106:11: error: ‘VDI_METHODS_MAGIC’ undeclared here (not in a function)
.magic = VDI_METHODS_MAGIC,
^
vmod_dynamic.c:107:2: error: field name not in record or union initializer
.type = "dynamic",
^
vmod_dynamic.c:107:2: error: (near initialization for ‘vmod_dynamic_methods’)
vmod_dynamic.c:108:2: error: field name not in record or union initializer
.healthy = dynamic_healthy,
^
vmod_dynamic.c:108:2: error: (near initialization for ‘vmod_dynamic_methods’)
vmod_dynamic.c:109:2: error: field name not in record or union initializer
.resolve = dynamic_resolve
^
vmod_dynamic.c:109:2: error: (near initialization for ‘vmod_dynamic_methods’)
vmod_dynamic.c: In function ‘dynamic_resolve’:
vmod_dynamic.c:151:4: error: too many arguments to function ‘VRT_Healthy’
!VRT_Healthy(ctx, next->be->dir, NULL));
^
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_dynamic.c:45:
/usr/include/varnish/vrt.h:420:5: note: declared here
int VRT_Healthy(VRT_CTX, VCL_BACKEND);
^
vmod_dynamic.c:156:6: error: too many arguments to function ‘VRT_Healthy’
!VRT_Healthy(ctx, next->be->dir, NULL))
^
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_dynamic.c:45:
/usr/include/varnish/vrt.h:420:5: note: declared here
int VRT_Healthy(VRT_CTX, VCL_BACKEND);
^
vmod_dynamic.c: In function ‘dynamic_healthy’:
vmod_dynamic.c:184:3: error: too many arguments to function ‘VRT_Healthy’
retval = VRT_Healthy(ctx, r->be->dir, &c);
^
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_dynamic.c:45:
/usr/include/varnish/vrt.h:420:5: note: declared here
int VRT_Healthy(VRT_CTX, VCL_BACKEND);
^
vmod_dynamic.c: In function ‘dynamic_del’:
vmod_dynamic.c:248:3: error: passing argument 2 of ‘VRT_delete_backend’ from incompatible pointer type [-Werror]
VRT_delete_backend(ctx, &b->dir);
^
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_dynamic.c:45:
/usr/include/varnish/vrt.h:412:6: note: expected ‘struct director **’ but argument is of type ‘const struct director **’
void VRT_delete_backend(VRT_CTX, struct director **);
^
vmod_dynamic.c: In function ‘dynamic_free’:
vmod_dynamic.c:546:2: error: implicit declaration of function ‘VRT_DelDirector’ [-Werror=implicit-function-declaration]
VRT_DelDirector(&dom->dir);
^
vmod_dynamic.c: In function ‘dynamic_get’:
vmod_dynamic.c:710:2: error: implicit declaration of function ‘VRT_AddDirector’ [-Werror=implicit-function-declaration]
dom->dir = VRT_AddDirector(ctx, vmod_dynamic_methods, dom,
^
vmod_dynamic.c: At top level:
vmod_dynamic.c:105:33: error: ‘vmod_dynamic_methods’ defined but not used [-Werror=unused-variable]
static const struct vdi_methods vmod_dynamic_methods[1] = {{
^
cc1: all warnings being treated as errors
make[2]: *** [vmod_dynamic.lo] Error 1
make[2]: Leaving directory `/var/lib/varnish/vmods/libvmod-dynamic-master/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/lib/varnish/vmods/libvmod-dynamic-master'
make: *** [all] Error 2
Software: Varnish 6.0.1
Environment: Centos 7
Please give me the helps or some suggestions. Thank you
Hello, I want to use this vmod on my system but when I install I got tons of errors messages: My steps: -- Download libvmod-dynamic into directory
/var/lib/varnish/vmods/
-- Unzip file --./autogent.sh
--> OK --./configure
--> OK --make
--> Errrors:Software: Varnish 6.0.1 Environment: Centos 7
Please give me the helps or some suggestions. Thank you