Bug 235883

Summary: devel/qca does not build with option OPENSSL and ssl=libressl
Product: Ports & Packages Reporter: Miroslav Lachman <000.fbsd>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed FIXED    
Severity: Affects Some People CC: adridg, fluffy, tcberner, zirias
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
poudriere build failure full log
none
fix building 2.2.1_1 with libressl none

Description Miroslav Lachman 2019-02-20 14:23:04 UTC
Created attachment 202186 [details]
poudriere build failure full log

I am using libressl as default SSL for my FreeBSD desktop (PC-BSD based).
qca-qt5 does not build if I have option OPENSSL enabled

/wrkdirs/usr/ports/devel/qca/work-qt5/qca-2.1.3/plugins/qca-ossl/qca-ossl.cpp:2835:4: error: use of undeclared identifier 'RSA_meth_set_sign'; did you mean 'DSA_meth_set_sign'?
                        RSA_meth_set_sign(ops, NULL);
                        ^~~~~~~~~~~~~~~~~
                        DSA_meth_set_sign
/usr/local/include/openssl/dsa.h:275:5: note: 'DSA_meth_set_sign' declared here
int DSA_meth_set_sign(DSA_METHOD *meth,
    ^
/wrkdirs/usr/ports/devel/qca/work-qt5/qca-2.1.3/plugins/qca-ossl/qca-ossl.cpp:2835:22: error: cannot initialize a parameter of type 'DSA_METHOD *' (aka 'dsa_method *') with an lvalue of type 'RSA_METHOD *' (aka 'rsa_meth_st *')
                        RSA_meth_set_sign(ops, NULL);
                                          ^~~
/usr/local/include/openssl/dsa.h:275:35: note: passing argument to parameter 'meth' here
int DSA_meth_set_sign(DSA_METHOD *meth,
                                  ^
/wrkdirs/usr/ports/devel/qca/work-qt5/qca-2.1.3/plugins/qca-ossl/qca-ossl.cpp:2839:4: error: use of undeclared identifier 'RSA_meth_set_verify'; did you mean 'RSA_meth_set_finish'?
                        RSA_meth_set_verify(ops, NULL); //pkcs11_rsa_verify
                        ^~~~~~~~~~~~~~~~~~~
                        RSA_meth_set_finish
/usr/local/include/openssl/rsa.h:442:5: note: 'RSA_meth_set_finish' declared here
int RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa));
    ^
/wrkdirs/usr/ports/devel/qca/work-qt5/qca-2.1.3/plugins/qca-ossl/qca-ossl.cpp:2860:11: error: use of undeclared identifier 'RSA_F_RSA_OSSL_PRIVATE_DECRYPT'
                        RSAerr(RSA_F_RSA_OSSL_PRIVATE_DECRYPT, RSA_R_UNKNOWN_PADDING_TYPE);
Comment 1 Tobias C. Berner freebsd_committer freebsd_triage 2019-03-30 20:28:05 UTC
Moin moin


kde@ is accepts patches for libressl support but does not write them :)
 


mfg Tobias
Comment 2 Felix Palmen freebsd_committer freebsd_triage 2019-04-07 10:27:25 UTC
Just a quick hint: removing all the openssl-patches makes the build succeed with libressl. So I guess a real solution would be to add a lot of guard macros to the existing patches.

BR, Felix
Comment 3 Felix Palmen freebsd_committer freebsd_triage 2019-05-17 12:25:48 UTC
Created attachment 204428 [details]
fix building 2.2.1_1 with libressl

Attached patch fixes the build
Comment 4 Adriaan de Groot freebsd_committer freebsd_triage 2019-05-19 19:46:33 UTC
I don't get to devel/qca because net/qt5-network won't compile with libressl:

--- .obj/qsslsocket_openssl_symbols.o ---
In file included from ssl/qsslsocket_openssl_symbols.cpp:58:
In file included from ssl/qsslsocket_openssl_symbols_p.h:227:
ssl/qsslsocket_openssl11_symbols_p.h:185:29: error: unknown type name 'BIO_ADDR'
int q_DTLSv1_listen(SSL *s, BIO_ADDR *client);
                            ^
ssl/qsslsocket_openssl11_symbols_p.h:186:1: error: unknown type name 'BIO_ADDR'
BIO_ADDR *q_BIO_ADDR_new();
^


That's with libressl 2.9.1, Qt 5.12.1_1.
Comment 5 Felix Palmen freebsd_committer freebsd_triage 2019-05-20 07:17:41 UTC
I updated my ports tree a few days ago, it has QT5_VERSION = 5.12.2 and net/qt5-network built without any additional patches ...
Comment 6 Felix Palmen freebsd_committer freebsd_triage 2019-05-24 07:29:43 UTC
The patch still works with libressl 2.9.2 on my poudriere builder.
Comment 7 Dima Panov freebsd_committer freebsd_triage 2019-07-29 04:36:42 UTC
Fixed in r506208