Bug 259734 - net/mosquitto: Fails to build with security/libressl 3.4.1: options.c:400:32: error: incomplete definition of type 'struct ssl_ctx_st'
Summary: net/mosquitto: Fails to build with security/libressl 3.4.1: options.c:400:32:...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL: https://github.com/eclipse/mosquitto/...
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2021-11-09 12:28 UTC by Ivan Rozhuk
Modified: 2021-11-10 20:48 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (brnrd)
koobs: merge-quarterly?


Attachments
patch (1.60 KB, patch)
2021-11-09 18:26 UTC, Ivan Rozhuk
no flags Details | Diff
patch (1.31 KB, patch)
2021-11-09 20:59 UTC, Ivan Rozhuk
rozhuk.im: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Rozhuk 2021-11-09 12:28:56 UTC
FAILED: lib/CMakeFiles/libmosquitto.dir/options.c.o 
/usr/local/libexec/ccache/cc -DCMAKE -DVERSION=\"2.0.10\" -DWITH_EC -DWITH_SOCKS -DWITH_THREADING -DWITH_TLS -DWITH_TLS_PSK -DWITH_UNIX_SOCKETS -Dlibmosquitto_EXPORTS -I/usr/local/include -I/tmp/ports/usr/ports/net/mosquitto/work/mosquitto-2.0.10 -I/tmp/ports/usr/ports/net/mosquitto/work/mosquitto-2.0.10/lib -I/tmp/ports/usr/ports/net/mosquitto/work/mosquitto-2.0.10/include -I/tmp/ports/usr/ports/net/mosquitto/work/mosquitto-2.0.10/deps -O2 -pipe -O3 -pipe -funroll-loops -DSTRIP_FBSDID -D_FORTIFY_SOURCE=2 -mretpoline  -fstack-protector-strong -fno-strict-aliasing  -fdebug-prefix-map=/tmp/ports/usr/ports/net/mosquitto/work/mosquitto-2.0.10=. -O2 -pipe -O3 -pipe -funroll-loops -DSTRIP_FBSDID -D_FORTIFY_SOURCE=2 -mretpoline  -fstack-protector-strong -fno-strict-aliasing  -fdebug-prefix-map=/tmp/ports/usr/ports/net/mosquitto/work/mosquitto-2.0.10=. -fPIC -MD -MT lib/CMakeFiles/libmosquitto.dir/options.c.o -MF lib/CMakeFiles/libmosquitto.dir/options.c.o.d -o lib/CMakeFiles/libmosquitto.dir/options.c.o -c /tmp/ports/usr/ports/net/mosquitto/work/mosquitto-2.0.10/lib/options.c
../mosquitto-2.0.10/lib/options.c:400:32: error: incomplete definition of type 'struct ssl_ctx_st'
                                CRYPTO_add(&(mosq->ssl_ctx)->references, 1, CRYPTO_LOCK_SSL_CTX);
                                            ~~~~~~~~~~~~~~~^
/usr/local/include/openssl/crypto.h:216:18: note: expanded from macro 'CRYPTO_add'
        CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
                        ^~~~
/usr/local/include/openssl/ossl_typ.h:161:16: note: forward declaration of 'struct ssl_ctx_st'
typedef struct ssl_ctx_st SSL_CTX;
               ^
../mosquitto-2.0.10/lib/options.c:508:32: error: incomplete definition of type 'struct ssl_ctx_st'
                                CRYPTO_add(&(mosq->ssl_ctx)->references, 1, CRYPTO_LOCK_SSL_CTX);
                                            ~~~~~~~~~~~~~~~^
/usr/local/include/openssl/crypto.h:216:18: note: expanded from macro 'CRYPTO_add'
        CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
                        ^~~~
/usr/local/include/openssl/ossl_typ.h:161:16: note: forward declaration of 'struct ssl_ctx_st'
typedef struct ssl_ctx_st SSL_CTX;
               ^
2 errors generated.
Comment 1 Ivan Rozhuk 2021-11-09 18:26:47 UTC
Created attachment 229387 [details]
patch
Comment 2 Ivan Rozhuk 2021-11-09 20:59:30 UTC
Created attachment 229394 [details]
patch

Update to 2.0.13, already contain fix.
https://github.com/eclipse/mosquitto/issues/2198
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-11-09 23:09:19 UTC
If the version update shouldnt be merged to quarterly (feature/abi changes), the build fix should be separately backported and individually committed, so that it can be merged to the quarterly branch
Comment 4 Bernard Spil freebsd_committer freebsd_triage 2021-11-10 20:38:38 UTC
(In reply to Kubilay Kocak from comment #3)
Quarterly still has 3.3 branch of LibreSSL, so a MFH is not required and no backporting as the build is not broken there.
Comment 5 commit-hook freebsd_committer freebsd_triage 2021-11-10 20:46:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4b239d954907d22f263344d280e9f9fea7f65ecf

commit 4b239d954907d22f263344d280e9f9fea7f65ecf
Author:     Bernard Spil <brnrd@FreeBSD.org>
AuthorDate: 2021-11-10 20:42:31 +0000
Commit:     Bernard Spil <brnrd@FreeBSD.org>
CommitDate: 2021-11-10 20:42:31 +0000

    net/mosquitto: Update to 2.0.13

     * Fixes build with LibreSSL 3.4

    PR:             259734
    Reported by:    Ivan Rozhuk <rozhuk im gmail com>
    Approved by:    joe thrallingpenguin com (maintainer)

 net/mosquitto/Makefile | 3 +--
 net/mosquitto/distinfo | 6 +++---
 2 files changed, 4 insertions(+), 5 deletions(-)