flygoast / libvmod-lua

Varnish lua vmod to execute lua script in VCL.
Other
23 stars 5 forks source link

libvmod-lua for varnish5 compilation failure #2

Closed dmitryzykov closed 5 years ago

dmitryzykov commented 7 years ago

I'm trying to compile libvmod-lua for varnish5 at centos 7. But i got this error:

make  all-recursive
make[1]: Entering directory `/usr/local/src/libvmod-lua-master'
Making all in src
make[2]: Entering directory `/usr/local/src/libvmod-lua-master/src'
/usr/share/varnish/vmodtool.py ../src/vmod_lua.vcc
Traceback (most recent call last):
  File "/usr/share/varnish/vmodtool.py", line 874, in <module>
    runmain(i_vcc, opts.rstdir, opts.output)
  File "/usr/share/varnish/vmodtool.py", line 833, in runmain
    v.parse()
  File "/usr/share/varnish/vmodtool.py", line 668, in parse
    s_module(c, b[1:], self)
  File "/usr/share/varnish/vmodtool.py", line 359, in __init__
    self.parse()
  File "/usr/share/varnish/vmodtool.py", line 408, in parse
    self.vcc.moddesc = a[2]
IndexError: list index out of range
make[2]: *** [vcc_if.h] Error 1
make[2]: Leaving directory `/usr/local/src/libvmod-lua-master/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/libvmod-lua-master'
make: *** [all] Error 2

full output of this commands:

./autogen.sh
./configure
make
[root@zabbix1 libvmod-lua-master]# ./autogen.sh
+ aclocal -I m4 -I /usr/share/aclocal
+ libtoolize --copy --force
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `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'
+ autoheader
+ automake --add-missing --copy --foreign
configure.ac:9: installing './config.guess'
configure.ac:9: installing './config.sub'
configure.ac:12: installing './install-sh'
configure.ac:12: installing './missing'
src/Makefile.am: installing './depcomp'
+ autoconf
[root@zabbix1 libvmod-lua-master]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/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 dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -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 minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking how to run the C preprocessor... gcc -E
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc -std=gnu99... /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 whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-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 -std=gnu99 object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc -std=gnu99 supports -fno-rtti -fno-exceptions... no
checking for gcc -std=gnu99 option to produce PIC... -fPIC -DPIC
checking if gcc -std=gnu99 PIC flag -fPIC -DPIC works... yes
checking if gcc -std=gnu99 static flag -static works... no
checking if gcc -std=gnu99 supports -c -o file.o... yes
checking if gcc -std=gnu99 supports -c -o file.o... (cached) yes
checking whether the gcc -std=gnu99 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... yes
checking whether make sets $(MAKE)... (cached) yes
checking for rst2man... rst2man
checking for ANSI C header files... (cached) yes
checking sys/stdlib.h usability... no
checking sys/stdlib.h presence... no
checking for sys/stdlib.h... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libvarnishapi... 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... no
checking for python3.1... no
checking for python3.2... no
checking for python2.7... python2.7
checking for varnishtest... /usr/bin/varnishtest
checking for varnishd... /usr/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: executing depfiles commands
config.status: executing libtool commands
[root@zabbix1 libvmod-lua-master]# make
make  all-recursive
make[1]: Entering directory `/usr/local/src/libvmod-lua-master'
Making all in src
make[2]: Entering directory `/usr/local/src/libvmod-lua-master/src'
/usr/share/varnish/vmodtool.py ../src/vmod_lua.vcc
Traceback (most recent call last):
  File "/usr/share/varnish/vmodtool.py", line 874, in <module>
    runmain(i_vcc, opts.rstdir, opts.output)
  File "/usr/share/varnish/vmodtool.py", line 833, in runmain
    v.parse()
  File "/usr/share/varnish/vmodtool.py", line 668, in parse
    s_module(c, b[1:], self)
  File "/usr/share/varnish/vmodtool.py", line 359, in __init__
    self.parse()
  File "/usr/share/varnish/vmodtool.py", line 408, in parse
    self.vcc.moddesc = a[2]
IndexError: list index out of range
make[2]: *** [vcc_if.h] Error 1
make[2]: Leaving directory `/usr/local/src/libvmod-lua-master/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/libvmod-lua-master'
make: *** [all] Error 2

I found similar bug for libvmod-curl https://github.com/varnish/libvmod-curl/issues/41

flygoast commented 7 years ago

I'll find some time to learn Varnish 5, then to fixed this. Thanks.