varnish / hitch

A scalable TLS proxy by Varnish Software.
https://www.varnish-software.com/
Other
1.87k stars 157 forks source link

build error #349

Closed ioolkos closed 3 years ago

ioolkos commented 3 years ago

./bootstrap && make fails for me for master. Ubuntu 20.04, dependencies should be installed as per the documentation https://github.com/varnish/hitch/blob/master/docs/installation.md

make  all-am
make[3]: Entering directory '/home/afa/hitch/hitch/src'
  CC       hitch-configuration.o
  CC       hitch-hitch.o
hitch.c: In function ‘load_privatekey’:
hitch.c:115:52: error: dereferencing pointer to incomplete type ‘SSL_CTX’ {aka ‘struct ssl_ctx_st’}
  115 | #  define SSL_CTX_get_default_passwd_cb(ctx) ((ctx)->default_passwd_callback)
      |                                                    ^~
hitch.c:725:6: note: in expansion of macro ‘SSL_CTX_get_default_passwd_cb’
  725 |      SSL_CTX_get_default_passwd_cb(ctx),
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hitch.c: In function ‘client_vfy_init’:
hitch.c:955:12: error: dereferencing pointer to incomplete type ‘X509_STORE’ {aka ‘struct x509_store_st’}
  955 |  objs = vfy->objs;
      |            ^~
hitch.c:962:10: error: dereferencing pointer to incomplete type ‘X509_OBJECT’ {aka ‘struct x509_object_st’}
  962 |   crt = o->data.x509;
      |          ^~
hitch.c: In function ‘load_cert_ctx’:
hitch.c:124:51: error: dereferencing pointer to incomplete type ‘X509_NAME_ENTRY’ {aka ‘struct X509_name_entry_st’}
  124 | #  define X509_NAME_ENTRY_get_data(entry) ((entry)->value)
      |                                                   ^~
hitch.c:1257:39: note: in definition of macro ‘PUSH_CTX’
 1257 |    (unsigned char **)&sn->servername, asn1_str); \
      |                                       ^~~~~~~~
hitch.c:1303:11: note: in expansion of macro ‘X509_NAME_ENTRY_get_data’
 1303 |  PUSH_CTX(X509_NAME_ENTRY_get_data(x509_entry), ctx);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:814: hitch-hitch.o] Error 1
make[3]: Leaving directory '/home/afa/hitch/hitch/src'
make[2]: *** [Makefile:612: all] Error 2
make[2]: Leaving directory '/home/afa/hitch/hitch/src'
make[1]: *** [Makefile:530: all-recursive] Error 1
make[1]: Leaving directory '/home/afa/hitch/hitch'
make: *** [Makefile:364: all] Error 2
gquintard commented 3 years ago

Hi,

I have been unable to reproduce, things work as they should with this Dockerfile:

FROM ubuntu:focal
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
    DEBCONF_NONINTERACTIVE_SEEN=true \
    apt-get install -y libev-dev libssl-dev automake python-docutils flex bison pkg-config git make
RUN git clone https://github.com/varnish/hitch.git /tmp/hitch
WORKDIR /tmp/hitch
RUN ./bootstrap && make

(docker build --no-cache -t hitch . to build the image)

the instructions were missing the make package though. I'll close this for now, but if you have a reproducer, please do reopen

ioolkos commented 3 years ago

@gquintard thanks, so this confirms the problem is on my side. Appreciate your testing (work and time on your side!). My make version: (but I don't think a specific make version is required)

➜  Hitch make --version
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
ioolkos commented 3 years ago

@gquintard installation doc recommends a recent OpenSSL. I see a lot of similar errors for various projects, going from OpenSSL 1.0.x to 1.1.x versions a couple years back. Is there an upper OpenSSL version limit for hitch? My version is

➜  hitch git:(master) openssl version               
OpenSSL 1.1.1f  31 Mar 2020

Thanks & a great week! :)

gquintard commented 3 years ago

No that I'm aware of, and in this particular case, 1.1.1f is the openssl version installed in the Dockerfile shared above, so it's definitely not the issue.

ioolkos commented 3 years ago

Got you, thanks.