I'm using a raspberry pi 3 (32bit) I've installed dev-qt/qtquickcontrols2-5.7.1 and dev-qt/qtcore-5.7.1-r3 When I compile something with qmake, it ends with this error: > /usr/lib/libQt5QuickTemplates2.so.5:(*IND*+0x0): multiple definition of `_edata' > /usr/lib/libQt5QuickTemplates2.so.5:(*IND*+0x0): multiple definition of `__bss_start' > /usr/lib/libQt5QuickTemplates2.so.5:(*IND*+0x0): multiple definition of `_end' This seems to be caused by qt compiled with gold linker, as noted here: https://wiki.qt.io/Native_Build_of_Qt_5.4.1_on_a_Raspberry_Pi > To compile Qt 5.7 in Rpi3, you need to add the flag -no-use-gold-linker to configure. Apparently gnu gold linker has issues with ARMv8 When emerging dev-qt/qtquickcontrols2 this appears in the log: > armv7a-hardfloat-linux-gnueabi-g++ -Wl,-O1 -Wl,--as-needed -fuse-ld=gold -Wl,--enable-new-dtags -shared -o libqtquickcontrols2universalstyleplugin.so .obj/qtquickcontrols2universalstyleplugin.o .obj/qquickuniversalfocusrectangle.o .obj/qquickuniversalprogressring.o .obj/qquickuniversalprogressstrip.o .obj/qquickuniversalstyle.o .obj/qquickuniversaltheme.o .obj/qrc_qtquickcontrols2universalstyleplugin.o .obj/moc_qquickuniversalfocusrectangle_p.o .obj/moc_qquickuniversalprogressring_p.o .obj/moc_qquickuniversalprogressstrip_p.o .obj/moc_qquickuniversalstyle_p.o -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lGLESv2 -lpthread -L/var/tmp/portage/dev-qt/qtquickcontrols2-5.7.1/work/qtquickcontrols2-opensource-src-5.7.1/lib -lQt5QuickTemplates2 -lQt5QuickControls2 -lQt5Quick -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -lpthread This is where the gold linker is enabled: "-fuse-ld=gold" I guess it should be disabled removing it or replacing with "-fuse-ld=bfd"
I've found this in qt5-build.eclass line 605: > # let configure automatically detect if GNU gold is available > #-use-gold-linker Note that it is commented, so Qt "configure" is finding the gold linker and using it. This is what Qt says about the gold linker: > # Example configure command below. We disable using the GNU gold > # linker as it apparently has issues with ARMv8. In the configure > # output check that "EGLFS GBM .......... yes" is present, otherwise > # eglfs will not be functional. > # > # ./configure -release -opengl es2 -device linux-rpi3-vc4-g++ \ > # -device-option CROSS_COMPILE=~/raspbian/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- \ > # -sysroot ~/raspbian/sysroot \ > # -prefix /usr/local/qt5pi -extprefix ~/raspbian/qt5pi -hostprefix ~/raspbian/qt5 \ > # -v -nomake examples -nomake tests -no-use-gold-linker (see file /usr/lib/qt5/mkspecs/devices/linux-rpi3-vc4-g++/qmake.conf)
This may be a duplicate of bug #623566.
It may be related to bug #623566. Nevertheless, Qt recommends turning off the golden compiler for ARMv8. I'm now building Qt manually, using the recommended configuration. I'll update you if this fixes this issue.
I've manually compiled Qt and it is working as expected. This seems to me an hint that the problem is in Qt ebuild/eclass.
(In reply to Alessandro Pezzato from comment #4) > I've manually compiled Qt and it is working as expected. This seems to me an > hint that the problem is in Qt ebuild/eclass. No, it's not. It's a hint that the problem is in gold. We can add a workaround to qt5-build.eclass, but that doesn't fix the root problem. It also doesn't seem gentoo-specific, so maybe Qt upstream should add a blacklist or something to their configure-time gold detection mechanism. What version of binutils are you using btw? Can you try a newer one?
I pushed a commit to the overlay to use the system linker: https://gitweb.gentoo.org/proj/qt.git/commit/?id=fe45faae1a15c644db0420f33a67df5197c52fcc
I pushed this to main tree now: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64b2ad10079f4c4931520ef102b35f672ee74d99