Bug 234078 - net/qt5-network: Fails update to 5.12 with libressl
Summary: net/qt5-network: Fails update to 5.12 with libressl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-kde (group)
URL: https://reviews.freebsd.org/D18582
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2018-12-16 22:18 UTC by Walter Schwarzenfeld
Modified: 2018-12-25 21:01 UTC (History)
8 users (show)

See Also:
tcberner: maintainer-feedback+


Attachments
qt5-network-error.txt (12.29 KB, text/plain)
2018-12-17 07:26 UTC, Walter Schwarzenfeld
no flags Details
net/qt5-network failure with libressl (3.98 KB, text/plain)
2018-12-17 07:35 UTC, jakub_lach
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Schwarzenfeld freebsd_triage 2018-12-16 22:18:57 UTC
qt5-network fails after ports r487594 with a lot of errors to build.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-17 05:37:32 UTC
@Walter can you please attach a build log of the failure
Comment 2 Tobias C. Berner freebsd_committer freebsd_triage 2018-12-17 06:00:27 UTC
Hi there

Yes, this is a known problem (mentioned in the commit message) and will happen with every big Qt5 update until someone steps up and maintains LibreSSL support inside upstreams repository.

Until that time kde@ will gladly take patches to enable support for it.


mfg Tobias
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-12-17 07:26:07 UTC
Created attachment 200181 [details]
qt5-network-error.txt
Comment 4 Walter Schwarzenfeld freebsd_triage 2018-12-17 07:28:53 UTC
I can only provide the "second" part of the error messages. I did not expected it will be solved soon.
So I switched temporary to openssl (and have in moment no system with libressl).

In the first part:
in src/network/ssl/qsslsocket_openssl_symbols.cpp:

Nearly each line beginning with
DEFINERFUNC (without number like DEFINEFUNC2, DEFINEFUNC3,...) throws an error message.
Comment 5 jakub_lach 2018-12-17 07:35:34 UTC
Created attachment 200182 [details]
net/qt5-network failure with libressl

Another one
Comment 6 Charlie Li freebsd_committer freebsd_triage 2018-12-17 12:56:22 UTC
Patch posted as review D18582.
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-12-17 13:50:14 UTC
fails with:
--- .obj/qsslcertificate_openssl.o ---
ssl/qsslcertificate_openssl.cpp:211:29: error: use of undeclared identifier 'q_OPENSSL_sk_num'
        for (int i = 0; i < q_sk_GENERAL_NAME_num(altNames); ++i) {
                            ^
ssl/qsslsocket_openssl_symbols_p.h:496:35: note: expanded from macro 'q_sk_GENERAL_NAME_num'
#define q_sk_GENERAL_NAME_num(st) q_SKM_sk_num(GENERAL_NAME, (st))
                                  ^
ssl/qsslsocket_openssl11_symbols_p.h:143:66: note: expanded from macro 'q_SKM_sk_num'
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
                                                                 ^
ssl/qsslcertificate_openssl.cpp:212:43: error: use of undeclared identifier 'q_OPENSSL_sk_value'
            const GENERAL_NAME *genName = q_sk_GENERAL_NAME_value(altNames, i);
                                          ^
ssl/qsslsocket_openssl_symbols_p.h:497:40: note: expanded from macro 'q_sk_GENERAL_NAME_value'
#define q_sk_GENERAL_NAME_value(st, i) q_SKM_sk_value(GENERAL_NAME, (st), (i))
                                       ^
ssl/qsslsocket_openssl11_symbols_p.h:144:78: note: expanded from macro 'q_SKM_sk_value'
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
                                                                             ^
ssl/qsslcertificate_openssl.cpp:316:29: error: use of undeclared identifier 'q_OPENSSL_sk_num'
        for (int j = 0; j < q_SKM_sk_num(CONF_VALUE, val); j++) {
                            ^
ssl/qsslsocket_openssl11_symbols_p.h:143:66: note: expanded from macro 'q_SKM_sk_num'
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
                                                                 ^
ssl/qsslcertificate_openssl.cpp:317:32: error: use of undeclared identifier 'q_OPENSSL_sk_value'
            CONF_VALUE *nval = q_SKM_sk_value(CONF_VALUE, val, j);
                               ^
ssl/qsslsocket_openssl11_symbols_p.h:144:78: note: expanded from macro 'q_SKM_sk_value'
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
                                                                             ^
ssl/qsslcertificate_openssl.cpp:385:31: error: use of undeclared identifier 'q_OPENSSL_sk_num'
            for (int i=0; i < q_SKM_sk_num(ACCESS_DESCRIPTION, info); i++) {
                              ^
ssl/qsslsocket_openssl11_symbols_p.h:143:66: note: expanded from macro 'q_SKM_sk_num'
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
                                                                 ^
ssl/qsslcertificate_openssl.cpp:386:42: error: use of undeclared identifier 'q_OPENSSL_sk_value'
                ACCESS_DESCRIPTION *ad = q_SKM_sk_value(ACCESS_DESCRIPTION, info, i);
                                         ^
ssl/qsslsocket_openssl11_symbols_p.h:144:78: note: expanded from macro 'q_SKM_sk_value'
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
                                                                             ^
6 errors generated.
*** [.obj/qsslcertificate_openssl.o] Error code 1

make[1]: stopped in /ram/usr/ports/net/qt5-network/work/qtbase-everywhere-src-5.12.0/src/network
1 error

make[1]: stopped in /ram/usr/ports/net/qt5-network/work/qtbase-everywhere-src-5.12.0/src/network
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
Comment 8 Charlie Li freebsd_committer freebsd_triage 2018-12-17 14:13:08 UTC
(In reply to w.schwarzenfeld from comment #7)
May want to re-apply the patch; one or more patches appear missing. The symbols q_OPENSSL_sk_num and q_OPENSSL_sk_value are defined very early.
Comment 9 Walter Schwarzenfeld freebsd_triage 2018-12-17 14:17:41 UTC
Sorry, no the patch is right (was a patch-problem). Seems to work.
Comment 10 Adriaan de Groot freebsd_committer freebsd_triage 2018-12-24 17:27:25 UTC
I can't get around to applying this because neither Python 3.5 nor Python 3.6 build against libressl on 11.2.
Comment 11 Charlie Li freebsd_committer freebsd_triage 2018-12-25 00:37:43 UTC
(In reply to Adriaan de Groot from comment #10)
I can't reproduce the python build errors against LibreSSL on 11.2.
Comment 12 commit-hook freebsd_committer freebsd_triage 2018-12-25 17:16:20 UTC
A commit references this bug:

Author: adridg
Date: Tue Dec 25 17:15:34 UTC 2018
New revision: 488331
URL: https://svnweb.freebsd.org/changeset/ports/488331

Log:
  Update net/qt5-network to build against LibreSSL.

  Patches by Charlie Li / ml_vishwin, with explanation in the patches.
  Builds on 11.2 (ssl=unset, base, openssl) and 12.0 (ssl=unset, base,
  libressl). Tested with otter-browser on 12.0 (ssl=unset, libressl).

  PR:		234078
  Submitted by:	Charlie Li
  Reported by:	W. Schwarzenfeld
  Differential Revision:	https://reviews.freebsd.org/D18582

Changes:
  head/net/qt5-network/Makefile
  head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl11__symbols__p.h
  head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp
  head/net/qt5-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols__p.h
Comment 13 Adriaan de Groot freebsd_committer freebsd_triage 2018-12-25 21:01:05 UTC
I have a gaggle of builds still going on to test the next steps in the ongoing SSL saga, but I'm confident enough -- e.g. can use otter-browser to read them web in a libressl-enabled 12.0 box -- to close this one.

Charlie Lie, thank you for following this so closely and for maintaining the review request so well. Especially after the VLAN fixes.