SUMMARY When trying to build kmymoney (from git master) on Fedora 28, you get an error trying to find LibAlkimia and Qt4 Core / DBus STEPS TO REPRODUCE 1. Have Fedora 28 system 2. Make sure LibAlkimia and Qt4 libraries are installed on Fedora 28 3. Run cmake against latest kmymoney git master OBSERVED RESULT Error finding LibAlkimia5 cmake file Errors reported finding target for Qt4::Core and Qt4::DBus EXPECTED RESULT LibAlkimia is found Qt4 targets found ADDITIONAL INFORMATION If you update the CMakeLists.txt to look for LibAlkimia instead of LibAlkimia5 cmake file, then it finds the version 7 library If you update the CMakeLists.txt to look for Qt package as well as Qt5 then it complains about "CMake Error: The INTERFACE_QT_MAJOR_VERSION property of "Qt4::QtCore" does not agree with the value of QT_MAJOR_VERSION already determined"
git master is Qt5/KF5 only. You won't be able to build it with Qt4. If Fedora 28 does not provide Qt5 then use the KMyMoney 4.8 branch to build. Or am I missing something here?
(In reply to Thomas Baumgart from comment #1) > git master is Qt5/KF5 only. You won't be able to build it with Qt4. If > Fedora 28 does not provide Qt5 then use the KMyMoney 4.8 branch to build. Or > am I missing something here? Fedora 28 does have Qt5/KF5 and ships KMyMoney5. Qt5 is installed (5.11), but when you run cmake it complains that it needs Qt4::Core and Qt4::DBus Some example errors when running cmake are: CMake Error at tools/CMakeLists.txt:1 (add_executable): Target "xea2kmt" links to target "Qt4::QtCore" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? CMake Error at tools/CMakeLists.txt:1 (add_executable): Target "xea2kmt" links to target "Qt4::QtDBus" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? CMake Error at kmymoney/CMakeLists.txt:114 (add_executable): Target "kmymoney" links to target "Qt4::QtCore" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing? CMake Error at kmymoney/CMakeLists.txt:114 (add_executable): Target "kmymoney" links to target "Qt4::QtDBus" but the target was not found. Perhaps a find_package() call is missing for an IMPORTED target, or an ALIAS target is missing?
I vaguely recall having the same or similar problem during the switch from qt4 to qt5. My not so accurate memory tells me there is some "generic" command being used which uses either config files or environment variables to choose whether to use the actual qt4 or qt5 version of the tool. It's not "cmake" itself, but something it calls - or maybe just which version of some .cmake file it uses. I remember it being an unavoidable problem when having both qt4 and qt5 installed. Try setting "QT_SELECT=qt5 cmake ...." and see if that forces the right versions. Check the docs for qtchooser to see if it gives any useful hints.
I've made sure that qtchooser-default is pointing to qt5 and tried running cmake with QT_SELECT=qt5 but still get the same errors. Going through the outputs in the build directory, the only reference is to qt5 not qt4 I've just removed qt3, so I'll see if that makes any difference.
Unfortunately that didn't make any difference, still get the same errors. Is there any extra diagnostics I can enable to see what is causing the issue?
Created attachment 117431 [details] attachment-14052-0.html I was able to compile KMM5 on Fedora 28 before upgrading to F29. As I recall I had to setup a repository with one or more packages that were required to make it work. I will look to see if I can find the details but if you search for messages to and from me on the developer list you may find what you are looking for. Look for a thread with the subject "Problems Compiling KMM KF5". There may be others that are related in that time frame. If you have any OFX accounts mapped in KMM the mappings will be broken. You have to unmap and remap them. I have notes that suggest changing: provider="KMyMoney OFX" to provider="ofximporter" for every bank that is mapped may fix this problem. I know I tried it, i just don't remember if it worked or if I had to remap all of the accounts. ---- Brendan Coupe On Sat, Jan 12, 2019 at 6:28 PM Ian Neal <bugzilla_noreply@kde.org> wrote: > https://bugs.kde.org/show_bug.cgi?id=403156 > > --- Comment #5 from Ian Neal <iann_bugzilla@blueyonder.co.uk> --- > Unfortunately that didn't make any difference, still get the same errors. > Is > there any extra diagnostics I can enable to see what is causing the issue? > > -- > You are receiving this mail because: > You are the assignee for the bug.
For what it's worth, both kmymoney-5.0 and kmymoney master builds fine on f28 for me (master required building libalkimia master from source as it's not released or packaged yet). I do not use qtchooser, so it's possible that may be to blame here somehow.
@Rex: KMyMoney commit 15bfa066212958a258 in master should allow to build with both versions of libalkimia (released and master).
Thanks for the clarification. I'd jumped to that conclusion seeing the output: " The following configuration files were considered but not accepted: /usr/lib64/cmake/LibAlkimia5-7.0/LibAlkimia5Config.cmake, version: 7.0.1 "
(In reply to Rex Dieter from comment #9) > Thanks for the clarification. > > I'd jumped to that conclusion seeing the output: > > " The following configuration files were considered but not accepted: > /usr/lib64/cmake/LibAlkimia5-7.0/LibAlkimia5Config.cmake, version: 7.0.1 The alkimia check in https://cgit.kde.org/kmymoney.git/tree/CMakeLists.txt?h=5.0#n73 is hardcoded to a single alkimia version and need to be fixed. As workaround in top level CMakeLists.txt chane from find_package(LibAlkimia5 7.0.0 REQUIRED) to find_package(LibAlkimia5 7.0 REQUIRED)
(In reply to Ralf Habacker from comment #10) > (In reply to Rex Dieter from comment #9) > > Thanks for the clarification. > > > > I'd jumped to that conclusion seeing the output: > > > > " The following configuration files were considered but not accepted: > > /usr/lib64/cmake/LibAlkimia5-7.0/LibAlkimia5Config.cmake, version: 7.0.1 > The alkimia check in > https://cgit.kde.org/kmymoney.git/tree/CMakeLists.txt?h=5.0#n73 is hardcoded > to a single alkimia version and need to be fixed. As workaround in top level > CMakeLists.txt chane from > find_package(LibAlkimia5 7.0.0 REQUIRED) > to > find_package(LibAlkimia5 7.0 REQUIRED) Under my Fedora 28, the location is: /usr/lib64/cmake/LibAlkimia-7.0/LibAlkimiaConfig.cmake Note LibAlkimia instead of LibAlkimia5 in both cases
(In reply to Ian Neal from comment #11) > (In reply to Ralf Habacker from comment #10) > > (In reply to Rex Dieter from comment #9) > > > Thanks for the clarification. > > > > > > I'd jumped to that conclusion seeing the output: > > > > > > " The following configuration files were considered but not accepted: > > > /usr/lib64/cmake/LibAlkimia5-7.0/LibAlkimia5Config.cmake, version: 7.0.1 > > The alkimia check in > > https://cgit.kde.org/kmymoney.git/tree/CMakeLists.txt?h=5.0#n73 is hardcoded > > to a single alkimia version and need to be fixed. As workaround in top level > > CMakeLists.txt chane from > > find_package(LibAlkimia5 7.0.0 REQUIRED) > > to > > find_package(LibAlkimia5 7.0 REQUIRED) > > Under my Fedora 28, the location is: > /usr/lib64/cmake/LibAlkimia-7.0/LibAlkimiaConfig.cmake > Note LibAlkimia instead of LibAlkimia5 in both cases Okay found my problem. I had install the RPM: libalkimia-devel-7.0.1-2.fc28.x86_64 Hence the location of the cmake file, once I installed libalkimia-qt5-devel-7.0.1-2.fc28.x86_64 cmake found the correct LibAlkimia5Config.cmake and stopped complaining about Qt4::Core and Qt4::DBus Still needed Ralf's suggested change though to CMakeLists.txt for it to not complain about libalkimia version 7.0.1
Git commit 82af18232bb780e5117318a4dc487c3638085a9e by Ralf Habacker. Committed on 14/01/2019 at 13:03. Pushed by habacker into branch '5.0'. Fix cmake warning on finding alkimia package with different minor version FIXED-IN:5.0.3 Reviewed By: tbaumgart Differential Revision: https://phabricator.kde.org/D18241 M +2 -2 CMakeLists.txt https://commits.kde.org/kmymoney/82af18232bb780e5117318a4dc487c3638085a9e
Git commit 5cf4c62fd0109b6ab8b42d3429e96b361a2e5ee0 by Ralf Habacker. Committed on 14/01/2019 at 13:04. Pushed by habacker into branch '5.0'. Fix finding of alkimia version 7 with custom install path Reviewed By: tbaumgart Differential Revision: https://phabricator.kde.org/D18242 M +8 -0 CMakeLists.txt https://commits.kde.org/kmymoney/5cf4c62fd0109b6ab8b42d3429e96b361a2e5ee0
(In reply to Ralf Habacker from comment #14) > Git commit 5cf4c62fd0109b6ab8b42d3429e96b361a2e5ee0 by Ralf Habacker. > Committed on 14/01/2019 at 13:04. > Pushed by habacker into branch '5.0'. > > Fix finding of alkimia version 7 with custom install path > Reviewed By: tbaumgart > Differential Revision: https://phabricator.kde.org/D18242 > > M +8 -0 CMakeLists.txt > > https://commits.kde.org/kmymoney/5cf4c62fd0109b6ab8b42d3429e96b361a2e5ee0 Issue has been reported to cmake at https://gitlab.kitware.com/cmake/cmake/issues/18797
(In reply to Ralf Habacker from comment #15) > > Fix finding of alkimia version 7 with custom install path > Issue has been reported to cmake at > https://gitlab.kitware.com/cmake/cmake/issues/18797 With cmake >= 3.12 there is a new cmake variable named <PACKAGENAME>_ROOT, which solves this issue (see https://cmake.org/cmake/help/v3.13/policy/CMP0074.html). The question is if would be possible to set cmake minimum version to 3.12 for kmymoney.