On Tue, Jun 24, 2025 at 03:17:00PM +0100, Stuart Henderson wrote:
> On 2025/06/24 09:25, Adriano Barbosa wrote:
> > I've been trying to fix a new issue without success. I've never used
> > gdb before, and from what I've learned over the past few days, the
> > issue seems to be an incompatibility between ssl libraries used in qt
> > and nextcloud, which now require openssl. Please find the backtrace from
> > the core dump below. I'm out of ideas on how to proceed to make it
> > work, and I'm wondering if there is any chance to resolve itwithout
> > recompiling qt stuff.
> 
> Switching to OpenSSL is difficult or impossible in many cases because
> a lot of libraries pull in libssl/libcrypto.
> 
> Generally you can't mix code compiled against OpenSSL and code compiled
> against LibreSSL in the same process (e.g. a library built against one
> used in an executable built against the other).
> 
> > #0  0x00000a2a7028d02f in ossl_asn1_item_embed_free () from 
> > /usr/local/lib/eopenssl34/libcrypto.so.32.0
> > #1  0x00000a2a7028cfc5 in ASN1_item_free () from 
> > /usr/local/lib/eopenssl34/libcrypto.so.32.0
> > #2  0x00000a2a493c7f7a in 
> > QTlsPrivate::X509CertificateOpenSSL::convertExtension () from 
> > /usr/local/lib/qt6/plugins/tls/libqopensslbackend.so
> 
> This shows QTls code (which expects libressl) calling into functions
> coming from openssl's libraries, that's not going to work.
> 
> What's failing with libressl? Do you have a (non-working) diff?

nextcloudclient diff is straightforward, but since version 3.16, it
requires libp11. Please find the diff and the port for libp11 (still
not commited) attached.

Thank you!



Index: Makefile
===================================================================
RCS file: /cvs/ports/net/nextcloudclient/Makefile,v
diff -u -p -r1.70 Makefile
--- Makefile    18 Mar 2025 07:54:21 -0000      1.70
+++ Makefile    24 Jun 2025 16:54:52 -0000
@@ -3,11 +3,10 @@ USE_WXNEEDED =        Yes
 COMMENT-main =         desktop sync client for Nextcloud
 COMMENT-dolphin=       dolphin nextcloud integration plugin
 
-V =            3.15.3
+V =            3.16.6
 GH_ACCOUNT =   nextcloud
 GH_PROJECT =   desktop
 GH_TAGNAME =   v${V}
-REVISION-main =        0
 
 DISTNAME =             nextcloudclient-${V}
 PKGNAME-main =         nextcloudclient-${V}
@@ -17,7 +16,7 @@ CATEGORIES =  net
 
 HOMEPAGE =     https://nextcloud.com
 
-SHARED_LIBS +=  nextcloudsync             23.0  # 3.15.2
+SHARED_LIBS +=  nextcloudsync             24.0  # 3.16.2
 SHARED_LIBS +=  nextcloud_csync           11.0  # 3.15.2
 SHARED_LIBS +=  nextcloudsync_vfs_suffix  4.0   # 3.14.1
 
@@ -31,9 +30,9 @@ WANTLIB-main += Qt6Core Qt6Core5Compat Q
 WANTLIB-main += Qt6Positioning Qt6PrintSupport Qt6Qml Qt6QmlMeta Qt6QmlModels
 WANTLIB-main += Qt6QmlWorkerScript Qt6Quick Qt6QuickControls2 Qt6QuickWidgets
 WANTLIB-main += Qt6Sql Qt6Svg Qt6WebChannel Qt6WebEngineCore 
Qt6WebEngineWidgets
-WANTLIB-main += Qt6WebSockets Qt6Widgets Qt6Xml c cloudproviders crypto
+WANTLIB-main += Qt6WebSockets Qt6Widgets Qt6Xml c cloudproviders 
lib/eopenssl34/crypto
 WANTLIB-main += gio-2.0 glib-2.0 gobject-2.0 intl m qt6keychain sqlite3
-WANTLIB-main += ssl xkbcommon z
+WANTLIB-main += lib/eopenssl34/ssl xkbcommon z
 
 WANTLIB-dolphin += ${COMPILER_LIBCXX} GL KF6Completion KF6ConfigCore 
KF6CoreAddons
 WANTLIB-dolphin += KF6JobWidgets KF6KIOCore KF6KIOGui KF6KIOWidgets KF6Service
@@ -47,7 +46,8 @@ FLAVOR ?=
 MODULES =              devel/cmake \
                        x11/qt6
 
-BUILD_DEPENDS =                devel/gettext,-tools
+BUILD_DEPENDS =                devel/gettext,-tools \
+                       security/libp11
 
 # for converting svg icons to png
 BUILD_DEPENDS +=       x11/gnome/librsvg
@@ -68,6 +68,7 @@ LIB_DEPENDS-main =    databases/sqlite3 \
                        devel/kf6/karchive \
                        devel/kf6/kguiaddons \
                        devel/libinotify \
+                       security/openssl/3.4 \
                        security/qtkeychain,qt6 \
                        x11/gnome/libcloudproviders \
                        x11/qt6/qt5compat \
@@ -94,10 +95,12 @@ CONFIGURE_ARGS +=   -DCMAKE_MODULE_PATH=${
 # Do not install under /etc/Nextcloud
 CONFIGURE_ARGS +=      -DSYSCONF_INSTALL_DIR=${SYSCONFDIR}
 
-CONFIGURE_ARGS +=      -DCMAKE_INSTALL_RPATH=${LOCALBASE}/lib/inotify
+CONFIGURE_ARGS +=      
-DCMAKE_INSTALL_RPATH="${LOCALBASE}/lib/inotify;${LOCALBASE}/lib/eopenssl34"
+CONFIGURE_ENV =                OPENSSL_ROOT_DIR=${LOCALBASE}/lib/eopenssl34
 
-CXXFLAGS +=            -I${LOCALBASE}/include/inotify 
-I${LOCALBASE}/include/qtkeychain
-MODCMAKE_LDFLAGS =     -L${LOCALBASE}/lib/inotify
+CXXFLAGS +=            -I${LOCALBASE}/include/inotify 
-I${LOCALBASE}/include/qtkeychain \
+                       -I${LOCALBASE}/include/eopenssl34
+MODCMAKE_LDFLAGS =     -L${LOCALBASE}/lib/inotify -L${LOCALBASE}/lib/eopenssl34
 
 .include <bsd.port.arch.mk>
 
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/nextcloudclient/distinfo,v
diff -u -p -r1.56 distinfo
--- distinfo    2 Mar 2025 08:22:52 -0000       1.56
+++ distinfo    24 Jun 2025 16:54:52 -0000
@@ -1,2 +1,2 @@
-SHA256 (nextcloudclient-3.15.3.tar.gz) = 
WksSYEyEuJhvKu50YruWg/sB9K4o7p1oggaMucrEV3M=
-SIZE (nextcloudclient-3.15.3.tar.gz) = 15683038
+SHA256 (nextcloudclient-3.16.6.tar.gz) = 
j9WOhTesRfXGbrkluO+E4I9wohuwvcP7FN5qMxBSSVQ=
+SIZE (nextcloudclient-3.16.6.tar.gz) = 15690688
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/net/nextcloudclient/patches/patch-CMakeLists_txt,v
diff -u -p -r1.18 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt        19 Dec 2024 12:31:45 -0000      1.18
+++ patches/patch-CMakeLists_txt        24 Jun 2025 16:54:52 -0000
@@ -10,7 +10,7 @@ Index: CMakeLists.txt
  
  include(ECMCoverageOption)
  
-@@ -352,4 +352,4 @@ elseif(BUILD_CLIENT)
+@@ -357,4 +357,4 @@ elseif(BUILD_CLIENT)
      configure_file(sync-exclude.lst bin/sync-exclude.lst COPYONLY)
  endif()
  
Index: pkg/PLIST-dolphin
===================================================================
RCS file: /cvs/ports/net/nextcloudclient/pkg/PLIST-dolphin,v
diff -u -p -r1.1 PLIST-dolphin
--- pkg/PLIST-dolphin   2 Mar 2025 08:22:52 -0000       1.1
+++ pkg/PLIST-dolphin   24 Jun 2025 16:54:52 -0000
@@ -1,5 +1,4 @@
 @so lib/libnextclouddolphinpluginhelper.so
-lib/qt6/plugins/kf6/
 lib/qt6/plugins/kf6/kfileitemaction/
 @so lib/qt6/plugins/kf6/kfileitemaction/nextclouddolphinactionplugin.so
 lib/qt6/plugins/kf6/overlayicon/

Attachment: libp11.tar.gz
Description: application/tar-gz

Reply via email to