<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 12/26/24 2:10 AM, Thomas Baumgart
via KMyMoney-devel wrote:<br>
</div>
<blockquote type="cite" cite="mid:2557357.XAFRqVoOGU@sy-346-nb">
<pre wrap="" class="moz-quote-pre">On Mittwoch, 25. Dezember 2024 23:26:35 CET Jack Ostroff via KMyMoney-devel wrote:
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">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 (<a class="moz-txt-link-freetext" href="https://en.wikipedia.org/wiki/MPIR_(mathematics_software))">https://en.wikipedia.org/wiki/MPIR_(mathematics_software))</a>
mentions that "According to the MPIR-devel mailing list, "MPIR is no
longer maintained" with a link to
<a class="moz-txt-link-freetext" href="https://groups.google.com/g/mpir-devel/c/qTOaOBuS2E4/m/_8AQjEieAAAJ?pli=1">https://groups.google.com/g/mpir-devel/c/qTOaOBuS2E4/m/_8AQjEieAAAJ?pli=1</a>
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?
</pre>
</blockquote>
<pre wrap="" class="moz-quote-pre">
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.
</pre>
<blockquote type="cite">
<pre wrap="" class="moz-quote-pre">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?
</pre>
</blockquote>
<pre wrap="" class="moz-quote-pre">
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.</pre>
</blockquote>
<p>I found the cause. When I first tried building KMM with Qt6, it
couldn't find libalkimia (which I was also having problems
compiling) so I added <span style="font-family:monospace"><span
style="color:#000000;background-color:#ffffff;">-DLibAlkimia6_DIR
pointing (incorrectly) to the alkimia build dir, so it seems
to have picked up alkimia's need for gmp, but not it's cmake
file to actually find it. Once I finally built and installed
the Qt6 alkimia, the KMM cmake (pointed to that same install
dir) picked it up correctly.<br>
</span></span></p>
</body>
</html>