Closed mss closed 7 years ago
Looks like the correct paths were detected but are never used in the generated Makefile
:
VARNISHAPI_BINDIR = /usr/bin
VARNISHAPI_CFLAGS = -I/usr/include/varnish
VARNISHAPI_DATAROOTDIR = /usr/share
VARNISHAPI_LIBDIR = /usr/lib64
VARNISHAPI_LIBS = -lvarnishapi
VARNISHAPI_PREFIX = /usr
VARNISHAPI_SBINDIR = /usr/sbin
VARNISHAPI_VCLDIR = /usr/share/varnish/vcl
VARNISHAPI_VMODDIR = /usr/lib64/varnish/vmods
VARNISH_LIBRARY_PATH = /usr/lib64:/usr/lib64/varnish
VARNISH_TEST_PATH = /usr/sbin:/usr/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
VARNISH_VERSION = 5.1.1
Thanks for the detailed report, can you please attach (not paste) the full src/Makefile
? That's where VMODs are actually installed the rules to install VMODs are.
edit: tried to clarify.
Sure, here it is: Makefile.txt (I had to rename it to .txt to be allowed to upload it.)
I found the problem, but my recommended workaround would be: ./configure --prefix=/usr
(or ./configure --libdir=/usr/lib64
)
The problem with inheriting the prefix from Varnish is that it happens after your system checked whether there's a ${prefix}/share/config.site
file where (at least on my system) the multi-lib path is handled.
Thanks for the workaround, I guess ./configure --libdir=/usr/lib64
is the way I'll use for now since the rest is picked up properly.
For the latter one: Shouldn't a
vmoddir = $(VARNISHAPI_VMODDIR)
in src/Makefile.am
help? The result looked good in my quick test but I don't know about the side effects.
The reason why $(VARNISHAPI_VMODDIR)
isn't used directly is because the VMOD will inherit the prefix from Varnish if it wasn't set on the ./configure
command line. So you could build against a Varnish installation somewhere in /opt
for example on a build host, in order to install the module in /usr
on a production host.
On Fedora 25 if I run ./configure --prefix=/usr
I get the expected vmoddir
but it doesn't appear to be the case on rhel-like systems according to your report (I suspected so, this is why I also suggested --libdir
as an alternative, I know rhel is lagging behind.) However on such systems this wouldn't be a problem if you were building an RPM using the standard %configure
macro for example.
This will be fixed in Varnish 5.1.2 (see varnishcache/varnish-cache@bc2ea2c) and we will use this version to build the next release. In the mean time the workaround is to set the --libdir
at configure time.
Apologies for the inconvenience.
Environment
This is
CentOS Linux release 7.3.1611 (Core)
.I installed Varnish 5.1.1 from packages and varnish-modules from source (I tried both 0.11.0 and master):
Result
When I now try to use eg. the cookie VMOD, I get:
Workaround
When I symlink the
so
s andla
s from/usr/lib/varnish/vmods
to/usr/lib64/varnish/vmods
Varnish starts fine.Full Output