VSF icon indicating copy to clipboard operation
VSF copied to clipboard

Compiling on Ubuntu 20.04

Open Patryk57 opened this issue 2 years ago • 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

Patryk57 avatar Mar 25 '22 08:03 Patryk57

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

fgsch avatar Mar 25 '22 16:03 fgsch

Hi, I am currently running with Varnish 6.2.1

Patryk57 avatar Mar 28 '22 12:03 Patryk57

Unfortunately, that version is not supported.

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

fgsch avatar Mar 30 '22 21:03 fgsch

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

Patryk57 avatar Mar 31 '22 06:03 Patryk57

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

fgsch avatar Jul 12 '22 17:07 fgsch