Bug 376043 - Build failure for 4.8 with Qt 5.7.1 on Fedora 25
Summary: Build failure for 4.8 with Qt 5.7.1 on Fedora 25
Status: RESOLVED FIXED
Alias: None
Product: libalkimia
Classification: Frameworks and Libraries
Component: General (show other bugs)
Version: master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-05 12:33 UTC by Ian Neal
Modified: 2020-09-22 15:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.0.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Neal 2017-02-05 12:33:55 UTC
Trying to build from current 4.8 branch, I get the following build failure. CMakeCache.txt contains QT_MOC_EXECUTABLE:FILEPATH=/usr/lib64/qt4/bin/moc-qt4
Going back to 4.8 branch from August 2016 does work.

[  0%] Automatic moc for target kgpgfile
[  0%] Built target kgpgfile_automoc
[  0%] Building CXX object libkgpgfile/CMakeFiles/kgpgfile.dir/kgpgfile_automoc.cpp.o
In file included from /home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/kgpgfile_automoc.cpp:2:0:
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:15:2: error: #error "This file was generated using the moc from 5.7.1. It"
 #error "This file was generated using the moc from 5.7.1. It"
  ^~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:16:2: error: #error "cannot be used with the include files from this version of Qt."
 #error "cannot be used with the include files from this version of Qt."
  ^~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:17:2: error: #error "(The moc has changed too much.)"
 #error "(The moc has changed too much.)"
  ^~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:22:5: error: ‘QByteArrayData’ does not name a type
     QByteArrayData data[1];
     ^~~~~~~~~~~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:28:24: error: ‘QByteArrayData’ was not declared in this scope
         - idx * sizeof(QByteArrayData)) \
                        ^
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:32:1: note: in expansion of macro ‘QT_MOC_LITERAL’
 QT_MOC_LITERAL(0, 0, 8) // "KGPGFile"
 ^~~~~~~~~~~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:29:5: error: ‘Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET’ was not declared in this scope
     )
     ^
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:32:1: note: in expansion of macro ‘QT_MOC_LITERAL’
 QT_MOC_LITERAL(0, 0, 8) // "KGPGFile"
 ^~~~~~~~~~~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:64:61: error: ‘const struct qt_meta_stringdata_KGPGFile_t’ has no member named ‘data’
     { &QFile::staticMetaObject, qt_meta_stringdata_KGPGFile.data,
                                                             ^~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:65:51: error: ‘Q_NULLPTR’ was not declared in this scope
       qt_meta_data_KGPGFile,  qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
                                                   ^~~~~~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:65:62: error: ‘Q_NULLPTR’ was not declared in this scope
       qt_meta_data_KGPGFile,  qt_static_metacall, Q_NULLPTR, Q_NULLPTR}
                                                              ^~~~~~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp: In member function ‘virtual const QMetaObject* KGPGFile::metaObject() const’:
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:71:57: error: ‘class QObjectData’ has no member named ‘dynamicMetaObject’; did you mean ‘metaObject’?
     return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject;
                                                         ^~~~~~~~~~~~~~~~~
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp: In member function ‘virtual void* KGPGFile::qt_metacast(const char*)’:
/home/gizmo/kmymoney/kmymoney4/build_48/libkgpgfile/moc_kgpgfile.cpp:76:26: error: ‘Q_NULLPTR’ was not declared in this scope
     if (!_clname) return Q_NULLPTR;
                          ^~~~~~~~~
libkgpgfile/CMakeFiles/kgpgfile.dir/build.make:86: recipe for target 'libkgpgfile/CMakeFiles/kgpgfile.dir/kgpgfile_automoc.cpp.o' failed
make[2]: *** [libkgpgfile/CMakeFiles/kgpgfile.dir/kgpgfile_automoc.cpp.o] Error 1
CMakeFiles/Makefile2:278: recipe for target 'libkgpgfile/CMakeFiles/kgpgfile.dir/all' failed
make[1]: *** [libkgpgfile/CMakeFiles/kgpgfile.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
Comment 1 Rex Dieter 2017-02-05 15:07:06 UTC
I strongly suspect this commit:

commit 7c2cd673db727abb6185eb70c52551bf21228d16
Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
Date:   Thu Nov 10 15:53:32 2016 +0100

    Use GpgME++ if possible, QGpgme from kdepimlibs-4 as fallback
    
    Remove bogus qgpgme include.
    
    REVIEW: 129371



Since gpgme++ is Qt5-based (well qgpgme is)
Comment 2 Rex Dieter 2017-02-05 15:20:33 UTC
I cannot reproduce the failure reported here on my f25 box.

What I did:

sudo dnf builddep kmymoney -y
git clone kde:kmymoney
cd kmymoney
git checkout remotes/origin/4.8 --track
mkdir build; cd build
cmake ..
make -j2

(I *did* have a failure once, because I had a local copy of Qt5-based libalkimia installed, fyi, upstream: please rename Qt5's libalkimia *Config.cmake to make it clear it is not compatible with Qt4-based libalkimia-5.x)
Comment 3 Ian Neal 2017-02-05 16:13:35 UTC
(In reply to Rex Dieter from comment #2)
> I cannot reproduce the failure reported here on my f25 box.
> 
> What I did:
> 
> sudo dnf builddep kmymoney -y
> git clone kde:kmymoney
> cd kmymoney
> git checkout remotes/origin/4.8 --track
> mkdir build; cd build
> cmake ..
> make -j2
> 
> (I *did* have a failure once, because I had a local copy of Qt5-based
> libalkimia installed, fyi, upstream: please rename Qt5's libalkimia
> *Config.cmake to make it clear it is not compatible with Qt4-based
> libalkimia-5.x)

Yes, I have a locally built libalkimia (as I needed it to build git master version of kmymoney)
Comment 4 Rex Dieter 2017-02-06 12:47:54 UTC
Right, that matches my findings libalkmimia/master branch only works with kmymoney/master, and actually breaks kmymoney/4.8 branch

Triaging this to libalkimia
Comment 5 Jack 2020-01-12 17:45:11 UTC
Is this still relevant with newer versions of most of the moving parts?  Even if specific versions of KMM require specific versions of libalkimia, is there still a bug present, or maybe just a need for better documentation?
Comment 6 Ralf Habacker 2020-09-22 15:51:49 UTC
(In reply to Jack from comment #5)
> Is this still relevant with newer versions of most of the moving parts? 
> Even if specific versions of KMM require specific versions of libalkimia, is
> there still a bug present
Since libalkimia version 7.0.0 the Qt5 and Qt4 build variants are installed in separate locations and uses different names for cmake find_package support, so this bug should be fixed.