The build fails with the following linker errors since updating to Qt 5.15.0: [ 300s] /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: /tmp/kexi_reportplugin.so.SHZfI0.ltrans0.ltrans.o: in function `KRScriptFunctions::qt_metacast(char const*)': [ 300s] <artificial>:(.text+0x87f6): undefined reference to `KReportGroupTracker::qt_metacast(char const*)' [ 300s] /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: /tmp/kexi_reportplugin.so.SHZfI0.ltrans0.ltrans.o: in function `KRScriptFunctions::qt_metacall(QMetaObject::Call, int, void**)': [ 300s] <artificial>:(.text+0x8836): undefined reference to `KReportGroupTracker::qt_metacall(QMetaObject::Call, int, void**)' [ 300s] /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: /tmp/kexi_reportplugin.so.SHZfI0.ltrans0.ltrans.o:(.data.rel.ro+0x14): undefined reference to `typeinfo for KReportGroupTracker' [ 300s] /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: /tmp/kexi_reportplugin.so.SHZfI0.ltrans0.ltrans.o:(.data.rel.ro+0x684): undefined reference to `KReportGroupTracker::staticMetaObject' [ 300s] /usr/lib/gcc/i586-suse-linux/10/../../../../i586-suse-linux/bin/ld: /tmp/kexi_reportplugin.so.SHZfI0.ltrans1.ltrans.o: in function `KRScriptFunctions::~KRScriptFunctions()': [ 300s] <artificial>:(.text+0x1cd8): undefined reference to `vtable for KReportGroupTracker'
Hm, I'm not sure that GCC 10 is really the problem here, as I tried to build it with GCC 7 on Tumbleweed as well, and it still failed... Although, it does indeed still build fine on Leap 15.1 with the latest KF5 and Qt5...
(In reply to Wolfgang Bauer from comment #1) > Hm, I'm not sure that GCC 10 is really the problem here, as I tried to build > it with GCC 7 on Tumbleweed as well, and it still failed... Might have been a different problem though, so it's likely indeed related to gcc 10.
Hi, thanks for reporting. One possible issue is KEXI linking to a KReport library that is built without scripting.
I meant the header config-kreport.h may have KREPORT_SCRIPTING defined but the actual abstract KReportGroupTracker object is not exported. Similar effect can be observed if the compiler does not allow inline constructors anymore for such linkage. I am attaching a test patch for KReport 3.2 for you to try it - KReportGroupTracker is defined non-inline this time. Could you please try to build KReport with it?
Created attachment 129330 [details] Move the methods to cpp
(In reply to Jarosław Staniek from comment #5) > Created attachment 129330 [details] > Move the methods to cpp Unfortunately, building kreport fails already now: [ 132s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: /tmp/libKReport3.so.4.2.0.RUCrZz.ltrans4.ltrans.o: in function `KReportGroupTracker::KReportGroupTracker()': [ 132s] <artificial>:(.text+0x58e): undefined reference to `vtable for KReportGroupTracker' [ 132s] /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: /tmp/libKReport3.so.4.2.0.RUCrZz.ltrans4.ltrans.o: in function `KReportGroupTracker::~KReportGroupTracker()': [ 132s] <artificial>:(.text+0x5a3): undefined reference to `vtable for KReportGroupTracker' [ 132s] collect2: error: ld returned 1 exit status
Created attachment 129419 [details] V2 patch Please try to build KReport with V2 patch, thanks.
(In reply to Jarosław Staniek from comment #7) > Created attachment 129419 [details] > V2 patch > > Please try to build KReport with V2 patch, thanks. Yes, with the 2nd patch, kreport builds fine. And kexi's build succeeded as well afterwards.
Great, so I am changing the product to KReport and applying the fix. Thanks!
Git commit 5d3053ea78b349b81b7a562974ad78f93d169791 by Jaroslaw Staniek. Committed on 16/06/2020 at 20:00. Pushed by staniek into branch '3.2'. Fix build with GCC 10 (make KReportGroupTracker use C++ file) CCMAIL:adam@piggz.co.uk FIXED-IN:3.2.1 M +1 -4 src/CMakeLists.txt A +26 -0 src/renderer/scripting/KReportGroupTracker.cpp [License: LGPL (v2.1+)] M +21 -4 src/renderer/scripting/KReportGroupTracker.h https://invent.kde.org/libraries/kreport/commit/5d3053ea78b349b81b7a562974ad78f93d169791