Bug 232783 - net-p2p/ktorrent: error loading libqca-ossl.so
Summary: net-p2p/ktorrent: error loading libqca-ossl.so
Status: Closed DUPLICATE of bug 232784
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 (Team)
Depends on:
Reported: 2018-10-29 15:43 UTC by fjwcash
Modified: 2019-02-27 19:26 UTC (History)
3 users (show)

See Also:
tcberner: maintainer-feedback+

force build of libcrypto-compat (347 bytes, patch)
2018-10-29 20:51 UTC, Schaich, Alonso
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fjwcash 2018-10-29 15:43:45 UTC
Everything installed via binary packages using the latest quarterly repo.

$ freebsd-version -ku

$ pkg info ktorrent\*

Running from a terminal produces the following error:
$ ktorrent
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
/usr/local/lib/qca/crypto/libqca-ossl.so: Undefined symbol EVP_MD_CTX_new
unnamed app(11453): Communication problem with  ktorrent , it probably crashed. 
Error message was:  org.freedesktop.DBus.Error.NoReply :  Message recipient disconnected from message bus without replying

$ pkg info \*qca\*   

If I copy /usr/local/lib/qca/crypto/libqca-ossl.so from my Oct 22 backups (which was running FreeBSD 10.4 using the 2018Q2 quarterly repo), then ktorrent loads and runs without issues.

The same thing occurs when running ktorrent-5.1.1 and KDE frameworks 5 with QT5.  Same error (undefined symbol when loading libqca-ossl.so), but I don't have any previous versions of KF5/QT5 to test against.
Comment 1 Schaich, Alonso 2018-10-29 20:51:34 UTC
Created attachment 198754 [details]
force build of libcrypto-compat

The reason for this breakage is that the EVP_MD_CTX_new is called EVP_MD_CTX_create on FreeBSD-11.

Qca bundles a compatibility wrapper for openssl for these kind of issues, and the FreeBSD port even patches the libcrypto-compat.{c|h} files, however, we donnot compile them.

The attached patch forces the compilation of libcrypto-compat resulting in a loadable libqca-ossl.so file on FreeBSD-11.2 over here.

The patch was not tested against FreeBSD-12.
Comment 2 Schaich, Alonso 2018-10-29 20:56:57 UTC
(In reply to Schaich, Alonso from comment #1)
Comment and Patch should be in #232784 (qca fails to load), which is the cause for ktorrent failing to start.
Comment 3 Tobias C. Berner freebsd_committer 2018-12-29 23:15:47 UTC
KDE4 will and withtit ktorrent-kde4 will be removed in a few days.
Comment 4 Adriaan de Groot freebsd_committer 2018-12-29 23:27:31 UTC
Re-opening because it was also about the modern ktorrent. It's still basically a dup of PR 232784 though, as Alonso points out.
Comment 5 Raphael Kubo da Costa freebsd_committer 2019-02-27 19:26:47 UTC
I ended up doing things a bit differently in bug 232783, marking this one as a duplicate to centralize everything there.

*** This bug has been marked as a duplicate of bug 232784 ***