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 install #26

Closed Rod-Gomes closed 6 years ago

Rod-Gomes commented 6 years ago

I'm getting the following error after running make.

In file included from vmod_geoip2.c:38:0:
vcc_if.h:13:1: error: unknown type name 'VCL_VOID'
 VCL_VOID vmod_geoip2__init(VRT_CTX, struct vmod_geoip2_geoip2 **,
 ^
vcc_if.h:13:37: error: expected ')' before 'struct'
 VCL_VOID vmod_geoip2__init(VRT_CTX, struct vmod_geoip2_geoip2 **,
                                     ^
vcc_if.h:15:1: error: unknown type name 'VCL_VOID'
 VCL_VOID vmod_geoip2__fini(struct vmod_geoip2_geoip2 **);
 ^
vcc_if.h:16:1: error: unknown type name 'VCL_STRING'
 VCL_STRING vmod_geoip2_lookup(VRT_CTX, struct vmod_geoip2_geoip2 *,
 ^
vcc_if.h:16:40: error: expected ')' before 'struct'
 VCL_STRING vmod_geoip2_lookup(VRT_CTX, struct vmod_geoip2_geoip2 *,
                                        ^
vmod_geoip2.c:51:15: error: expected ')' before 'enum'
 vslv(VRT_CTX, enum VSL_tag_e tag, const char *fmt, ...)
               ^
vmod_geoip2.c:63:1: error: unknown type name 'VCL_VOID'
 VCL_VOID
 ^
vmod_geoip2.c:64:28: error: expected ')' before 'struct'
 vmod_geoip2__init(VRT_CTX, struct vmod_geoip2_geoip2 **vpp,
                            ^
vmod_geoip2.c:93:1: error: unknown type name 'VCL_VOID'
 VCL_VOID
 ^
vmod_geoip2.c: In function 'vmod_geoip2__fini':
vmod_geoip2.c:99:3: warning: 'return' with no value, in function returning non-void [enabled by default]
   return;
   ^
vmod_geoip2.c: At top level:
vmod_geoip2.c:108:1: error: unknown type name 'VCL_STRING'
 VCL_STRING
 ^
vmod_geoip2.c:109:29: error: expected ')' before 'struct'
 vmod_geoip2_lookup(VRT_CTX, struct vmod_geoip2_geoip2 *vp,
                             ^
make[2]: ** [libvmod_geoip2_la-vmod_geoip2.lo] Erro 1
make[2]: Saindo do diretório `/root/libvmod-geoip2/src'
make[1]: ** [all-recursive] Erro 1
make[1]: Saindo do diretório `/root/libvmod-geoip2'
make: ** [all] Erro 2
[root@test ~]# cat /etc/*-release
CentOS Linux release 7.5.1804 (Core) 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.5.1804 (Core) 
CentOS Linux release 7.5.1804 (Core)
fgsch commented 6 years ago

Strange. Which varnish version (or revision if running from git) and which libvmod-geoip2 branch?

Rod-Gomes commented 6 years ago
[~]# varnishd -V
varnishd (varnish-4.1.10 revision 1d090c5a08f41c36562644bafcce9d3cb85d824f)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2015 Varnish Software AS

I just run:

git clone --recursive https://github.com/fgsch/libvmod-geoip2
cd /libvmod-geoip2
./autogen.sh
./configure
make
fgsch commented 6 years ago

As the README states:

For Varnish 4.1/5.x and 6.0 refer to the oldstable and master branches, respectively.

You are using master, which is for 6.0. Please use oldstable for 4.1.10.

spogulis commented 5 years ago

Issue still relevant as oldstable branch doesn't exist in this repository.

fgsch commented 5 years ago

Sorry, varnish 4.1 is EOL and no longer supported.