varnish / varnish-modules

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

Can't install varnish modules, getting syntax error. #136

Closed boovi06 closed 5 years ago

boovi06 commented 5 years ago

Varnish Version varnishd (varnish-trunk revision 9e1e0972c47c5ea03350c39c76370ccafd678802) Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2019 Varnish Software AS

When I try to install varnish modules, I get the following error. Could someone please help?

LT-BARADWAJ-V-MAC:varnish-modules-0.15.0 2 ecom-baradwaj.v$ ./configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... build-aux/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes configure: WARNING: Libtool does not cope well with whitespace in pwd checking build system type... x86_64-apple-darwin16.3.0 checking host system type... x86_64-apple-darwin16.3.0 checking how to print strings... printf 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 a sed that does not truncate output... /usr/bin/sed checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for fgrep... /usr/bin/grep -F checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no 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... 196608 checking how to convert x86_64-apple-darwin16.3.0 file names to x86_64-apple-darwin16.3.0 format... func_convert_file_noop checking how to convert x86_64-apple-darwin16.3.0 file names to toolchain format... func_convert_file_noop checking for /Library/Developer/CommandLineTools/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... no 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... no checking if : is a manifest tool... no checking for dsymutil... dsymutil checking for nmedit... nmedit checking for lipo... lipo checking for otool... otool checking for otool64... no checking for -single_module linker flag... yes checking for -exported_symbols_list linker flag... yes checking for -force_load linker flag... yes 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... yes checking for gcc option to produce PIC... -fno-common -DPIC checking if gcc PIC flag -fno-common -DPIC works... yes checking if gcc static flag -static works... no checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes checking dynamic linker characteristics... darwin16.3.0 dyld checking how to hardcode library paths into programs... immediate checking for dlopen in -ldl... yes checking whether a program can dlopen itself... yes checking whether a statically linked program can dlopen itself... yes 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 the pthreads library -lpthreads... no checking whether pthreads work without any flags... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... -D_THREAD_SAFE checking whether to build with code coverage support... no checking for rst2man... no checking for rst2man.py... rst2man.py checking for pkg-config... /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for pkg-config... (cached) /usr/local/bin/pkg-config checking pkg-config is at least version 0.21... yes checking for VARNISHAPI... yes checking for explicit_bzero... no checking for Varnish... trunk 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 a Python interpreter with version >= 2.7... python checking for python... /usr/bin/python checking for python version... 2.7 checking for python platform... darwin checking for python script directory... ${prefix}/lib/python2.7/site-packages checking for python extension module directory... ${exec_prefix}/lib/python2.7/site-packages checking for gcc option to accept ISO C99... none needed checking cache/cache_varnishd.h usability... yes checking cache/cache_varnishd.h presence... yes checking for cache/cache_varnishd.h... yes checking for struct objcore.exp... no checking for struct objcore.hsh_list... yes checking for struct director.admin_health... no checking for req_body_iter_f... no checking for objiterate_f... yes checking for enum exp_event_e... no checking for struct tcp_info... no 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 LT-BARADWAJ-V-MAC:varnish-modules-0.15.0 2 ecom-baradwaj.v$ make install Making install in src VMODTOOL vcc_bodyaccess_if.c File "/usr/local/share/varnish/vmodtool.py", line 200 print("ERROR: " + txt, file=sys.stderr) ^ SyntaxError: invalid syntax make[1]: [vcc_bodyaccess_if.c] Error 1 make: [install-recursive] Error 1 LT-BARADWAJ-V-MAC:varnish-modules-0.15.0 2 ecom-baradwaj.v$

boovi06 commented 5 years ago

./configure from varnish-modules is working fine. When I try to do make install, it is failing. Please help..

nigoroll commented 5 years ago

You need python >= 3.5 and probably also this repo of varnish-modules which I maintain for current varnish-cache master https://github.com/nigoroll/varnish-modules

boovi06 commented 5 years ago

Does this varnish modules work along with varnish cache 6.1?

nigoroll commented 5 years ago

see https://github.com/nigoroll/varnish-modules/tree/6.1

boovi06 commented 5 years ago

Thank you so much, worked. Changes made

  1. Made python3 as default python by changing the symlink,
  2. used 6.1 branch from varnish-modules

Output: LT-BARADWAJ-V-MAC:varnish-modules ecom-baradwaj.v$ make install Making install in src VMODTOOL vcc_bodyaccess_if.c CC vmod_bodyaccess.lo CC vcc_bodyaccess_if.lo CCLD libvmod_bodyaccess.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] VMODTOOL vcc_cookie_if.c CC vmod_cookie.lo CC vcc_cookie_if.lo CCLD libvmod_cookie.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] VMODTOOL vcc_header_if.c CC vmod_header.lo CC vcc_header_if.lo CCLD libvmod_header.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] VMODTOOL vcc_saintmode_if.c CC vmod_saintmode.lo CC vcc_saintmode_if.lo CCLD libvmod_saintmode.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] VMODTOOL vcc_tcp_if.c CC vmod_tcp.lo CC vcc_tcp_if.lo CCLD libvmod_tcp.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] VMODTOOL vcc_var_if.c CC vmod_var.lo CC vcc_var_if.lo CCLD libvmod_var.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] VMODTOOL vcc_vsthrottle_if.c CC vmod_vsthrottle.lo CC vcc_vsthrottle_if.lo CCLD libvmod_vsthrottle.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] VMODTOOL vcc_xkey_if.c CC vmod_xkey.lo CC vcc_xkey_if.lo CCLD libvmod_xkey.la clang: warning: argument unused during compilation: '-pthread' [-Wunused-command-line-argument] GEN vmod_bodyaccess.3 GEN vmod_cookie.3 GEN vmod_header.3 GEN vmod_saintmode.3 GEN vmod_tcp.3 GEN vmod_var.3 GEN vmod_vsthrottle.3 GEN vmod_xkey.3 make[2]: Nothing to be done for install-exec-am'. ../build-aux/install-sh -c -d '/usr/local/share/man/man3' /usr/bin/install -c -m 644 vmod_bodyaccess.3 vmod_cookie.3 vmod_header.3 vmod_saintmode.3 vmod_tcp.3 vmod_var.3 vmod_vsthrottle.3 vmod_xkey.3 '/usr/local/share/man/man3' ../build-aux/install-sh -c -d '/usr/local/lib/varnish/vmods' /bin/sh ../libtool --mode=install /usr/bin/install -c libvmod_bodyaccess.la libvmod_cookie.la libvmod_header.la libvmod_saintmode.la libvmod_tcp.la libvmod_var.la libvmod_vsthrottle.la libvmod_xkey.la '/usr/local/lib/varnish/vmods' libtool: install: /usr/bin/install -c .libs/libvmod_bodyaccess.so /usr/local/lib/varnish/vmods/libvmod_bodyaccess.so libtool: install: /usr/bin/install -c .libs/libvmod_bodyaccess.lai /usr/local/lib/varnish/vmods/libvmod_bodyaccess.la libtool: install: /usr/bin/install -c .libs/libvmod_cookie.so /usr/local/lib/varnish/vmods/libvmod_cookie.so libtool: install: /usr/bin/install -c .libs/libvmod_cookie.lai /usr/local/lib/varnish/vmods/libvmod_cookie.la libtool: install: /usr/bin/install -c .libs/libvmod_header.so /usr/local/lib/varnish/vmods/libvmod_header.so libtool: install: /usr/bin/install -c .libs/libvmod_header.lai /usr/local/lib/varnish/vmods/libvmod_header.la libtool: install: /usr/bin/install -c .libs/libvmod_saintmode.so /usr/local/lib/varnish/vmods/libvmod_saintmode.so libtool: install: /usr/bin/install -c .libs/libvmod_saintmode.lai /usr/local/lib/varnish/vmods/libvmod_saintmode.la libtool: install: /usr/bin/install -c .libs/libvmod_tcp.so /usr/local/lib/varnish/vmods/libvmod_tcp.so libtool: install: /usr/bin/install -c .libs/libvmod_tcp.lai /usr/local/lib/varnish/vmods/libvmod_tcp.la libtool: install: /usr/bin/install -c .libs/libvmod_var.so /usr/local/lib/varnish/vmods/libvmod_var.so libtool: install: /usr/bin/install -c .libs/libvmod_var.lai /usr/local/lib/varnish/vmods/libvmod_var.la libtool: install: /usr/bin/install -c .libs/libvmod_vsthrottle.so /usr/local/lib/varnish/vmods/libvmod_vsthrottle.so libtool: install: /usr/bin/install -c .libs/libvmod_vsthrottle.lai /usr/local/lib/varnish/vmods/libvmod_vsthrottle.la libtool: install: /usr/bin/install -c .libs/libvmod_xkey.so /usr/local/lib/varnish/vmods/libvmod_xkey.so libtool: install: /usr/bin/install -c .libs/libvmod_xkey.lai /usr/local/lib/varnish/vmods/libvmod_xkey.la make[2]: Nothing to be done forinstall-exec-am'. build-aux/install-sh -c -d '/usr/local/share/doc/varnish-modules' /usr/bin/install -c -m 644 README.rst LICENSE '/usr/local/share/doc/varnish-modules'

What do the last two lines convey? Do I need to run them?

nigoroll commented 5 years ago

no

boovi06 commented 5 years ago

Your response is very much appreciated. Thank you! :)