comotion/VSF

Compiling on Ubuntu 20.04

Patryk57 opened this issue · 5 comments

Hi,

First of all, I would like to thank you for the great work. Your VSF module has become an indispensable tool on our web platforms.
However, we are currently reinstalling all our Redhat based servers with Ubuntu.

But unfortunately, we are not able to compile the module anymore. The make command ends up with the following error:

make[3]: Entering directory '/root/install/VSF/libvmod-vsf/src'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/varnish -I../utf8proc -g -O2 -MT libvmod_vsf_la-vmod_vsf.lo -MD -MP -MF .deps/libvmod_vsf_la-vmod_vsf.Tpo -c -o libvmod_vsf_la-vmod_vsf.lo `test -f 'vmod_vsf.c' || echo './'`vmod_vsf.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I../utf8proc -g -O2 -MT libvmod_vsf_la-vmod_vsf.lo -MD -MP -MF .deps/libvmod_vsf_la-vmod_vsf.Tpo -c vmod_vsf.c  -fPIC -DPIC -o .libs/libvmod_vsf_la-vmod_vsf.o
In file included from /usr/include/varnish/cache/cache_varnishd.h:32,
                 from vmod_vsf.c:34:
/usr/include/varnish/cache/cache.h:202:1: warning: data definition has no type or storage class
  202 | VRBT_HEAD(vrt_priv_tree,vrt_priv);
      | ^~~~~~~~~
/usr/include/varnish/cache/cache.h:202:1: warning: type defaults to ‘int’ in declaration of ‘VRBT_HEAD’ [-Wimplicit-int]
/usr/include/varnish/cache/cache.h:202:1: warning: parameter names (without types) in function declaration
/usr/include/varnish/cache/cache.h:207:23: error: field ‘privs’ has incomplete type
  207 |  struct vrt_priv_tree privs;
      |                       ^~~~~
vmod_vsf.c: In function ‘vmod_body’:
vmod_vsf.c:117:28: warning: passing argument 2 of ‘VRB_Iterate’ from incompatible pointer type [-Wincompatible-pointer-types]
  117 |  if (VRB_Iterate(ctx->req, vsf_iter_req_body, vsb) == -1) {
      |                            ^~~~~~~~~~~~~~~~~
      |                            |
      |                            int (*)(void *, int,  const void *, ssize_t) {aka int (*)(void *, int,  const void *, long int)}
In file included from vmod_vsf.c:34:
/usr/include/varnish/cache/cache_varnishd.h:351:49: note: expected ‘int (*)(void *, unsigned int,  const void *, ssize_t)’ {aka ‘int (*)(void *, unsigned int,  const void *, long int)’} but argument is of type ‘int (*)(void *, int,  const void *, ssize_t)’ {aka ‘int (*)(void *, int,  const void *, long int)’}
  351 | ssize_t VRB_Iterate(struct req *, objiterate_f *func, void *priv);
      |                                   ~~~~~~~~~~~~~~^~~~
make[3]: *** [Makefile:670: libvmod_vsf_la-vmod_vsf.lo] Error 1
make[3]: Leaving directory '/root/install/VSF/libvmod-vsf/src'
make[2]: *** [Makefile:474: all-recursive] Error 1
make[2]: Leaving directory '/root/install/VSF/libvmod-vsf'
make[1]: *** [Makefile:385: all] Error 2
make[1]: Leaving directory '/root/install/VSF/libvmod-vsf'
make: *** [Makefile:12: libvmod-vsf/src/.libs/libvmod-vsf.so] Error 2

Do you have an idea how we can solve this issue?

Very many thanks in advance,

Best regards.

Patrick

fgsch commented

Hi @Patryk57. What VSF branch and Varnish version are you using?

Hi, I am currently running with Varnish 6.2.1

fgsch commented

Unfortunately, that version is not supported.

Any reason you are running 6.2.1? Can you upgrade to a more recent version?

Hi, Many thanks for the info.

I will try to downgrade to 6.0.X .

We installed 6.2.1 because it is the version which comes by default while apt install

Thanks again for checking.

--
Patrick

fgsch commented

@Patryk57 👋 Just wanted to check if you are still having problems or we can close this issue. Thanks!