From nobody Sat Nov 04 16:27:29 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SN31F5JbDz4ymDG; Sat, 4 Nov 2023 16:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SN31F4Rw5z3Hmm; Sat, 4 Nov 2023 16:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699115249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i6cYXe+26hUxTdW0yx2sSTpfShh+QCr5IkMAM/CtYaM=; b=ehVHpsSeIebJldCHB/zCaznuVxJq/pg+pgT9ilKPqtd6zMdb6CVTZ+xPKqPSJDGfJdWnQq Kqqb+tWUUJQH9BsCNjmZkDHxB8V3/EuxUHDktqJn/2v/vhlWxACvju8lIalrdkgi9ZLxZI VkDqIVD0RXRZs1KZoW2WMhJ9DlEVqO6TqjUjePqgbLagDsEzEfRDDSNmCW/G7WRwqp/+Rj 8v8PjKJIPh9UrJUYyMcyESI10S8NdWRiJid5NlQvfF9YVVdOeuwo9SW3NgVkMAXJkgMk9D +9De5kXZlCSPRvQhbTD5oe6LHly89/6A10dwtAIZkU7tlU6MGHoT83gcMiJCOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699115249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i6cYXe+26hUxTdW0yx2sSTpfShh+QCr5IkMAM/CtYaM=; b=kHGeAfLIl+Kg+wTI3/PrPIfP9oxYQNCamlLQtZ5NTgBwQopfw2nR99nwBZ0wkKv5uTKE6a ZDn+kqhb6uwSTHs5Eq2CkQDQY5/Tel4GOIULYBhs4WeBCa2ApxlQHGaG6ofgSw92FdZdx0 aHZtntLLglWotyVsTB7PpeUCYzhvVlSlCeVL32cksj01mh0lluqvTefGCiGbiF88Rve8+K mnel/dVeijiaG/AIzTqC47aweqjEjeUZZw8lUfB20UmcSDeuS+cNb1vG8R6uWPnr05KgMl xtU8/fGiWhA3ULyUWdXXK/mXnwjRcKyIRs2/ELjlZzGz1MgkA/fa3dBP0cLRUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699115249; a=rsa-sha256; cv=none; b=nglWKu8jNrnc8mI8cGH7FW8VLP2ncDNgk9G0pEBcPzM19Kmi/PakQ5+3C+UsG3byVTV/NE EPy8WjRm8pPfK6ndN62EWBqAQeuyg7+/CLRQNRla3+qpMnt/AjhSFHnUuB97gB5iVs5hJe JkpfN7twt7s9F3tU5SEBFjtZSmTdKFUq1dufJNsFZSEjw+5WAfv2RRxv6X/xNoheZ55F1V Hi/mi+3J2YPkYl+lTToCQXEDXZtDllte8Nak2kj5xkPe6Q+WwcqJ1nN1ayTcOuzGJgIxEl z28Wmrvm6BBjuJzHpz2DEOb1eMPUxAq+TeO5+xQLkZ9NnltkG7elsrBOQR2kww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SN31F3Dd8z14Bd; Sat, 4 Nov 2023 16:27:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3A4GRT1J020647; Sat, 4 Nov 2023 16:27:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A4GRTtS020644; Sat, 4 Nov 2023 16:27:29 GMT (envelope-from git) Date: Sat, 4 Nov 2023 16:27:29 GMT Message-Id: <202311041627.3A4GRTtS020644@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dimitry Andric Subject: git: 3cb46a4465c6 - main - qt(-dist)?.mk: suppress linker version script errors with lld >= 17 (take 2) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3cb46a4465c6319ff9fcf7ac6d151ac884a515ee Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=3cb46a4465c6319ff9fcf7ac6d151ac884a515ee commit 3cb46a4465c6319ff9fcf7ac6d151ac884a515ee Author: Dimitry Andric AuthorDate: 2023-11-04 15:51:40 +0000 Commit: Dimitry Andric CommitDate: 2023-11-04 16:26:59 +0000 qt(-dist)?.mk: suppress linker version script errors with lld >= 17 (take 2) This amends commit 3e5360df35848a1ad8c5edae83a0a9cdfd6bb775: Qt uses generated linker version scripts which always have a qt_version_tag symbol, but that symbol is only defined in the main Qt shared library. For other Qt components, this leads to lld >= 17 erroring out due to the symbol being undefined. Suppress these errors from qt-dist.mk, so we don't have to patch each individual port. This affects at least: * devel/qt5-dbus * net/qt5-network * databases/qt5-sql which were the first ones to fall over with a clang+lld 17 poudriere bulk run. For reference, the error you would see looks like: ... c++ -Wl,--as-needed -fstack-protector-strong -Wl,--no-undefined -Wl,--version-script,QtDBus.version -pthread -Wl,-rpath,/usr/local/lib/qt5 -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5DBus.so.5 -o libQt5DBus.so.5.15.8 .obj/qdbusconnection.o .obj/qdbusconnectioninterface.o .obj/qdbuserror.o .obj/qdbusintegrator.o .obj/qdbusmessage.o .obj/qdbusserver.o .obj/qdbusabstractinterface.o .obj/qdbusinterface.o .obj/qdbusxmlparser.o .obj/qdbusutil.o .obj/qdbusintrospection.o .obj/qdbusabstractadaptor.o .obj/qdbusinternalfilters.o .obj/qdbusmetaobject.o .obj/qdbusxmlgenerator.o .obj/qdbusmisc.o .obj/qdbusargument.o .obj/qdbusreply.o .obj/qdbusmetatype.o .obj/qdbusextratypes.o .obj/qdbuscontext.o .obj/qdbuspendingcall.o .obj/qdbuspendingreply.o .obj/qdbus_symbols.o .obj/qdbusservicewatcher.o .obj/qdbusunixfiledescriptor.o .obj/qdbusvirtualobject.o .obj/moc_qdbusconnectioninterface.o .obj/moc_qdbuserror.o .obj/moc_qdbusconnection.o .obj/moc_qdbusabstrac tadaptor.o .obj/moc_qdbusvirtualobject.o .obj/moc_qdbusconnection_p.o .obj/moc_qdbusconnectionmanager_p.o .obj/moc_qdbuspendingcall_p.o -L/wrkdirs/usr/ports/devel/qt5-dbus/work/kde-qtbase-5.15.8p157/lib /usr/local/lib/qt5/libQt5Core.so -L/usr/local/lib -ldbus-1 ld: error: version script assignment of 'Qt_5.15' to symbol 'qt_version_tag' failed: symbol not defined c++: error: linker command failed with exit code 1 (use -v to see invocation) Some qt ports, such as www/qt5-webkit, do not use qt-dist.mk but qt.mk, and qt-dist.mk includes qt.mk, so move the workaround that sets LDFLAGS to qt.mk instead. This should fix the problem for all qt ports. PR: 273992, 273753 Fixes: 3e5360df3584 MFH: 2023Q4 --- Mk/Uses/qt-dist.mk | 6 ------ Mk/Uses/qt.mk | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Mk/Uses/qt-dist.mk b/Mk/Uses/qt-dist.mk index b59e07539fd8..68827ad7e620 100644 --- a/Mk/Uses/qt-dist.mk +++ b/Mk/Uses/qt-dist.mk @@ -181,12 +181,6 @@ EXTRACT_AFTER_ARGS?= ${DISTNAME:S,$,/examples,:S,^,--exclude ,} \ --no-same-owner --no-same-permissions . endif # ! ${_QT_VER:M5} -# Qt uses generated linker version scripts which always have a qt_version_tag -# symbol, but that symbol is only defined in the main Qt shared library. For -# other Qt components, this leads to lld >= 17 erroring out due to the symbol -# being undefined. Supress these errors. -LDFLAGS+= -Wl,--undefined-version - # Build setup for Qt6 . if ${_QT_VER:M6} CMAKE_ARGS+= -DCMAKE_INSTALL_PREFIX=${PREFIX} \ diff --git a/Mk/Uses/qt.mk b/Mk/Uses/qt.mk index 61cb098c6f68..ecc85e94f7c3 100644 --- a/Mk/Uses/qt.mk +++ b/Mk/Uses/qt.mk @@ -120,6 +120,12 @@ MAKE_ENV+= QT_SELECT=${_QT_RELNAME} CONFIGURE_ENV+= QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules" MAKE_ENV+= QMAKEMODULES="${WRKSRC}/mkspecs/modules:${LOCALBASE}/${QT_MKSPECDIR_REL}/modules" +# Qt uses generated linker version scripts which always have a qt_version_tag +# symbol, but that symbol is only defined in the main Qt shared library. For +# other Qt components, this leads to lld >= 17 erroring out due to the symbol +# being undefined. Supress these errors. +LDFLAGS+= -Wl,--undefined-version + _USES_POST+= qt .endif # _QT_MK_INCLUDED