nigoroll / libvmod-dynamic

The Varnish dns/named director continued
BSD 2-Clause "Simplified" License
95 stars 34 forks source link

`configure` doesn't read `libdir` from `varnishapi.pc` #73

Closed VasiliPupkin256 closed 2 years ago

VasiliPupkin256 commented 2 years ago

I see the variable is read in the scripts but it seems that it is only used for testing. When I run configure/make/install of the version 2.3.1 on Ubuntu 21.04 it tries to install module in /usr/lib/varnish/vmods instead of /usr/lib/x86_64-linux-gnu/varnish/vmods where it belongs on this repo. I've solved this with this hack

./configure --without-getdns \
--prefix=$(pkg-config --variable=prefix varnishapi) \
--bindir=$(pkg-config --variable=bindir varnishapi) \
--sbindir=$(pkg-config --variable=sbindir varnishapi) \
--sysconfdir=$(pkg-config --variable=sysconfdir varnishapi) \
--libdir=$(pkg-config --variable=libdir varnishapi)

But of course I don't like it.

PS: I've tried to set PKG_CONFIG_PATH it doesn't change anything.

nigoroll commented 2 years ago

The installation destination is vmoddir, which defaults to ${libdir}/varnish/vmods. I suspect there is something fishy with your varnishapi.pc (e.g. not using the pc file which you think you are) or some kind of override is active. To be sure that the installation is working as intended, I changed libdir in my varnishapi.pc

libdir=/tmp/yo/lib

and indeed the installation went to /tmp/yo/lib/varnish/vmods.