comotion/VSF

is it possible to build vanirsh6.2?

Closed this issue · 3 comments

is it possible to build vanirsh6.2?

Centos7
Varnish6.2
Python 3.6.3

I have got following error.

/bin/sh ../libtool  --tag=CC   --mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..    -I/usr/local/varnish/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 -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/usr/local/varnish/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/local/varnish/include/varnish/cache/cache_varnishd.h:32:0,
                 from vmod_vsf.c:34:
/usr/local/varnish/include/varnish/cache/cache.h:202:1: warning: data definition has no type or storage class [enabled by default]
 VRBT_HEAD(vrt_priv_tree,vrt_priv);
 ^
/usr/local/varnish/include/varnish/cache/cache.h:202:1: warning: type defaults to 'int' in declaration of 'VRBT_HEAD' [enabled by default]
/usr/local/varnish/include/varnish/cache/cache.h:202:1: warning: parameter names (without types) in function declaration [enabled by default]
/usr/local/varnish/include/varnish/cache/cache.h:207:23: error: field 'privs' has incomplete type
  struct vrt_priv_tree privs;
                       ^
vmod_vsf.c: In function 'vmod_body':
vmod_vsf.c:117:2: warning: passing argument 2 of 'VRB_Iterate' from incompatible pointer type [enabled by default]
  if (VRB_Iterate(ctx->req, vsf_iter_req_body, vsb) == -1) {
  ^
In file included from vmod_vsf.c:34:0:
/usr/local/varnish/include/varnish/cache/cache_varnishd.h:351:9: note: expected 'int (*)(void *, unsigned int,  const void *, ssize_t)' but argument is of type 'int (*)(void *, int,  const void *, ssize_t)'
 ssize_t VRB_Iterate(struct req *, objiterate_f *func, void *priv);
fgsch commented

Not currently I'm afraid.

1. I have tried varnish-cache tag 6.0.0 and 6.0 branch of VSF but getting this error with make command.(Using Ubuntu 18.04 and python 3.7)

make all-recursive
make[1]: Entering directory '/home/aegir/VSF/libvmod-vsf'
Making all in src
make[2]: Entering directory '/home/aegir/VSF/libvmod-vsf/src'
/usr/bin/python /usr/share/varnish/vmodtool.py ../src/vmod_vsf.vcc
/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
vmod_vsf.c:32:10: fatal error: utf8proc.h: No such file or directory
#include <utf8proc.h>
^~~~~~~~~~~~
compilation terminated.
Makefile:660: recipe for target 'libvmod_vsf_la-vmod_vsf.lo' failed
make[2]: *** [libvmod_vsf_la-vmod_vsf.lo] Error 1
make[2]: Leaving directory '/home/aegir/VSF/libvmod-vsf/src'
Makefile:474: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/aegir/VSF/libvmod-vsf'
Makefile:385: recipe for target 'all' failed
make: *** [all] Error 2

2. Also with varnish-cache tag 6.0.4 and 6.0 branch of VSF I am getting this error

Submodule 'utf8proc' (https://github.com/JuliaLang/utf8proc.git) registered for path 'libvmod-vsf/utf8proc'
Cloning into '/home/aegir/VSF/libvmod-vsf/utf8proc'...
Submodule path 'libvmod-vsf/utf8proc': checked out '0975bf9b6d95e704bb7419e4ca281a171ca0b956'
autoreconf: Entering directory .' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal -I /usr/share/aclocal --force -I m4 -I ${VARNISH_DATAROOT}/aclocal autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. libtoolize: copying file 'build-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --include=/usr/share/aclocal --force autoreconf: running: /usr/bin/autoheader --include=/usr/share/aclocal --force autoreconf: running: automake --add-missing --copy --force-missing configure.ac:12: installing 'build-aux/compile' configure.ac:8: installing 'build-aux/missing' src/Makefile.am:10: warning: source file '$(top_srcdir)/utf8proc/utf8proc.c' is in a subdirectory, src/Makefile.am:10: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. src/Makefile.am: installing 'build-aux/depcomp' autoreconf: Leaving directory .'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for a Python interpreter with version >= 2.7... python
checking for python... /usr/bin/python
checking for python version... 3.7
checking for python platform... linux
checking for python script directory... ${prefix}/lib/python3.7/site-packages
checking for python extension module directory... ${exec_prefix}/lib/python3.7/site-packages
checking for rst2man... /usr/bin/rst2man
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking vsha256.h usability... yes
checking vsha256.h presence... yes
checking for vsha256.h... yes
checking cache/cache.h usability... yes
checking cache/cache.h presence... yes
checking for cache/cache.h... yes
checking for python3... /usr/bin/python
checking for varnishtest... /usr/local/bin/varnishtest
checking for varnishd... /usr/local/sbin/varnishd
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory '/home/aegir/VSF/libvmod-vsf'
make all-recursive
make[2]: Entering directory '/home/aegir/VSF/libvmod-vsf'
Making all in src
make[3]: Entering directory '/home/aegir/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
vmod_vsf.c:34:10: fatal error: cache/cache_varnishd.h: No such file or directory
#include "cache/cache_varnishd.h"
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:660: recipe for target 'libvmod_vsf_la-vmod_vsf.lo' failed
make[3]: *** [libvmod_vsf_la-vmod_vsf.lo] Error 1
make[3]: Leaving directory '/home/aegir/VSF/libvmod-vsf/src'
Makefile:474: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/aegir/VSF/libvmod-vsf'
Makefile:385: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/aegir/VSF/libvmod-vsf'
Makefile:10: recipe for target 'libvmod-vsf/src/.libs/libvmod-vsf.so' failed
make: *** [libvmod-vsf/src/.libs/libvmod-vsf.so] Error 2

3. Are these installation steps correct? If not then what they should be?
For varnish cache (I have varnish working fine)

  1. cd ~ && git clone https://github.com/varnishcache/varnish-cache
    
  2. cd varnish-cache
  3. git checkout tags/varnish-6.0.0
  4. sudo mkdir /opt/varnish-cache-6.0
  5. sudo ln -sT /opt/varnish-cache-6.0 /opt/varnish
  6. sh autogen.sh --prefix=/opt/varnish-cache-6.4/
  7. ./configure --prefix=/opt/varnish-cache-6.4/
  8. make
  9. make check
  10. sudo checkinstall
    
  11. sudo ldconfig
    

For VSF installation

  1.  cd ~
    
  2. git clone https://github.com/comotion/VSF
  3. cd VSF/libvmod-vsf
  4. git checkout origin/6.0
  5. sudo mkdir /opt/vsf-6.0
  6. sh autogen.sh --prefix=/opt/vsf-6.0/
  7. ./configure --prefix=/opt/vsf-6.0/
  8. cd ..
  9. make [Should we execute this in main VSF folder or libvmod-vsf]
  10. make check
    
  11. sudo checkinstall
    

4. Which tag exactly from varnish cache is compatible with VSF 6.0 branch?


Thanks.

fgsch commented

Varnish 6.2 is no longer supported.