Closed vladbondarenko closed 6 years ago
Found how to fix varnish.m4. But geoip2 compilation failed:
In file included from vmod_geoip2.c:35:0: /usr/include/varnish/vrt.h:35:4: error: #error "vrt.h included after cache.h - they are inclusive"
^~~~~
/usr/include/varnish/vrt.h:39:4: error: #error "vrt.h included multiple times"
^~~~~
In file included from vmod_geoip2.c:35:0:
/usr/include/varnish/vrt.h:123:8: error: redefinition of 'struct strands'
struct strands {
^~~
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_geoip2.c:33:
/usr/include/varnish/vrt.h:123:8: note: originally defined here
struct strands {
^~~
In file included from vmod_geoip2.c:35:0:
/usr/include/varnish/vrt.h:150:34: error: conflicting types for 'VCL_STRANDS'
typedef const struct strands VCL_STRANDS;
^~~
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_geoip2.c:33:
/usr/include/varnish/vrt.h:150:34: note: previous declaration of 'VCL_STRANDS' was here
typedef const struct strands VCL_STRANDS;
^~~
In file included from vmod_geoip2.c:35:0:
/usr/include/varnish/vrt.h:156:8: error: redefinition of 'struct vrt_type'
struct vrt_type {
^~~~
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_geoip2.c:33:
/usr/include/varnish/vrt.h:156:8: note: originally defined here
struct vrt_type {
^~~~
In file included from vmod_geoip2.c:35:0:
/usr/include/varnish/vrt.h:170:8: error: redefinition of 'struct vrt_ctx'
struct vrt_ctx {
^~~
In file included from /usr/include/varnish/cache/cache.h:45:0,
from vmod_geoip2.c:33:
/usr/include/varnish/vrt.h:170:8: note: originally defined here
Which branch are you using?
And what is the latest varnish5 you are referring to?
Both master branches of geoip2 and varnish.
You need the devel branch for Varnish master (it's in the README).
Thanks a lot. Closing this.
Hello,
I exported varnish5 src dir like export PKG_CONFIG_PATH=/home/ec2-user/varnish5 (varnishapi.pc inside that dir)
then i run ./autogen.sh [root@ip-172-31-34-46 libvmod-geoip2]# ./autogen.sh autoreconf: Entering directory
.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal -I /usr/share/aclocal --force -I m4 -I ${VARNISH_DATAROOT}/aclocal autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR,
build-aux'. libtoolize: copying filebuild-aux/ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIR,
m4'. libtoolize: copying filem4/libtool.m4' libtoolize: copying file
m4/ltoptions.m4' libtoolize: copying filem4/ltsugar.m4' libtoolize: copying file
m4/ltversion.m4' libtoolize: copying filem4/lt~obsolete.m4' autoreconf: running: /usr/bin/autoconf --include=/usr/share/aclocal --force autoreconf: running: /usr/bin/autoheader --include=/usr/share/aclocal --force autoreconf: running: automake --add-missing --copy --force-missing autoreconf: Leaving directory
.'and then [root@ip-172-31-34-46 libvmod-geoip2]# ./configure configure: error: varnish.m4 is required.
Where i need to put varnish.m4 to compile geoip2?
Thanks.