Bug 286678 - devel/qca 2025Q2 fails build with libressl
Summary: devel/qca 2025Q2 fails build 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:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-08 20:57 UTC by Dave Hayes
Modified: 2025-09-09 10:04 UTC (History)
1 user (show)

See Also:
makc: maintainer-feedback+


Attachments
Git diff of the devel/qca tree (4.32 KB, patch)
2025-07-30 19:12 UTC, Dave Hayes
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Hayes 2025-05-08 20:57:32 UTC
FreeBSD 13.5-STABLE. Here is the relevant portion of the build log:

[00:00:29] FAILED: plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o 
[00:00:29] /usr/local/libexec/ccache/c++ -DHAVE_OPENSSL_AES_CCM -DHAVE_OPENSSL_AES_CTR -DHAVE_OPENSSL_AES_GCM -DQCA_SYSTEMSTORE_PATH=\"/usr/local/share/certs/ca-root-nss.crt\" -DQT_CORE_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_SIGNALS_SLOTS_KEYWORDS -DQT_NO_URL_CAST_FROM_STRING -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -Dqca_ossl_EXPORTS -I/wrkdirs/usr/ports/devel/qca/work-qt6/.build/plugins/qca-ossl -I/wrkdirs/usr/ports/devel/qca/work-qt6/qca-2.3.10/plugins/qca-ossl -I/wrkdirs/usr/ports/devel/qca/work-qt6/.build/plugins/qca-ossl/qca-ossl_autogen/include -I/wrkdirs/usr/ports/devel/qca/work-qt6/qca-2.3.10/include/QtCrypto -I/wrkdirs/usr/ports/devel/qca/work-qt6/.build -isystem /usr/local/include/qt6/QtCore -isystem /usr/local/include/qt6 -isystem /usr/local/lib/qt6/mkspecs/freebsd-clang -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include  -DNDEBUG -std=gnu++17 -fPIC -fPIC -pthread -MD -MT plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o -MF plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o.d -o plugins/qca-ossl/CMakeFiles/qca-ossl.dir/qca-ossl.cpp.o -c /wrkdirs/usr/ports/devel/qca/work-qt6/qca-2.3.10/plugins/qca-ossl/qca-ossl.cpp
[00:00:29] /wrkdirs/usr/ports/devel/qca/work-qt6/qca-2.3.10/plugins/qca-ossl/qca-ossl.cpp:3381:13: warning: 'setTimeSpec' is deprecated: Use setTimeZone() instead [-Wdeprecated-declarations]
[00:00:29]  3381 |         qdt.setTimeSpec(Qt::UTC);
[00:00:29]       |             ^
[00:00:29] /usr/local/include/qt6/QtCore/qdatetime.h:403:5: note: 'setTimeSpec' has been explicitly marked deprecated here
[00:00:29]   403 |     QT_DEPRECATED_VERSION_X_6_9("Use setTimeZone() instead")
[00:00:29]       |     ^
[00:00:29] /usr/local/include/qt6/QtCore/qtdeprecationmarkers.h:179:44: note: expanded from macro 'QT_DEPRECATED_VERSION_X_6_9'
[00:00:29]   179 | # define QT_DEPRECATED_VERSION_X_6_9(text) QT_DEPRECATED_X(text)
[00:00:29]       |                                            ^
[00:00:29] /usr/local/include/qt6/QtCore/qtdeprecationmarkers.h:29:33: note: expanded from macro 'QT_DEPRECATED_X'
[00:00:29]    29 | #  define QT_DEPRECATED_X(text) Q_DECL_DEPRECATED_X(text)
[00:00:29]       |                                 ^
[00:00:29] /usr/local/include/qt6/QtCore/qcompilerdetection.h:994:36: note: expanded from macro 'Q_DECL_DEPRECATED_X'
[00:00:29]   994 | #  define Q_DECL_DEPRECATED_X(x) [[deprecated(x)]]
[00:00:29]       |                                    ^
[00:00:29] /wrkdirs/usr/ports/devel/qca/work-qt6/qca-2.3.10/plugins/qca-ossl/qca-ossl.cpp:6950:47: error: use of undeclared identifier 'EVP_whirlpool'
[00:00:29]  6950 |                 return new opensslHashContext(EVP_whirlpool(), this, type);
[00:00:29]       |                                               ^
[00:00:29] 1 warning and 1 error generated.
Comment 1 Max Brazhnikov freebsd_committer freebsd_triage 2025-07-15 10:28:59 UTC
Is libressl supported upstream?
Comment 2 Dave Hayes 2025-07-15 15:20:30 UTC
This package built in this ports tree with LibreSSL as of Q1 2025 so I would think it did. I don't know what constitutes support from this upstream.
Comment 3 Max Brazhnikov freebsd_committer freebsd_triage 2025-07-15 19:39:33 UTC
(In reply to Dave Hayes from comment #2)
Turns out it is not the first time when our local LibreSSL patches were broken upon QCA update. There is also upstream bug report for LibreSSL support:
https://bugs.kde.org/show_bug.cgi?id=414299

Merge request for LibreSSL 3.0.x support:
https://invent.kde.org/libraries/qca/-/merge_requests/109

Plan to sunset QCA in favour of using cryptography libraries directly:
https://invent.kde.org/libraries/qca/-/issues/18
Comment 4 Dave Hayes 2025-07-15 21:18:13 UTC
Maybe we could try the OpenBSD patches, as they typically have good support for LibreSSL? It's just a shot in the dark here. Thanks for the research.

https://github.com/openbsd/ports/commit/7eee769dedfd40b5bb16469d3bfba26654ad16e5
Comment 5 Max Brazhnikov freebsd_committer freebsd_triage 2025-07-16 13:21:56 UTC
Could you prepare and test the patch for FreeBSD ports? You can get the inspiration from the previous iterations :)
Comment 6 Dave Hayes 2025-07-30 19:12:39 UTC
Created attachment 262566 [details]
Git diff of the devel/qca tree

Dropping in the referenced patch file above from the OpenBSD tree worked. I'm hoping this git diff will be sufficient to apply to the ports tree; if you are looking for something else let me know.
Comment 7 Max Brazhnikov freebsd_committer freebsd_triage 2025-08-09 12:33:31 UTC
(In reply to Dave Hayes from comment #6)
Hi, sorry for delay. The patch looks fine. Does it build and work with LibreSSL for you?
Comment 8 Dave Hayes 2025-08-18 18:47:53 UTC
After some testing, this seems to work. Sorry for the massive delay.
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-09-09 09:59:02 UTC
A commit in branch main references this bug:

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

commit c3c6a3a4ae8a87c43bbeafe44a1fe3484dd2e3a2
Author:     Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2025-09-09 09:54:53 +0000
Commit:     Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2025-09-09 09:58:12 +0000

    devel/qca: fix LibreSSL support

    PR:             286678
    Submitted by:   Dave Hayes

 .../qca/files/patch-plugins_qca-ossl_qca-ossl.cpp  | 99 +++++-----------------
 1 file changed, 20 insertions(+), 79 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2025-09-09 10:04:05 UTC
A commit in branch 2025Q3 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=41488fd38012b12caf1ec9cd924ced487f946987

commit 41488fd38012b12caf1ec9cd924ced487f946987
Author:     Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2025-09-09 09:54:53 +0000
Commit:     Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2025-09-09 09:59:34 +0000

    devel/qca: fix LibreSSL support

    PR:             286678
    Submitted by:   Dave Hayes

    (cherry picked from commit c3c6a3a4ae8a87c43bbeafe44a1fe3484dd2e3a2)

 .../qca/files/patch-plugins_qca-ossl_qca-ossl.cpp  | 99 +++++-----------------
 1 file changed, 20 insertions(+), 79 deletions(-)
Comment 11 Max Brazhnikov freebsd_committer freebsd_triage 2025-09-09 10:04:31 UTC
Committed, thanks!