On Mittwoch, 25. Dezember 2024 23:26:35 CET Jack Ostroff via KMyMoney-devel wrote:
> Merry Christmas to all. > > In bits of spare time, I've been trying to compile libalkimia and > kmymoney for Qt6. I was having some difficulties getting them to find > mpir. While digging into the details of why, as I read the code, I see > KMyMoney prefers MPIR to GMP (from CMakeLists.txt) since 6 years ago. > Wikipedia (https://en.wikipedia.org/wiki/MPIR_(mathematics_software)) > mentions that "According to the MPIR-devel mailing list, "MPIR is no > longer maintained" with a link to > https://groups.google.com/g/mpir-devel/c/qTOaOBuS2E4/m/_8AQjEieAAAJ?pli=1 > which includes "MPIR is no longer maintained for years now." from a post > from 23 Dec 2021. Given this, is there any reason to continue our > preference from mpir over mgp? Not really, something we should change. Although, the preference is only in alkimia. KMyMoney contains two references to gmpxx.h: kmymoney/mymoney/mymoneymoney.cpp 21:#include <gmpxx.h> kmymoney/mymoney/payeeidentifier/ibanbic/ibanbic.cpp 11:#include <gmpxx.h> and on my distro, mpir is not included so apparently I use gmp for a long time already. > Back to the code, without mpir installed, libalkimia seems to find gmp > with no problem, but fails later in cmake (which I'll discuss in a > separate thread.) However, running cmake for KMyMoney, I get: > > CMake Error at > /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package): > By not providing "FindGMP.cmake" in CMAKE_MODULE_PATH this project has > asked CMake to find a package configuration file provided by "GMP", but > CMake did not find one. > > Could not find a package configuration file provided by "GMP" with any of > the following names: > > GMPConfig.cmake > gmp-config.cmake > > Add the installation prefix of "GMP" to CMAKE_PREFIX_PATH or set > "GMP_DIR" > to a directory containing one of the above files. If "GMP" provides a > separate development package or SDK, be sure it has been installed. > Call Stack (most recent call first): > /home/jack/KDE/KMM/libalkimia/build6/src/LibAlkimia6Config.cmake:31 > (find_dependency) > CMakeLists.txt:216 (find_package) > > I can find neither GMPConfig.cmake nor gmp-config.cmakeanywhere on my > system, but I do have pkgconfig files gmp.pc and gmpxx.pc. So - why can > libalkimia find it but not kmymoney? I have cmake 3.31.3 installed. Is > my system somehow misconfigured, or have I missed something? I don't see any reference to GMP nor MPIR in the KMyMoney build instructions: thb@sy-346-nb /home/thb/devel/kmymoney (master)$ find -name CMakeLists.txt | xargs grep -i gmp thb@sy-346-nb /home/thb/devel/kmymoney (master)$ find -name CMakeLists.txt | xargs grep -i mpir thb@sy-346-nb /home/thb/devel/kmymoney (master)$ I'd try the following: - Start with a complete empty build directory and see if that makes a difference. - In case that does not help, try running cmake with option --trace-expand (and maybe redirect output of stdout and stderr to a file). Try to see what cmake does, when it fails. -- Regards Thomas Baumgart ------------------------------------------------------------- C makes it easy for you to shoot yourself in the foot. C++ makes that harder, but when you do, it blows away your whole leg. -- Bjarne Stroustrup -------------------------------------------------------------
signature.asc
Description: This is a digitally signed message part.