Bug 260039

Summary: net/haproxy: Fails to build with OPENSSL=off: error: no member named 'ssl_ctx' in 'struct server'
Product: Ports & Packages Reporter: iron.udjin
Component: Individual Port(s)Assignee: Dmitry Sivachenko <demon>
Status: Closed FIXED    
Severity: Affects Some People Keywords: needs-qa
Priority: --- Flags: bugzilla: maintainer-feedback? (demon)
koobs: merge-quarterly?
Version: Latest   
Hardware: amd64   
OS: Any   
Description Flags
build log none

Description iron.udjin 2021-11-25 04:12:26 UTC
OS: 13.0-RELEASE-p4


Options        :
	DOCS           : on
	DPCRE          : off
	EXAMPLES       : on
	LUA            : off
	OPENSSL        : off
	PROMEX         : off
	SPCRE          : on

  CC      src/backend.o
  CC      src/stick_table.o
src/server.c:207:51: error: no member named 'ssl_ctx' in 'struct server'
        if (srv->mux_proto || srv->use_ssl != 1 || !srv->ssl_ctx.alpn_str) {
                                                    ~~~  ^
src/server.c:241:37: error: no member named 'ssl_ctx' in 'struct server'
                const struct ist alpn = ist2(srv->ssl_ctx.alpn_str,
                                             ~~~  ^
src/server.c:242:37: error: no member named 'ssl_ctx' in 'struct server'
                                             ~~~  ^
  CC      src/cfgparse.o
3 errors generated.
gmake[2]: *** [Makefile:954: src/server.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory '/usr/ports/net/haproxy/work-default/haproxy-2.4.9'
===> Compilation failed unexpectedly.

It builds fine when OPENSSL is on.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2021-11-25 04:55:38 UTC
Looks like SSL support isn't deactivated in the OPENSSL=off case?

Can you attach a full build log, compressed if necessary. Thank you
Comment 2 iron.udjin 2021-11-25 04:58:39 UTC
Created attachment 229717 [details]
build log
Comment 3 commit-hook freebsd_committer 2021-11-25 10:35:27 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=75c909d32bab18640edba5bd2f6a77b8afbbb86a

commit 75c909d32bab18640edba5bd2f6a77b8afbbb86a
Author:     Dmitry Sivachenko <demon@FreeBSD.org>
AuthorDate: 2021-11-25 10:31:14 +0000
Commit:     Dmitry Sivachenko <demon@FreeBSD.org>
CommitDate: 2021-11-25 10:34:15 +0000

    net/haproxy: fix build with OpenSSL turned off.

    PR: 260039
    Reported by: iron.udjin@gmail.com

 ...NUP-servers-do-not-include-openssl-compat (new) |  78 ++++++++++
 ...ver-always-include-the-storage-for-SSL-se (new) | 163 +++++++++++++++++++++
 2 files changed, 241 insertions(+)
Comment 4 Dmitry Sivachenko freebsd_committer 2021-11-25 10:36:09 UTC
I committed patches obtained from authors to fix the problem.
They will be included in next haproxy release.

Thanks for report.