Fails to compile 1.7.0 tag from git
aorith opened this issue · 5 comments
Hello,
Compiling hitch from tag 1.7.0
fails when executing make
, a shell script (./build-aux/ylwrap
) apparently doesn't set correctly some variables.
This doesn't happen when fetching the sources from https://hitch-tls.org/source/hitch-1.7.0.tar.gz and running the same commads but ./bootstrap
, so it can be compiled correctly anyway, just wanted to report it in case something needs to be fixed in the git version (or the bootstrap script that the git version includes).
Environment
OS: Debian 10
Kernel: 4.19.0-13
Deps:
libev-dev: 1:4.25-1
automake: 1:1.16.1-4
flex: 2.6.4-6.2
bison: 2:3.3.2.dfsg-1
pkg-config
--> using instead pkgconf: 1.6.0-1
make: 4.2.1-1.2
Steps to reproduce
git clone https://github.com/varnish/hitch.git
git checkout tags/1.7.0
cd hitch && export SSL_CFLAGS="-I/opt/openssl/include -L/opt/openssl/lib" && export SSL_LIBS=-lssl && export CRYPTO_CFLAGS="-I/opt/openssl/include -L/opt/openssl/lib" && export CRYPTO_LIBS=-lcrypto && export C_INCLUDE_PATH=/opt/openssl/include && export LIBRARY_PATH=/opt/openssl/lib
./bootstrap
./configure --prefix=/opt/hitch_1.7.0
make
$ make
make all-recursive
make[1]: Entering directory '/opt/test-hitch/hitch'
Making all in src/util
make[2]: Entering directory '/opt/test-hitch/hitch/src/util'
gcc -DHAVE_CONFIG_H -I. -I../.. -g -O2 -I/opt/openssl/include -L/opt/openssl/lib -I./.. -g -O2 -MT parse_proxy_v2-parse_proxy_v2.o -MD -MP -MF .deps/parse_proxy_v2-parse_proxy_v2.Tpo -c -o parse_proxy_v2-parse_proxy_v2.o `test -f 'parse_proxy_v2.c' || echo './'`parse_proxy_v2.c
mv -f .deps/parse_proxy_v2-parse_proxy_v2.Tpo .deps/parse_proxy_v2-parse_proxy_v2.Po
gcc -g -O2 -I/opt/openssl/include -L/opt/openssl/lib -I./.. -g -O2 -o parse_proxy_v2 parse_proxy_v2-parse_proxy_v2.o
make[2]: Leaving directory '/opt/test-hitch/hitch/src/util'
Making all in src
make[2]: Entering directory '/opt/test-hitch/hitch/src'
test -f cfg_lex.c || /bin/sh ../build-aux/ylwrap cfg_lex.l .c cfg_lex.c --
../build-aux/ylwrap: line 157: shift: shift count out of range
../build-aux/ylwrap: line 175: : command not found
make[2]: *** [Makefile:898: cfg_lex.c] Error 127
make[2]: Leaving directory '/opt/test-hitch/hitch/src'
make[1]: *** [Makefile:528: all-recursive] Error 1
make[1]: Leaving directory '/opt/test-hitch/hitch'
make: *** [Makefile:362: all] Error 2
Hi @aorith,
Can you provide a Dockerfile
reproducing the issue, or maybe share a tarball containing your /opt/openssl
? I'm pretty sure the problem is that you are not using pkgconf
to figure out the SSL compiler flags, so things are only half set up.
Hello @gquintard,
Yes, this Dockerfile fails with the same error message (sorry it has to compile openssl first).
Can you change the following in your build process?
-./bootstrap && ./configure --prefix=/opt/hitch-1.7.0
+./bootstrap --prefix=/opt/hitch-1.7.0
Hi Dridi,
That works, removing alltogether ./configure
as it's called by the bootstrap
script.
This is my mistake, we're upgrading from 1.5.0
and I "failed" to read the documetation properly =)
https://github.com/varnish/hitch/blob/master/docs/installation.md
Note: ./bootstrap calls ./configure, and passes on its parameters.
$ $ docker build . -t test-hitch
[ ... ]
$ docker run --rm test-hitch
1.7.0
hitch 1.7.0
OpenSSL 1.1.1k 25 Mar 2021
Thank you both!
This is my mistake, we're upgrading from
1.5.0
and I "failed" to read the documetation properly =)
Great, that was going to be my next question: do we need to improve the documentation?
If you think it could be improved to make this behavior stand out, we will welcome a pull request.