Bug 232318

Summary: net/qt5-network: Undefined symbol
Product: Ports & Packages Reporter: Marek Zarychta <zarychtam>
Component: Individual Port(s)Assignee: freebsd-kde (group) <kde>
Status: Closed DUPLICATE    
Severity: Affects Some People CC: adridg, dch, mikael, swills, tcberner
Priority: --- Flags: tcberner: maintainer-feedback+
Version: Latest   
Hardware: amd64   
OS: Any   
Bug Depends on: 233798    
Bug Blocks:    
Attachments:
Description Flags
kdump output none

Description Marek Zarychta 2018-10-16 12:59:32 UTC
Created attachment 198207 [details]
kdump output

Package qt5-network-5.11.2 seems to be broken when used with nextcloud/owncloud client. The client doesn't start and reports this error: 
/usr/local/lib/qt5/plugins/bearer/libqgenericbearer.so: Undefined symbol "_ZN17QNetworkInterfaceC1ERKS_@Qt_5"

The affected system runs 11.2-STABLE r339376. IPv4/IPv6 networks are accessed from VLAN interface created atop em0 (Ethernet Connection I217-LM). Error occurs also when network connection originates directly from em0. 

The breakage occurred a few months ago rather probably due to FreeBSD upgrade than pkg upgrade.
Comment 1 Mikael Urankar freebsd_committer freebsd_triage 2018-10-16 14:16:04 UTC
duplicate of bug #231402
Comment 2 Adriaan de Groot freebsd_committer freebsd_triage 2018-10-16 14:23:23 UTC
Entirely a duplicate; the whole issue is that genericbearer links to a wrongly-versioned symbol:

[adridg@beastie]$ readelf -a /usr/local/lib/qt5/plugins/bearer/libqgenericbearer.so | grep QNetworkInterfaceC1ERKS
00000020b550 004500000007 R_X86_64_JUMP_SLOT  0000000000000000 _ZN17QNetworkInterfaceC1ERKS_ + 0
    69: 0000000000000000    20 FUNC    GLOBAL DEFAULT  UND _ZN17QNetworkInterfaceC1ERKS_@Qt_5 (2)
[adridg@beastie]$ readelf -a /usr/local/lib/qt5/libQt5Network.so.5 | grep QNetworkInterfaceC1ERKS
  1246: 00000000000c7a70    20 FUNC    GLOBAL DEFAULT   12 _ZN17QNetworkInterfaceC1ERKS_@@Qt_5 (3)
Comment 3 Marek Zarychta 2018-10-16 14:52:24 UTC

*** This bug has been marked as a duplicate of bug 231402 ***
Comment 4 Marek Zarychta 2018-11-02 21:24:50 UTC
No more duplicate because the bug 231402 has been resolved by a workaround but Qt5Network is still broken on the host with vlan(4) interfaces.
Comment 5 Adriaan de Groot freebsd_committer freebsd_triage 2018-12-21 13:17:21 UTC
A **workaround** is to add QT_EXCLUDE_GENERIC_BEARER=1 to your environment.
Comment 6 Marek Zarychta 2018-12-21 14:53:18 UTC
(In reply to Adriaan de Groot from comment #5)

Thank you for this  **workaround** which has worked perfectly and appeared in time to put it under Christmas tree.
Comment 7 Adriaan de Groot freebsd_committer freebsd_triage 2018-12-24 16:33:51 UTC
Closing this one again as duplicate of PR 231402. *That* one will be closed shortly with a fix (an actual fix!) for the whole vlan problem.

*** This bug has been marked as a duplicate of bug 231402 ***
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-12-24 16:46:26 UTC
A commit references this bug:

Author: adridg
Date: Mon Dec 24 16:46:18 UTC 2018
New revision: 488276
URL: https://svnweb.freebsd.org/changeset/ports/488276

Log:
  Fix net/qt5-network in the face of VLANs.

  Adding a VLAN to a FreeBSD system caused memory corruption -- usually
  enough to make rtld fall over with symbol resolution errors, although
  in DEBUG builds it would just crash. Revamp network interface discovery
  to not be full of memory gotcha's.

  An explanation is included in the patches. While here, "make makesum"
  has moved some files around.

  PR:		231402, 233798, 232318
  Reported by:	Ting-Wei Lan, Nils Beyer, Marek Zarychta

Changes:
  head/net/qt5-network/Makefile
  head/net/qt5-network/files/patch-qsslcontext_openssl.cpp
  head/net/qt5-network/files/patch-src_network_kernel_qnetworkinterface__unix.cpp
  head/net/qt5-network/files/patch-src_network_socket_qnet__unix__p.h
  head/net/qt5-network/files/patch-src_network_socket_qnet_unix_p.h
  head/net/qt5-network/files/patch-src_network_ssl_qsslcontext__openssl.cpp
  head/net/qt5-network/files/patch-src_plugins_bearer_generic_qgenericengine.cpp