varnish/libvmod-geoip

Errors on make

paragonn opened this issue · 1 comments

Thanks for this module!

I am getting the following error when running make:

make[2]: Entering directory `/usr/src/libvmod-geoip/src’
/usr/share/varnish/vmodtool.py ../src/vmod_geoip.vcc
/bin/bash ../libtool –tag=CC –mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c -o vcc_if.lo vcc_if.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c vcc_if.c -fPIC -DPIC -o .libs/vcc_if.o
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vcc_if.lo -MD -MP -MF .deps/vcc_if.Tpo -c vcc_if.c -o vcc_if.o >/dev/null 2>&1
mv -f .deps/vcc_if.Tpo .deps/vcc_if.Plo
/bin/bash ../libtool –tag=CC –mode=compile gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vmod_geoip.lo -MD -MP -MF .deps/vmod_geoip.Tpo -c -o vmod_geoip.lo vmod_geoip.c
libtool: compile: gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -Wall -Wextra -Werror -g -O2 -MT vmod_geoip.lo -MD -MP -MF .deps/vmod_geoip.Tpo -c vmod_geoip.c -fPIC -DPIC -o .libs/vmod_geoip.o
vmod_geoip.c:21:48: error: ‘enum vcl_event_e’ declared inside parameter list [-Werror]
vmod_event(VRT_CTX, struct vmod_priv *pp, enum vcl_event_e evt)
^
vmod_geoip.c:21:48: error: its scope is only this definition or declaration, which is probably not what you want [-Werror]
vmod_geoip.c:21:60: error: parameter 3 (‘evt’) has incomplete type
vmod_event(VRT_CTX, struct vmod_priv *pp, enum vcl_event_e evt)
^
In file included from /usr/include/varnish/common/common.h:37:0,
from /usr/include/varnish/cache/cache.h:37,
from vmod_geoip.c:16:
vmod_geoip.c: In function ‘vmod_event’:
vmod_geoip.c:27:20: error: ‘VCL_EVENT_LOAD’ undeclared (first use in this function)
xxxassert(evt == VCL_EVENT_LOAD);
^
/usr/include/varnish/vas.h:68:8: note: in definition of macro ‘xxxassert’
if (!(e)) { \
^
vmod_geoip.c:27:20: note: each undeclared identifier is reported only once for each function it appears in
xxxassert(evt == VCL_EVENT_LOAD);
^
/usr/include/varnish/vas.h:68:8: note: in definition of macro ‘xxxassert’
if (!(e)) { \
^
vmod_geoip.c:21:60: error: unused parameter ‘evt’ [-Werror=unused-parameter]
vmod_event(VRT_CTX, struct vmod_priv *pp, enum vcl_event_e evt)
^
cc1: all warnings being treated as errors
make[2]: *** [vmod_geoip.lo] Error 1
make[2]: Leaving directory `/usr/src/libvmod-geoip/src’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/libvmod-geoip’
make: *** [all] Error 2

Problem solved! I need to checkout the branch with my Varnish version.