varnishcache-friends / libvmod-geoip2

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

Error during `make` on Ubuntu 22.04 #68

Closed codeguy closed 3 months ago

codeguy commented 3 months ago

Following instructions attempting to compile from GitHub repo. When I get to the make command, I receive this error:

root@ip-10-0-0-68:~/libvmod-geoip2# make
make  all-recursive
make[1]: Entering directory '/root/libvmod-geoip2'
Making all in src
make[2]: Entering directory '/root/libvmod-geoip2/src'
/usr/bin/python3 /usr/share/varnish/vmodtool.py ../src/vmod_geoip2.vcc
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/include/varnish -I/usr/include/x86_64-linux-gnu -g -O2 -MT libvmod_geoip2_la-vmod_geoip2.lo -MD -MP -MF .deps/libvmod_geoip2_la-vmod_geoip2.Tpo -c -o libvmod_geoip2_la-vmod_geoip2.lo `test -f 'vmod_geoip2.c' || echo './'`vmod_geoip2.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/varnish -I/usr/include/x86_64-linux-gnu -g -O2 -MT libvmod_geoip2_la-vmod_geoip2.lo -MD -MP -MF .deps/libvmod_geoip2_la-vmod_geoip2.Tpo -c vmod_geoip2.c  -fPIC -DPIC -o .libs/libvmod_geoip2_la-vmod_geoip2.o
vmod_geoip2.c: In function ‘vslv’:
vmod_geoip2.c:60:27: error: ‘NO_VXID’ undeclared (first use in this function); did you mean ‘OA_VXID’?
   60 |                 VSLv(tag, NO_VXID, fmt, ap);
      |                           ^~~~~~~
      |                           OA_VXID
vmod_geoip2.c:60:27: note: each undeclared identifier is reported only once for each function it appears in
vmod_geoip2.c: In function ‘vmod_geoip2__init’:
vmod_geoip2.c:78:24: error: ‘NO_VXID’ undeclared (first use in this function); did you mean ‘OA_VXID’?
   78 |         VSL(SLT_Debug, NO_VXID,
      |                        ^~~~~~~
      |                        OA_VXID
make[2]: *** [Makefile:671: libvmod_geoip2_la-vmod_geoip2.lo] Error 1
make[2]: Leaving directory '/root/libvmod-geoip2/src'
make[1]: *** [Makefile:480: all-recursive] Error 1
make[1]: Leaving directory '/root/libvmod-geoip2'
make: *** [Makefile:391: all] Error 2

Any thoughts? The PKG_CONFIG_PATH env var is set correctly.

codeguy commented 3 months ago

Resolved. Had to switch to main branch because devel was set as default branch.