Closed tristanbes closed 6 years ago
Hi,
What does dpkg -l | grep varnish
shows?
root@foo:~# dpkg -l | grep varnish
ii varnish 6.1.0-1~stretch amd64 state of the art, high-performance web accelerator
ii varnish-dev 6.1.0-1~stretch amd64 development files for Varnish Cache
(mainly because in despair I installed the dev version first, then the no dev version trying to make it work :D)
Yep, you mixed packages from testing
and stable
. The varnish-modules
package comes from the stretch
distribution and isn't provided in testing
yet, according to packages.debian.org.
Basically, you need to downgrade to varnish=5.0.0-7+deb9u2
:-)
Thomas
So I can install stable varnish 6.1 from official repositories (https://packagecloud.io/varnishcache/varnish61/debian/
) But I can't install varnish-modules
from the same repositories ?
So basically I need:
varnish-modules
or There's no other way ? Why varnish doesn't provide modules
through their official repository ? It's stupid to downgrade 3 version back just to be able to install something though apt
:/
I would strongly discourage installing any Varnish 5.x version. They are not supported and contains a fair amount of bugs that will never be fixed. You should definitely compile the modules from source.
I agree, but why are they not provided in an easy install way such as apt-get install
through official packages ?
Compile by hand, meh :(
Right now make
is failing, and I got no clue why. And this is exaclty why I don't want anything with building myself the source. I'm not a sysadmin engineer. Anyone should be able to install this :(
I followed the steps on the repo readme. I used the 0.15.0 tag. configure
output can be found there.
./bootstrap # If running from git.
./configure
make <----- FAILING.
make check # optional
sudo make install
make[1]: Entering directory '/tmp/varnish-modules'
Making all in src
make[2]: Entering directory '/tmp/varnish-modules/src'
CC vmod_saintmode.lo
vmod_saintmode.c: In function ‘healthy’:
vmod_saintmode.c:272:17: error: ‘const struct director’ has no member named ‘healthy’
return (sm->be->healthy(sm->be, bo, changed));
^~
vmod_saintmode.c:285:25: error: ‘const struct director’ has no member named ‘healthy’
return (retval ? sm->be->healthy(sm->be, bo, changed) : 0);
^~
vmod_saintmode.c: In function ‘vmod_saintmode__init’:
vmod_saintmode.c:346:10: error: ‘struct director’ has no member named ‘resolve’
sm->sdir->resolve = resolve;
^~
vmod_saintmode.c:347:10: error: ‘struct director’ has no member named ‘healthy’
sm->sdir->healthy = healthy;
^~
vmod_saintmode.c:352:10: error: ‘struct director’ has no member named ‘name’
sm->sdir->name = "saintmode";
^~
vmod_saintmode.c: In function ‘healthy’:
vmod_saintmode.c:286:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
Makefile:918: recipe for target 'vmod_saintmode.lo' failed
make[2]: *** [vmod_saintmode.lo] Error 1
make[2]: Leaving directory '/tmp/varnish-modules/src'
Makefile:541: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/tmp/varnish-modules'
Makefile:452: recipe for target 'all' failed
make: *** [all] Error 2
We don't support 6.1 yet. There is #119 but we want to keep compatibility for the branches we maintain.
Thanks for this info. Maybe it's worth adding this information somewhere in the README of the repository ?
Since 6.1 is stable I excepted compatibility with this official repository too
By the way @Dridi, I don't get why you don't support your own stable version. "We want to keep compatibility for the branch we maintain". You can tag a BC break and start on a new major and maintain that branch too.
BTW, I cannot compile the varnish modules using that fork too. So what choice are left ? downgrade to 6.0 ? (which is stupid, because feature and patch that are inside 6.1 won't be in 6.0)
6.1 is not a supported release, 6.0 and 4.1 are. If you really need Varnish 6.1 for its new features and varnish-modules, please wait until we take the changes from #119 in a way that maintains compatibility with branches we care about. I'm sorry that it's taking too long but we will eventually merge it (not in its current form).
We do not wish to maintain multiple branches and parallel releases of varnish-modules.
Ok then, let's try downgrading to 6.0, thanks.
Well @Dridi : Compiling 0.15.0 with varnish 6.0.1 isn't working....
root@yprox:/tmp/varnish-modules# make install
Making install in src
make[1]: Entering directory '/tmp/varnish-modules/src'
GEN vmod_bodyaccess.3
GEN vmod_cookie.3
GEN vmod_header.3
GEN vmod_saintmode.3
GEN vmod_tcp.3
GEN vmod_var.3
GEN vmod_vsthrottle.3
GEN vmod_xkey.3
make[2]: Entering directory '/tmp/varnish-modules/src'
make[2]: Nothing to be done for 'install-exec-am'.
GEN vmod_bodyaccess.3
GEN vmod_cookie.3
GEN vmod_header.3
GEN vmod_saintmode.3
GEN vmod_tcp.3
GEN vmod_var.3
GEN vmod_vsthrottle.3
GEN vmod_xkey.3
/bin/mkdir -p '/usr/share/man/man3'
/usr/bin/install -c -m 644 ./vmod_bodyaccess.3 ./vmod_cookie.3 ./vmod_header.3 ./vmod_saintmode.3 ./vmod_tcp.3 ./vmod_var.3 ./vmod_vsthrottle.3 ./vmod_xkey.3 '/usr/share/man/man3'
/usr/bin/install: cannot stat './vmod_bodyaccess.3': No such file or directory
/usr/bin/install: cannot stat './vmod_cookie.3': No such file or directory
/usr/bin/install: cannot stat './vmod_header.3': No such file or directory
/usr/bin/install: cannot stat './vmod_saintmode.3': No such file or directory
/usr/bin/install: cannot stat './vmod_tcp.3': No such file or directory
/usr/bin/install: cannot stat './vmod_var.3': No such file or directory
/usr/bin/install: cannot stat './vmod_vsthrottle.3': No such file or directory
/usr/bin/install: cannot stat './vmod_xkey.3': No such file or directory
Makefile:927: recipe for target 'install-man3' failed
make[2]: *** [install-man3] Error 1
make[2]: Leaving directory '/tmp/varnish-modules/src'
Makefile:1223: recipe for target 'install-am' failed
make[1]: *** [install-am] Error 2
make[1]: Leaving directory '/tmp/varnish-modules/src'
Makefile:537: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
More logs here: https://gist.github.com/tristanbes/11c71efcb785d184f79fcfe9166aba63
try to git clean -dxf
first, I just tried in a clean centos:7
container, it works
@gquintard / @Dridi I keep trying on fresh Debian 9.5 each time it fails on master branch or tagged version. (varnish-dev version 6.0.1-1~stretch)
The complete logs of each steps are here: https://gist.github.com/tristanbes/70a5ae181f764d967935856ae7f8758b
Instead of building from git and running the bootstrap script, can you try from a release archive and running the configure script ?
From my phone
got it: you are lacking python-docutils
, this Dockerfile works:
FROM debian:9.5
RUN apt-get update -y && \
apt-get install -y build-essential automake libtool curl git python-docutils && \
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish60/script.deb.sh | bash && \
apt-get install -y varnish-dev && \
git clone https://github.com/varnish/varnish-modules.git /tmp/vm && \
cd /tmp/vm && \
./bootstrap && \
./configure && \
make && \
make check && \
make install
Reopening, I'd like an answer to my question from @tristanbes before moving #125 forward.
Since the answer at @gquintard fixed the problem, I didn't took more time to try your solution. I spent too much time on this and lost my patience.
@Dridi @tristanbes Not sure if I've missed something, or this still needs reopening? I see:
rpm -qa | egrep -i "rstman|docutils"
python2-docutils-0.14-lp150.1.3.noarch
python3-docutils-0.14-lp150.1.3.noarch
which rst2man
/usr/bin/rst2man
rpm -q --whatprovides /usr/bin/rst2man
python3-docutils-0.14-lp150.1.3.noarch
rst2man --version
rst2man (Docutils 0.14, Python 3.6.5, on linux)
/usr/local/varnish/sbin/varnishd -V
varnishd (varnish-6.1.0 revision 4684c38ecfc194b4f3b5b81594832dbb197a3bb9)
Copyright (c) 2006 Verdens Gang AS
Copyright (c) 2006-2015 Varnish Software AS
cd varnish6-varnish-modules
git log | head
commit 5c1cee8cf9610e6a580f912665586a42a20b4b53
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
Date: Tue Oct 30 15:43:45 2018 +0100
Bandaid for missing struct tcp_info
Fixes #115 partially.
commit a98defa970af298129c3a9bbada9d01c3952c98f
Author: Dridi Boukelmoune <dridi.boukelmoune@gmail.com>
git clean -dxf
./bootstrap
./configure
make
make all-recursive
make[1]: Entering directory '/usr/local/src/varnish6-varnish-modules'
Making all in src
make[2]: Entering directory '/usr/local/src/varnish6-varnish-modules/src'
VMODTOOL vcc_bodyaccess_if.c
CC vmod_bodyaccess.lo
CC vcc_bodyaccess_if.lo
CCLD libvmod_bodyaccess.la
VMODTOOL vcc_cookie_if.c
CC vmod_cookie.lo
CC vcc_cookie_if.lo
CCLD libvmod_cookie.la
VMODTOOL vcc_header_if.c
CC vmod_header.lo
CC vcc_header_if.lo
CCLD libvmod_header.la
VMODTOOL vcc_saintmode_if.c
CC vmod_saintmode.lo
vmod_saintmode.c: In function ‘healthy’:
vmod_saintmode.c:272:17: error: ‘const struct director’ has no member named ‘healthy’
return (sm->be->healthy(sm->be, bo, changed));
^~
vmod_saintmode.c:285:25: error: ‘const struct director’ has no member named ‘healthy’
return (retval ? sm->be->healthy(sm->be, bo, changed) : 0);
^~
vmod_saintmode.c: In function ‘vmod_saintmode__init’:
vmod_saintmode.c:346:10: error: ‘struct director’ has no member named ‘resolve’
sm->sdir->resolve = resolve;
^~
vmod_saintmode.c:347:10: error: ‘struct director’ has no member named ‘healthy’
sm->sdir->healthy = healthy;
^~
vmod_saintmode.c:352:10: error: ‘struct director’ has no member named ‘name’
sm->sdir->name = "saintmode";
^~
vmod_saintmode.c: In function ‘healthy’:
vmod_saintmode.c:286:1: error: control reaches end of non-void function [-Werror=return-type]
}
^
cc1: all warnings being treated as errors
make[2]: *** [Makefile:931: vmod_saintmode.lo] Error 1
make[2]: Leaving directory '/usr/local/src/varnish6-varnish-modules/src'
make[1]: *** [Makefile:536: all-recursive] Error 1
make[1]: Leaving directory '/usr/local/src/varnish6-varnish-modules'
make: *** [Makefile:447: all] Error 2
@pgd151 you missed #119, we don't support 6.1 yet.
Hello,
I'm sorry since it sound like a dumb question but, I don't find a way to install
varnish-modules
.I have Varnish 6.1 installed with your official repository (
deb https://packagecloud.io/varnishcache/varnish61/debian/ stretch main
) I tried:apt-get install varnish-modules
on debian 9 but it gives:I tried to install
varnish-dev
but the vmod lib has noxkey
extension.So, what's the correct way to install this to have
xkey
module with varnish 6.1 without needing to compile it manually ?Thanks.