Closed gsdevme closed 6 years ago
@gsdevme, apologies for the late reply! Thank you for taking the time to surface this issue!
I'll have a look at this and try to get back to you tomorrow. At first glance, it appears you've got everything right and I may have introduced an error into one of the m4 macros.
In the meantime, can you confirm that /usr/include/varnish
in your example points to a varnish source, which has been configured and compiled? (The VARNISHSRC
path has to point to the actual root directory of the varnish source, not the header directory which is the output of make install
).
If this turns out to be the issue and you found the documentation ambiguous/confusing in this regard, please do not hesitate to say so and I'll try to update the language to make this distinction more apparent.
Thanks again! -Andrew
Oh, regarding Travis tests: Yes, and this is long overdue. The effort involved is minimal. I'll see what I can do about getting some time allocated to set this up and get back to you.
Thanks!
Hey thanks for getting back to me @andrew-canaday
I can submit a PR for adding Travis with different platforms (CentOS/Ubuntu/Debian) via KitchenCI then we can if there is some specific issue with a platform or my error it will be visible.
Having a look at this today. Will also have a peek at the pull request (thank you!), but going to address them separately.
In the meantime, toward diagnosing the issue you're experiencing, any chance you can post back with the output of ls /usr/include/varnish
?
The contents is on the PR
Sent from my iPhone
On 1 Feb 2018, at 18:29, Andrew Canaday notifications@github.com wrote:
Having a look at this today. Will also have a peek at the pull request (thank you!), but going to address them separately.
In the meantime, toward diagnosing the issue you're experiencing, any chance you can post back with the output of ls /usr/include/varnish?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Aha! Gotcha, thank you! So it appears you are building against the varnish includes, not the varnish source. Try the following:
#!/usr/bin/env bash
# Download and extract varnish:
wget https://github.com/varnishcache/varnish-cache/archive/varnish-4.1.9.tar.gz
tar -xzf ./varnish-4.1.9.tar.gz
pushd ./varnish-cache-varnish-4.1.9/
# Save VARNISHSRC path for use later:
export VARNISHSRC="${PWD}"
# Configure and build:
# NOTE: you can skip the "make install" if you're working on a system
# which already has this version of varnish installed somewhere
# where the runtime library loader will find libvmod.so.
./autogen.sh && ./configure && make && make install && popd
# Exit directory and cd into your libvmod-queryfilter directory:
cd ./libvmod-queryfilter
./autogen.sh && ./configure VARNISHSRC="${VARNISHSRC}" && make && make check
# EOF
I'll update the documentation to make this more clear. :D
Interesting, I will check later tonight (GMT). Thanks though, I will update the PR also
Sent from my iPhone
On 1 Feb 2018, at 18:48, Andrew Canaday notifications@github.com wrote:
Aha! Gotcha, thank you! So it appears you are building against the varnish includes, not the varnish source. Try the following:
!/usr/bin/env bash
Download and extract varnish:
wget https://github.com/varnishcache/varnish-cache/archive/varnish-4.1.9.tar.gz tar -xzf ./varnish-4.1.9.tar.gz pushd ./varnish-cache-varnish-4.1.9/
Save VARNISHSRC path for use later:
export VARNISHSRC="${PWD}"
Configure and build:
./autogen.sh && ./configure && make && make install && popd
Exit directory and cd into your libvmod-queryfilter directory:
cd ./libvmod-queryfilter ./autogen.sh && ./configure VARNISHSRC="${VARNISHSRC}" && make && make check
EOF
I'll update the documentation to make this more clear. :D
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Closing this; will have a look at the PR after the update. Thanks!
Re-opened, because it appears the problem is persisting.
checking for size_t... yes
checking for strchr... yes
./configure: line 15018: syntax error near unexpected token `fi'
./configure: line 15018: `fi'
[root@2ae92a8cd72b build]# sed -n 14900,15100p ./configure
;;
*)
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$PATH:$VARNISHSRC/bin/varnishtest"
for as_dir in $as_dummy
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_VARNISHTEST="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS
;;
esac
fi
VARNISHTEST=$ac_cv_path_VARNISHTEST
if test -n "$VARNISHTEST"; then
{ $as_echo "$as_me:$LINENO: result: $VARNISHTEST" >&5
$as_echo "$VARNISHTEST" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
fi
if test "x$VARNISHTEST" != "x"; then
{ $as_echo "$as_me:$LINENO: checking Varnish Cache VMOD dir" >&5
$as_echo_n "checking Varnish Cache VMOD dir... " >&6; }
# If not explicitly set, attempt to determine vmoddir via pkg-config
if test "x$VMOD_DIR" = "x"; then
_vmoddir=`PKG_CONFIG_PATH="${VARNISHSRC}:${PKG_CONFIG_PATH}" $PKG_CONFIG varnishapi --variable=vmoddir`
if test "x$_vmoddir" != "x"; then
{ $as_echo "$as_me:$LINENO: result: $_vmoddir" >&5
$as_echo "$_vmoddir" >&6; }
VMOD_DIR=$_vmoddir
# Check for vmodtool.py (varnish 4.x):
vmodtool_path=$VARNISHSRC/lib/libvcc/vmodtool.py
as_ac_File=`$as_echo "ac_cv_file_$vmodtool_path" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $vmodtool_path" >&5
$as_echo_n "checking for $vmodtool_path... " >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
{ { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "$vmodtool_path"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
ac_res=`eval 'as_val=${'$as_ac_File'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_File'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
VMODTOOL=$vmodtool_path
else
# Check for vmod.py (varnish 3.x):
vmod_py_path=$VARNISHSRC/lib/libvmod_std/vmod.py
as_ac_File=`$as_echo "ac_cv_file_$vmod_py_path" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $vmod_py_path" >&5
$as_echo_n "checking for $vmod_py_path... " >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
{ { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "$vmod_py_path"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
ac_res=`eval 'as_val=${'$as_ac_File'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_File'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
VMODTOOL=$vmod_py_path
else
fi
fi
else
{ $as_echo "$as_me:$LINENO: result: not found" >&5
$as_echo "not found" >&6; }
{ { $as_echo "$as_me:$LINENO: error: \"$VARNISHSRC missing or not built.\"" >&5
$as_echo "$as_me: error: \"$VARNISHSRC missing or not built.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
else
{ { $as_echo "$as_me:$LINENO: error: \"$VARNISHSRC missing or not built.\"" >&5
$as_echo "$as_me: error: \"$VARNISHSRC missing or not built.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
else
{ $as_echo "$as_me:$LINENO: result: not found" >&5
$as_echo "not found" >&6; }
{ { $as_echo "$as_me:$LINENO: error: \"$VARNISHSRC missing or not built.\"" >&5
$as_echo "$as_me: error: \"$VARNISHSRC missing or not built.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
fi
else
{ { $as_echo "$as_me:$LINENO: error: \"$VARNISHSRC missing or not built.\"" >&5
$as_echo "$as_me: error: \"$VARNISHSRC missing or not built.\"" >&2;}
{ (exit 1); exit 1; }; }
fi
cat >>confdefs.h <<_ACEOF
#define VARNISH_API_MAJOR $VARNISH_API_MAJOR
_ACEOF
if test "x$VARNISH_API_MAJOR" = "x3"; then
VARNISHSRC_3_X_TRUE=
VARNISHSRC_3_X_FALSE='#'
else
VARNISHSRC_3_X_TRUE='#'
VARNISHSRC_3_X_FALSE=
fi
if test "x$VARNISH_API_MAJOR" = "x4"; then
@andrew-canaday
Hey any chance the above highlights anything obvious?
@gsdevme Apologies (again) for the delay. The sluggish responses have been something of an aberration. Thank you for your patience.
I will have a look and get back to you Monday/Tuesday this week.
@gsdevme Looks like there was an empty case in the configure script (sorry for your troubles, but thank you for surfacing this!).
I pushed an update to master (specifically commit 5be34...) - give it a go and ping if you run into further issues.
I'll cut a new release this weekend.
Thanks, I will take a look
Hi,
Is there any specific instructions for building on CentOS? Im using the devel files from the official Varnish package. This is with
varnish-4.1.9 revision 5024f60c3a51f537279977989b645e983a946e1a)
I've tried Master and every v2 release.
Is there any appetite to add travis tests? Id be happy to add if I can resolve my above issue. Furthermore packaging some RPM's could be ideal also