Hide Forgot
Description of problem: Hi all, unfortunately the build fails only on x86_64 for all newer fedora versions. It builds just fine on f24. I don't really know what's the root cause, but it seems to be related to a specific Qt/moc version. List of failed builds, based on architecture: http://koji.fedoraproject.org/koji/tasks?owner=hannes&state=all Failed build log of x86_64 build: https://kojipkgs.fedoraproject.org//work/tasks/8711/16058711/build.log Version-Release number of selected component (if applicable): Qt versions >= Qt in fedora 25 How reproducible: see the build logs https://sourceforge.net/p/texstudio/bugs/1938/
It's failing at linking. .obj/manhattanstyle.o: In function `ManhattanStyle::ManhattanStyle(QString const&)': /builddir/build/BUILD/texstudio2.11.2/manhattanstyle.cpp:132: undefined reference to `vtable for ManhattanStyle' .obj/manhattanstyle.o: In function `StyleAnimator::StyleAnimator(QObject*)': /builddir/build/BUILD/texstudio2.11.2/styleanimator.h:90: undefined reference to `vtable for StyleAnimator' .obj/manhattanstyle.o: In function `StyleAnimator::~StyleAnimator()': /builddir/build/BUILD/texstudio2.11.2/styleanimator.h:85: undefined reference to `vtable for StyleAnimator' .obj/manhattanstyle.o: In function `ManhattanStyle::~ManhattanStyle()': /builddir/build/BUILD/texstudio2.11.2/manhattanstyle.cpp:137: undefined reference to `vtable for ManhattanStyle' .obj/manhattanstyle.o: In function `StyleAnimator::~StyleAnimator()': /builddir/build/BUILD/texstudio2.11.2/styleanimator.h:85: undefined reference to `vtable for StyleAnimator' collect2: error: ld returned 1 exit status
So this means, that it's the problem of texstudio? Since upstream said to me it's a fedora-only problem. https://sourceforge.net/p/texstudio/bugs/1938/
Ask them specifically if they've successfully built using Qt >= 5.7 or not
If I am not totally mistaken they've built the Qt5 version against Qt 5.5 For more details, please see the OBS repository. [1] https://build.opensuse.org/public/build/home:jsundermeyer/openSUSE_Leap_42.1/x86_64/texstudio-2.11.2/_log [2] https://build.opensuse.org/package/view_file/home:jsundermeyer/texstudio-2.11.2/texstudio.spec?expand=1
Right, so current evidence still suggests upstream issue when building with newer Qt releases.
Adjusting summary to match current theory
Ok, so they've built it against Qt 5.7 in Kubuntu 16.04 apparently.
Have you tried building without smp_mflags? These errors can be caused by parallel make race conditions, where the build runs before the .moc file is fully generated, usually with an entirely empty .moc file, and so the implementation of the QObject methods from the Q_OBJECT macro is missing. If you wonder why this results in a missing vtable: to avoid emitting the vtable in all classes including the header, g++ picks a virtual method as the "key method" and only emits the vtable in the class implementing the method. If, for some reason, the implementation is missing, the vtable will be generated nowhere. And an empty .moc file is a reason.
I think I did this and the problems persisted. Unfortunately all the build.logs were removed already. I'll try to initiate all the builds again, so that one can have a closer look, what's happening.
Ok, so I kicked of all builds for f25 on all arches and made sure that the smp_mflags are disabled. x86_64: http://koji.fedoraproject.org/koji/taskinfo?taskID=16284659 i686: http://koji.fedoraproject.org/koji/taskinfo?taskID=16284685 armv7hl: http://koji.fedoraproject.org/koji/taskinfo?taskID=16284687 Thanks for helping!
*** Bug 1392614 has been marked as a duplicate of this bug. ***
Hi hannes, first of all, thanks for packing TeXstudio for Fedora. I was planning to upgrade tomorrow to F25. Would it be possible to pack version 2.11.0 meanwhile, or the same problems arise? If there's anything I can help with, please let me know (I warn you I have 0 packing skills, but I'm willing to help even if this implies making efforts).
Well, I don't have enough time at the moment and I don't really know how to debug it properly. 2.11.0 should be in fedora 25, only 2.11.2 is not yet available.
Created attachment 1223429 [details] build.log Build log for http://koji.fedoraproject.org/koji/taskinfo?taskID=16584778
Created attachment 1223430 [details] root.log root.log from http://koji.fedoraproject.org/koji/taskinfo?taskID=16584778
Hi, guys. TeXstudio developer Jan Sundermeyer has an OBS repo with SRPM for the current and previous versions: https://build.opensuse.org/project/show/home:jsundermeyer I've imported the SRPM into the following copr repo, and it builds well: https://copr.fedorainfracloud.org/coprs/edarfoc/TeXstudio/ TeXstudio is built against Qt4 in this way, despite I haven't used the specific Qt4 repo. Maybe he had similar problems trying to compile with Qt5. It's equally fully functional, though. It integrates better in GTK and other environments (fonts, scroll bars... I've checked Gnome, but it has a big list of styles which the current Qt5 version 2.11.0 lacks of, probably because they are not yet available for Qt5). Even more importantly, I previously had inline preview problems for some TiKZ pictures which do not arise now. This is indeed great for me, I use it a lot, and I was previously relying on EqualX (which is not that feature rich for partial compilations) because of this. Hannes, what would you think of building the official Fedora TeXstudio with Qt4 for the time being? I see more pros than cons.
Sorry, I won't go back to Qt4. It's actually not a really important update, which needs to get out as soon as possible. I will update texstudio as soon as we figured out the reason for the build failure on Qt5. Going back to Qt4 again does not really solve the issue at hand.
It does, and the preview issue too, which was reported upstream: https://sourceforge.net/p/texstudio/bugs/1351/ But I'm a total ignorant, so I wouldn't like to insist, I'm sure there must be reasons unknown to me which advice against using qt4. I'm happy with the copr for my own needs.
Any developments on this? Here is what I tried that may be useful: On fully updated Fedora 24 with qt5-5.6.2 I updated hunspell to the version on Fedora 25 and was able to build texstudio 2.11.2, which then I use on my Fedora 25 machines. So, the issue is not simply qt5 but perhaps qt5 5.7.0 and Fedora 25. I can also build qt4 version on Fedora 25 with no problem bu just changing two lines in the spec file. I am not a c++ programmer but if one googles this vtable error you find some explanation as to why it happens. I am not sure how Tim Hoffman says he can build it with 5.7.0 on Kubuntu 16.04 in: https://sourceforge.net/p/texstudio/bugs/1938/?limit=25 Hope there is a solution to this soon. Thanks.
This is an issue with moc, which produces no output for manhattanstyle.h and styleanimator.h on x86_64. Removing the version check macros (patch in attachment) in these files (so solving them by brain) fixes the compilation. http://koji.fedoraproject.org/koji/taskinfo?taskID=16799880
Created attachment 1229568 [details] Remove the version check macros for test
After adding some debugging and educated guesses, we found that *something* in rawhide was defining macros 'major' 'minor' which are both commonly used in other code (often for version checks). We suspect glibc's sysmacros.h to be the culprit, so we're testing 2 changes: 1. patching QT_VERSION_CHECK to use safer/namespaced variables 2. patch moc to define _SYS_SYSMACROS_H http://koji.fedoraproject.org/koji/taskinfo?taskID=16800142
Latest qt5-qtbase build (5.7.1-9.fc26) seems to fix the issue, I already rebuilt texstudio. http://koji.fedoraproject.org/koji/taskinfo?taskID=16808397
I also used the relevant patches in 5.7.0 in fc15 and rebuilt qt5 and texstudio compiled there as well. The question I have is whether this issue was only limited to texstudio or did it effect other builds as well in a more subtle way?
Found one case when building kile development version. The below patch was failing the rpm build because files were still in the deleted kxmlgui directory. With the patched qt5 it builds fine: =======================kile patch===================================--- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -201,6 +201,9 @@ ecm_add_app_icon(kile_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/data/icons/128-apps-kile.png ) +# add the resource file containing the ui files +qt5_add_resources(kile_SRCS kile.qrc) + kf5_add_kdeinit_executable(kile ${kile_SRCS}) if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # for Mac OS X @@ -259,7 +262,6 @@ install(FILES net.sourceforge.kile.main.xml DESTINATION ${DBUS_INTERFACES_INSTAL install(PROGRAMS org.kde.kile.desktop DESTINATION ${XDG_APPS_INSTALL_DIR}) install(FILES kile.kcfg DESTINATION ${KCFG_INSTALL_DIR}) install(FILES data/bibtexentries.rc data/biblatexentries.rc DESTINATION ${DATA_INSTALL_DIR}/kile) -install(FILES kileui.rc docpartui.rc DESTINATION ${KXMLGUI_INSTALL_DIR}/kile) install(FILES data/kile.categories DESTINATION ${KDE_INSTALL_CONFDIR}) install(FILES data/org.kde.kile.appdata.xml DESTINATION ${CMAKE_INSTALL_METAINFODIR}) diff --git a/src/kile.qrc b/src/kile.qrc new file mode 100644 index 0000000..520d1a3 --- /dev/null +++ b/src/kile.qrc @@ -0,0 +1,7 @@ +<!DOCTYPE RCC> +<RCC version="1.0"> + <qresource prefix="/kxmlgui5/kile"> + <file>kileui.rc</file> + <file>docpartui.rc</file> + </qresource> +</RCC>
This issue was not limited to TeXstudio. At least also Qupzilla is affected, but as QT_VERSION macros are widely used I think there are more affected applications. We have to check and rebuild.