FS#38819 - [qt5-base] linker error with libQt5PlatformSupport.a when building qtwayland
Attached to Project:
Arch Linux
Opened by Pier Luigi Fiorini (plfiorini) - Thursday, 06 February 2014, 20:07 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 19 January 2015, 15:10 GMT
Opened by Pier Luigi Fiorini (plfiorini) - Thursday, 06 February 2014, 20:07 GMT
Last edited by Andrea Scarpino (BaSh) - Monday, 19 January 2015, 15:10 GMT
|
Details
Description:
Can't build qtwayland Additional info: * This happens with qt5-base 5.2.1 Errors: g++ -Wl,-O1,--sort-common,--as-needed,-z,relro -Wl,--no-undefined -Wl,-O1 -shared -Wl,-Bsymbolic-functions -Wl,-soname,libQt5WaylandClient.so.5 -o libQt5WaylandClient.so.5.2.1 .obj/qwaylandintegration.o .obj/qwaylandnativeinterface.o .obj/qwaylandshmbackingstore.o .obj/qwaylandinputdevice.o .obj/qwaylandcursor.o .obj/qwaylanddisplay.o .obj/qwaylandwindow.o .obj/qwaylandscreen.o .obj/qwaylandshmwindow.o .obj/qwaylandclipboard.o .obj/qwaylanddnd.o .obj/qwaylanddataoffer.o .obj/qwaylanddatadevicemanager.o .obj/qwaylanddatasource.o .obj/qwaylandshellsurface.o .obj/qwaylandextendedoutput.o .obj/qwaylandextendedsurface.o .obj/qwaylandsubsurface.o .obj/qwaylandtouch.o .obj/qwaylandqtkey.o .obj/qwaylandmimehelper.o .obj/qwaylanddecoration.o .obj/qwaylandeventthread.o .obj/qwaylandwindowmanagerintegration.o .obj/qwaylandinputcontext.o .obj/qwaylanddatadevice.o .obj/qwaylandclientbufferintegration.o .obj/qwaylandclientbufferintegrationplugin.o .obj/qwaylandclientbufferintegrationfactory.o .obj/qwaylandserverbufferintegration.o .obj/qwaylandserverbufferintegrationplugin.o .obj/qwaylandserverbufferintegrationfactory.o .obj/qwaylandhardwareintegration.o .obj/wayland-wayland-protocol.o .obj/wayland-surface-extension-protocol.o .obj/wayland-sub-surface-extension-protocol.o .obj/wayland-output-extension-protocol.o .obj/wayland-touch-extension-protocol.o .obj/wayland-qtkey-extension-protocol.o .obj/wayland-windowmanager-protocol.o .obj/wayland-text-protocol.o .obj/wayland-server-buffer-extension-protocol.o .obj/wayland-hardware-integration-protocol.o .obj/qwayland-wayland.o .obj/qwayland-surface-extension.o .obj/qwayland-sub-surface-extension.o .obj/qwayland-output-extension.o .obj/qwayland-touch-extension.o .obj/qwayland-qtkey-extension.o .obj/qwayland-windowmanager.o .obj/qwayland-text.o .obj/qwayland-server-buffer-extension.o .obj/qwayland-hardware-integration.o .obj/moc_qwaylanddisplay_p.o .obj/moc_qwaylandwindow_p.o .obj/moc_qwaylandinputdevice_p.o .obj/moc_qwaylanddatasource_p.o .obj/moc_qwaylandeventthread_p.o .obj/moc_qwaylandwindowmanagerintegration_p.o .obj/moc_qwaylandinputcontext_p.o .obj/moc_qwaylanddatadevice_p.o .obj/moc_qwaylandclientbufferintegrationplugin_p.o .obj/moc_qwaylandserverbufferintegrationplugin_p.o -lfontconfig -lfreetype -lxkbcommon -lwayland-client -lwayland-cursor -lQt5PlatformSupport -lQt5Gui -lQt5Core -lpthread -lglib-2.0 -lGL /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libQt5PlatformSupport.a(qfontconfigdatabase.o): In function `QFontconfigDatabase::defaultFont() const': (.text+0x40): undefined reference to `FcPatternCreate' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libQt5PlatformSupport.a(qfontconfigdatabase.o): In function `QFontconfigDatabase::defaultFont() const': (.text+0x4b): undefined reference to `FcDefaultSubstitute' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libQt5PlatformSupport.a(qfontconfigdatabase.o): In function `QFontconfigDatabase::defaultFont() const': (.text+0x6a): undefined reference to `FcPatternGetString' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libQt5PlatformSupport.a(qfontconfigdatabase.o): In function `QFontconfigDatabase::defaultFont() const': (.text+0x72): undefined reference to `FcPatternCreate' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libQt5PlatformSupport.a(qfontconfigdatabase.o): In function `QFontconfigDatabase::defaultFont() const': (.text+0x8e): undefined reference to `FcPatternAddString' /usr/lib/gcc/x86_64-unknown-linux-gnu/4.8.2/../../../../lib/libQt5PlatformSupport.a(qfontconfigdatabase.o): In function `QFontconfigDatabase::defaultFont() const': (.text+0x9a): undefined reference to `FcConfigSubstitute' Steps to reproduce: git clone git://gitorious.org/qt/qtwayland.git cd qtwayland qmake make |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Monday, 19 January 2015, 15:10 GMT
Reason for closing: Fixed
Additional comments about closing: qt5-base 5.4.0-2
Monday, 19 January 2015, 15:10 GMT
Reason for closing: Fixed
Additional comments about closing: qt5-base 5.4.0-2
qtwayland also needs qt5-base built with GLES, I'm wrong?
The configuration advertise egl and eglfs and the qtwayland check doesn't fail.
This is the output when I build qt5-wayland-git from AUR (https://aur.archlinux.org/packages/qt5-wayland-git/): http://pastebin.com/wTp0GBre
Both fontconfig and freetype2 gets installed.
This error happens also when I build qtwayland on my system (no chroot) though.
Getting extra/qt5 from ABS and taking the libQt5PlatformSupport.a that gets built fixes this issue. (I didn't try to completely replace the Qt install)
However, (related), qt5-wayland-git still won't build because of some broken code.
I'm not quite sure why that is, but it seems upstream hasn't finished updating the code and some of it is in a broken state.
I fixed the obvious things and got it to build.
I put up a patch if anyone's interested: http://oro.sodimm.me/~hinata/devel/qt5-wayland-git/ (Feel free to use it)
From my very limited testing, at least the -platform wayland part works. (I'll try a few things related to the compositor part tomorrow.)
I guess qt5-base doesn't need a rebuild because fontconfig/freetype2 have not rebuilt since the qt5-base build.
My build log: http://pastebin.com/wRjdphX7 and error: http://pastebin.com/k1JzWfib
Arch apparently monkey patches qmake in its qt-base PKGBUILD, which breaks the generation of Makefiles for QPA plugins. You can workaround it by adding -lfontconfig and -lglib-2.0 to QMAKE_LIBS_PRIVATE in the .pro file of the QPA plugin. See this commit for an example: https://github.com/kovidgoyal/calibre/commit/fce51f8b1d793857f42489a5308dcee701fdb6bc
sed -i "s|-O2|${CXXFLAGS}|" qtbase/mkspecs/common/{g++,gcc}-base.conf
sed -i "/^QMAKE_LFLAGS_RPATH/s| -Wl,-rpath,||g" qtbase/mkspecs/common/gcc-base-unix.conf
sed -i "/^QMAKE_LFLAGS\s/s|+=|+= ${LDFLAGS}|g" qtbase/mkspecs/common/gcc-base.con
did broke it?
I'm trying to build qt5 without them and see what happens.
qmake CONFIG+=wayland-compositor QMAKE_LIBS_PRIVATE+="-lfontconfig -lfreetype -lXrender"
(PKGBUILD version that i used) http://pkgbuild.com/git/aur-mirror.git/tree/qt5-wayland-git/PKGBUILD?id=f689c7937f53cc692b08356214b463114eaa0894
Got running transmission-qt after passing -platform wayland as an argument
# This should be considered as a workaround fort the bug within qt5's pkgbuilds
Then I got totally the same results about fontconfig linking problems.
This is always reproducible if you try to compile qtwayland from source.
The errors I got are slightly different, though.
(still the same long qmake line, as ~qt5-base package is still broken)
#Sidenote: under new mesa/weston "QT_QPA_PLATFORM=wayland-egl" finally works
EDIT: This whole issue is about broken »qmake« (made from "monkey patched" PKGBUILD), which is as broken as it was almost a year ago.
The only issue for me is that results on my machine would be provided after far too long time (days, not hours… i wouldn't trust ccache with such crazy bug)
qmake is still broken as of 2015-01-14
Recompiled qt5 with unchanged PKGBUILD via makepkg - qmake is broken in the same way. 2015-01-17 (6h of wasted time each time)
Compilation of qt5 without seds fails with some qtwebkit modules but produces »working« qt5-base. 2015-01-17
Related:
FS#43186