varnishcache-friends / libvmod-geoip2

Varnish VMOD to query MaxMind GeoIP2 DB files
BSD 2-Clause "Simplified" License
39 stars 17 forks source link

Issue When Doing "make" On Debian #19

Closed eyebrows closed 7 years ago

eyebrows commented 7 years ago

Hello! Firstly thank you for making this mod, it's in use on our current live infrastructure and working like a charm (installed by my former sysadmin guy), but now I'm attempting to migrate to a Google Compute Engine VM I'm having some problems with installation.

We're on Debian 8.8, Varnish 4.0.2 (revision bfe7cd1, as part of OpenResty) and all the things from your Requirements section are (as best as I can tell) installed. Have cloned the git repo (just in to a sub-dir in my user dir), ./autogen.sh doesn't appear to throw any errors, ./configure also appears fine, but make throws this:

make  all-recursive
make[1]: Entering directory '/home/steve/libvmod-geoip2'
Making all in src
make[2]: Entering directory '/home/steve/libvmod-geoip2/src'
/usr/bin/python /usr/share/varnish/vmodtool.py ../src/vmod.vcc
Traceback (most recent call last):
  File "/usr/share/varnish/vmodtool.py", line 927, in <module>
    runmain(i_vcc)
  File "/usr/share/varnish/vmodtool.py", line 842, in runmain
    i.parse(vx)
  File "/usr/share/varnish/vmodtool.py", line 734, in parse
    o = parse_func(self, pobj=vx[1].nam)
  File "/usr/share/varnish/vmodtool.py", line 646, in parse_func
    raise Exception("ARG? %s", t.str)
Exception: ('ARG? %s', ',')
Makefile:1093: recipe for target 'vcc_if.c' failed
make[2]: *** [vcc_if.c] Error 1
make[2]: Leaving directory '/home/steve/libvmod-geoip2/src'
Makefile:470: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/steve/libvmod-geoip2'
Makefile:380: recipe for target 'all' failed
make: *** [all] Error 2

I've tried searching for various parts of those error messages but they all seem pretty generic, and I'm not having much luck. Does anything look obvious as a root cause to you?

Thanks

fgsch commented 7 years ago

4.0 is no longer supported.

That said, it should compile if you change $Method STRING .lookup(STRING path, IP ip) to $Method STRING .lookup(STRING, IP) in src/vmod.vcc.

I'd recommend you to upgrade to 4.1, however, since 4.0 is EOL.

eyebrows commented 7 years ago

Amazing, thank you! Figured out how to get Varnish 4.1 on (the default/official Debian apt source only had 4.0) and it now appears to be working!

fgsch commented 7 years ago

Glad is solved.