This happens to me on qemu riscv64 environment. It is very likely the same issue as Bug 790689. /usr/lib/gcc/riscv64-unknown-linux-gnu/11.1.0/../../../../riscv64-unknown-linux-gnu/bin/ld: .obj/renderview.o: in function `.L2004': renderview.cpp:(.text+0x4a96): undefined reference to `__atomic_exchange_1' collect2: error: ld returned 1 exit status distcc[2081528] ERROR: compile (null) on localhost failed make[3]: *** [Makefile:234: ../../../../plugins/renderers/libopenglrenderer.so] Error 1 make[3]: Leaving directory '/var/tmp/portage/dev-qt/qt3d-5.15.2/work/qt3d-everywhere-src-5.15.2_build/src/plugins/renderers/opengl' make[2]: *** [Makefile:47: sub-opengl-make_first] Error 2 make[2]: Leaving directory '/var/tmp/portage/dev-qt/qt3d-5.15.2/work/qt3d-everywhere-src-5.15.2_build/src/plugins/renderers' make[1]: *** [Makefile:171: sub-plugins-renderers-make_first] Error 2 make[1]: *** Waiting for unfinished jobs....
Created attachment 725956 [details] build log compressed due to exceeding size limit, please use zcat to view it.
# Use link option -pthread instead of -lpthread # https://github.com/riscv-collab/riscv-gcc/issues/12 use Option 4 # https://stackoverflow.com/questions/23250863/difference-between-pthread-and-lpthread-while-compiling # In riscv, "-pthread" equivalent to add link option "--push-state --as-needed -latomic --pop-state" according to last version of the patch, the "-pthread" option sounds as a better solution, can we accept and push this?
(In reply to Yixun Lan from comment #2) > # Use link option -pthread instead of -lpthread > > # https://github.com/riscv-collab/riscv-gcc/issues/12 use Option 4 > # > https://stackoverflow.com/questions/23250863/difference-between-pthread-and- > lpthread-while-compiling > # In riscv, "-pthread" equivalent to add link option "--push-state > --as-needed -latomic --pop-state" > > according to last version of the patch, the "-pthread" option sounds as a > better solution, can we accept and push this? actually, the patch need to apply to qtcore, so which mean we don't need patch for qt3d anymore
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3884552b6dd1bdeea1ca82bd23b6736c519ebe90 commit 3884552b6dd1bdeea1ca82bd23b6736c519ebe90 Author: Han Gao <rabenda.cn@gmail.com> AuthorDate: 2022-03-27 13:05:18 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2022-03-30 18:56:21 +0000 dev-qt/qtcore: use link option -pthread instead of -lpthread Bug: https://bugs.gentoo.org/803470 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Han Gao <rabenda.cn@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/24711 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch | 41 +++++++++++++++++++++++++ dev-qt/qtcore/qtcore-5.15.3.ebuild | 4 +++ 2 files changed, 45 insertions(+)
with this patch pushed, we can close this bug, thanks all! also, dev-qt/qt3d riscv keywording is done
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/qt.git/commit/?id=ebcfd362f1047bbb7c09021bad242dc9fd8a030f commit ebcfd362f1047bbb7c09021bad242dc9fd8a030f Author: Han Gao <rabenda.cn@gmail.com> AuthorDate: 2022-03-27 13:05:18 +0000 Commit: Andreas Sturmlechner <asturm@gentoo.org> CommitDate: 2022-04-01 17:57:49 +0000 dev-qt/qtcore: use link option -pthread instead of -lpthread Bug: https://bugs.gentoo.org/803470 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Han Gao <rabenda.cn@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/24711 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org> dev-qt/qtcore/files/qtcore-5.15.3-pthread.patch | 41 +++++++++++++++++++++++++ dev-qt/qtcore/qtcore-5.15.3.9999.ebuild | 1 + 2 files changed, 42 insertions(+)