Closed RandyCupic closed 4 years ago
It looks like it cannot find the dev headers. Can you provide the output of these commands:
find / -type f -name vsha256.h 2> /dev/null
dpkg-query -L varnish-dev
grep -A4 vsha256 config.log
Run the last one in the varnish-modules
directory.
Hi @rezan. Here you go:
➜ varnish-modules git:(19b479a) find / -type f -name vsha256.h 2> /dev/null
/usr/include/varnish/vsha256.h
➜ varnish-modules git:(19b479a) dpkg-query -L varnish-dev
/.
/usr
/usr/include
/usr/include/varnish
/usr/include/varnish/cache
/usr/include/varnish/cache/cache.h
/usr/include/varnish/cache/cache_backend.h
/usr/include/varnish/cache/cache_director.h
/usr/include/varnish/cache/cache_filter.h
/usr/include/varnish/cache/cache_varnishd.h
/usr/include/varnish/common
/usr/include/varnish/common/common_param.h
/usr/include/varnish/miniobj.h
/usr/include/varnish/tbl
/usr/include/varnish/tbl/acct_fields_bereq.h
/usr/include/varnish/tbl/acct_fields_req.h
/usr/include/varnish/tbl/backend_poll.h
/usr/include/varnish/tbl/ban_vars.h
/usr/include/varnish/tbl/bo_flags.h
/usr/include/varnish/tbl/boc_state.h
/usr/include/varnish/tbl/body_status.h
/usr/include/varnish/tbl/cli_cmds.h
/usr/include/varnish/tbl/debug_bits.h
/usr/include/varnish/tbl/feature_bits.h
/usr/include/varnish/tbl/h2_error.h
/usr/include/varnish/tbl/h2_frames.h
/usr/include/varnish/tbl/h2_settings.h
/usr/include/varnish/tbl/h2_stream.h
/usr/include/varnish/tbl/htc.h
/usr/include/varnish/tbl/http_headers.h
/usr/include/varnish/tbl/http_response.h
/usr/include/varnish/tbl/locks.h
/usr/include/varnish/tbl/obj_attr.h
/usr/include/varnish/tbl/oc_exp_flags.h
/usr/include/varnish/tbl/oc_flags.h
/usr/include/varnish/tbl/params.h
/usr/include/varnish/tbl/req_body.h
/usr/include/varnish/tbl/req_flags.h
/usr/include/varnish/tbl/sess_attr.h
/usr/include/varnish/tbl/sess_close.h
/usr/include/varnish/tbl/steps.h
/usr/include/varnish/tbl/symbol_kind.h
/usr/include/varnish/tbl/vcc_types.h
/usr/include/varnish/tbl/vcl_returns.h
/usr/include/varnish/tbl/vcl_states.h
/usr/include/varnish/tbl/vhd_fsm.h
/usr/include/varnish/tbl/vhd_fsm_funcs.h
/usr/include/varnish/tbl/vhd_return.h
/usr/include/varnish/tbl/vhp_huffman.h
/usr/include/varnish/tbl/vhp_static.h
/usr/include/varnish/tbl/vrt_stv_var.h
/usr/include/varnish/tbl/vsc_levels.h
/usr/include/varnish/tbl/vsl_tags.h
/usr/include/varnish/tbl/vsl_tags_http.h
/usr/include/varnish/tbl/waiters.h
/usr/include/varnish/vapi
/usr/include/varnish/vapi/vapi_options.h
/usr/include/varnish/vapi/voptget.h
/usr/include/varnish/vapi/vsc.h
/usr/include/varnish/vapi/vsl.h
/usr/include/varnish/vapi/vsl_int.h
/usr/include/varnish/vapi/vsm.h
/usr/include/varnish/vas.h
/usr/include/varnish/vav.h
/usr/include/varnish/vbm.h
/usr/include/varnish/vcl.h
/usr/include/varnish/vcli.h
/usr/include/varnish/vcs.h
/usr/include/varnish/vdef.h
/usr/include/varnish/vmod_abi.h
/usr/include/varnish/vqueue.h
/usr/include/varnish/vre.h
/usr/include/varnish/vrnd.h
/usr/include/varnish/vrt.h
/usr/include/varnish/vrt_obj.h
/usr/include/varnish/vsa.h
/usr/include/varnish/vsb.h
/usr/include/varnish/vsha256.h
/usr/include/varnish/vtcp.h
/usr/include/varnish/vtim.h
/usr/include/varnish/vtree.h
/usr/include/varnish/vut.h
/usr/include/varnish/vut_options.h
/usr/include/varnish/waiter
/usr/include/varnish/waiter/waiter.h
/usr/lib
/usr/lib/pkgconfig
/usr/lib/pkgconfig/varnishapi.pc
/usr/share
/usr/share/aclocal
/usr/share/aclocal/varnish-legacy.m4
/usr/share/aclocal/varnish.m4
/usr/share/doc
/usr/share/doc/varnish-dev
/usr/share/doc/varnish-dev/changelog.Debian.gz
/usr/share/doc/varnish-dev/copyright
/usr/share/varnish
/usr/share/varnish/vmodtool.py
/usr/share/varnish/vsctool.py
➜ varnish-modules git:(19b479a) grep -A4 vsha256 config.log
configure:10496: checking vsha256.h usability
configure:10496: gcc -c -g -O2 -I/usr/local/include/varnish conftest.c >&5
conftest.c:58:10: fatal error: vsha256.h: No such file or directory
58 | #include <vsha256.h>
| ^~~~~~~~~~~
compilation terminated.
configure:10496: $? = 1
configure: failed program was:
--
| #include <vsha256.h>
configure:10496: result: no
configure:10496: checking vsha256.h presence
configure:10496: gcc -E -I/usr/local/include/varnish conftest.c
conftest.c:25:10: fatal error: vsha256.h: No such file or directory
25 | #include <vsha256.h>
| ^~~~~~~~~~~
compilation terminated.
configure:10496: $? = 1
configure: failed program was:
--
| #include <vsha256.h>
configure:10496: result: no
configure:10496: checking for vsha256.h
configure:10496: result: no
configure:10503: error: Missing Varnish development files.
## ---------------- ##
--
ac_cv_header_vsha256_h=no
ac_cv_host=x86_64-pc-linux-gnu
ac_cv_lib_dl_dlopen=yes
ac_cv_lib_dld_shl_load=no
ac_cv_objext=o
Well, the problem is that configure
is trying to find the headers in /usr/local/include/varnish
and not /usr/include/varnish
.
Can you provide the contents of: /usr/lib/pkgconfig/varnishapi.pc
Here:
➜ ~ cat /usr/lib/pkgconfig/varnishapi.pc
prefix=/usr
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
libdir=/usr/lib
sysconfdir=/etc
pkgsysconfdir=${sysconfdir}/varnish
includedir=${prefix}/include
pkgincludedir=${includedir}/varnish
datarootdir=${prefix}/share
datadir=${datarootdir}
pkgdatadir=${datadir}/varnish
vcldir=${pkgdatadir}/vcl
vmoddir=${libdir}/varnish/vmods
vmodtool=${pkgdatadir}/vmodtool.py
vsctool=${pkgdatadir}/vsctool.py
Name: VarnishAPI
Description: Varnish API
Version: 6.0.6
Cflags: -I${includedir}/varnish
Libs: -L${libdir} -lvarnishapi
Well, that looks correct. Did you ever compile and install varnish from source? That could explain the local
injection... If so, you would have to remove that installation, ex: make uninstall
.
Can I see this command:
find / -type f -name varnishapi.pc 2> /dev/null
@rezan That was it, thank you :) I tried to install Varnish on many ways, including compiling it from source and ended on installing it from repositories (through some adjustments because Ubuntu 20.04 comes with Varnish 6.2 and I needed 6.0 explicitly). The last command that you provided showed me that I had two varnishapi.pc
files; one in /usr/lib/pkgconfig
and the other one in /usr/local/lib/pkgconfig
. Deleting this other one solved the problem.
I actually tried to find all files containing varnish
on the filesystem and delete them before but I obviously messed up the regex and somehow overlooked this one.
Thank you so much for your help :) now everything works as it should.
Excellent!
Hi,
I'm trying to install Varnish modules for Varnish 6.0.6 but
./configure
keeps failing withconfigure: error: Missing Varnish development files.
.varnishd -V
dpkg -l | grep varnish
I tried tag
0.15.0
and branch6.0-lts
which are supposed to be for Varnish 6.0. My procedure for compiling varnish modules:./bootstrap
./configure
And then of course
make
fails withmake: *** No targets specified and no makefile found. Stop.
I tried many solutions that I've found online, I tried to reinstall varnish and varnish-dev, but no help. I'm running out of ideas. The weirdest thing is that it worked before, with the same modules tag and same Varnish version, but I had some other issues so I decided to remove and clean everything and then start from scratch. My colleague also managed to install this on his virtual machine (the same Ubuntu 20.04 version as mine) with the same procedure without issues.
What am I missing?