Created attachment 872160 [details] build log In a clang-17[default-libcxx] environment, dev-qt/qtgui-5.15.10-r2 will fail to link during emerge with the following error message: ``` ld.lld: error: version script assignment of 'Qt_5.15' to symbol 'qt_version_tag' failed: symbol not defined clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [Makefile:1292: ../../lib/libQt5Gui.so.5.15.10] Error 1 ``` This can be avoided by passing "-Wl,--undefined-version" to LDFLAGS. Attaching logs.
Created attachment 872161 [details] emerge --info
*** Bug 915201 has been marked as a duplicate of this bug. ***
*** Bug 915204 has been marked as a duplicate of this bug. ***
*** Bug 915206 has been marked as a duplicate of this bug. ***
*** Bug 915202 has been marked as a duplicate of this bug. ***
*** Bug 915091 has been marked as a duplicate of this bug. ***
*** Bug 915089 has been marked as a duplicate of this bug. ***
(In reply to Mark Wright from bug 915201) > (In reply to ppw0) > > Thanks for reporting. > > > This can be avoided by passing "-Wl,--undefined-version" to LDFLAGS. > > Thanks, creating a file in /etc/portage/env with those flags: > > # cat /etc/portage/env/Wl--undefined-version > LDFLAGS="${LDFLAGS} -Wl,--undefined-version" > # > > and adding a line to /etc/portage/package.env to use this file: > > dev-qt/* Wl--undefined-version > > allows dev-qt/qtdbus-5.15.10 to build with sys-devel/clang-17.0.2 and > sys-devel/lld-17.0.1. > > FreeBSD has a workaround here: > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273992
I suspect we should add that workaround into the eclass. I don't imagine any proper fix is coming any time soon and I don't plan on working on it myself (other than perhaps the workaround).
Thanks for the work-around! I had same issue building qtnetworking with clang-17 and "-Wl,--undefined-version" fixed it.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=adb049350a5d4b15b5ee19739d9f2baed83f6acf commit adb049350a5d4b15b5ee19739d9f2baed83f6acf Author: Alfred Wingate <parona@protonmail.com> AuthorDate: 2023-10-11 12:30:44 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-10-15 15:22:41 +0000 qt5-build.eclass: workaround undefined qt_version_tag (LLD 17) Bug: https://bugreports.qt.io/browse/QTBUG-111514 Bug: https://bugs.gentoo.org/915203 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/33302 Signed-off-by: Sam James <sam@gentoo.org> eclass/qt5-build.eclass | 6 ++++++ 1 file changed, 6 insertions(+)
I don't really see the point in keeping this open so closing as fixed (applied workaround). In a year or so, we'll get the Qt 5 fix and it'll propagate down into Qt5PatchCollection naturally.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=8138d7bc836b35dd42df44f829dcd518f03a4e64 commit 8138d7bc836b35dd42df44f829dcd518f03a4e64 Author: Alfred Wingate <parona@protonmail.com> AuthorDate: 2023-10-11 12:30:44 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2023-10-15 20:00:37 +0000 qt5-build.eclass: workaround undefined qt_version_tag (LLD 17) Bug: https://bugreports.qt.io/browse/QTBUG-111514 Bug: https://bugs.gentoo.org/915203 Signed-off-by: Alfred Wingate <parona@protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/33302 Signed-off-by: Sam James <sam@gentoo.org> Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> eclass/qt5-build.eclass | 6 ++++++ 1 file changed, 6 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a18de479c55e6a3f1a2400a1ddebef3eaad1ab30 commit a18de479c55e6a3f1a2400a1ddebef3eaad1ab30 Author: Sam James <sam@gentoo.org> AuthorDate: 2023-10-18 06:43:45 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-10-18 06:44:13 +0000 qt5-build.eclass: guard -Wl,--undefined-version with tc-ld-is-lld Older binutils doesn't support this flag, so just guard it to make life easier for people. Bug: https://bugs.gentoo.org/915203 Signed-off-by: Sam James <sam@gentoo.org> eclass/qt5-build.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Fix was merged in Qt Company 5.15 upstream branch. Now we've got to wait just for 1 year...
*** Bug 914861 has been marked as a duplicate of this bug. ***
*** Bug 914858 has been marked as a duplicate of this bug. ***