[Kmymoney] KMyMoney 4.6.3 fails to compile under KDE-4.10.2

Thomas Baumgart thb at net-bembel.de
Thu May 2 06:18:46 UTC 2013


Hi,

On Wednesday 01 May 2013 21:19:09 Dr.-Ing. Edgar Alwers wrote:

> Hi all,
> 
> I am buildiing a new BLFS System with KDE-4.10.2, Kernel 3.8.5, cmake
> version 2.8.10.2 , GNU Make 3.82.
> Actually, I am trying to build the KMyMoney-4.6.3 system. All dependencies
> are accomplished, cmake delivers no errors, everything seems to be perfect.
> However, "make" exits with an error::
> 
> quote
> -------------------
> [ 37%] Building CXX object
> kmymoney/mymoney/CMakeFiles/kmm_mymoney.dir/mymoneymoney.cpp.o
> /sources_kde/kmymoney-4.6.3/kmymoney/mymoney/mymoneymoney.cpp: In member
> function ‘QString MyMoneyMoney::formatMoney(const QString&, int, bool)
> const’:
> /sources_kde/kmymoney-4.6.3/kmymoney/mymoney/mymoneymoney.cpp:167:52:
> error: conversion from ‘__gmp_expr<__mpq_struct [1],
> __gmp_binary_expr<__gmp_expr<__mpq_struct [1],
> __gmp_binary_expr<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>,
> __gmp_expr<__mpq_struct [1], __mpq_struct [1]>, __gmp_binary_minus> >,
> __gmp_expr<__mpz_struct [1], __mpz_struct [1]>, __gmp_binary_multiplies> >’
> to non-scalar type ‘mpz_class {aka __gmp_expr<__mpz_struct [1],
> __mpz_struct [1]>}’ requested
>    mpz_class right = (valueRef() - mpq_class(left)) * denom;
>                                                     ^
> make[2]: ***
> [kmymoney/mymoney/CMakeFiles/kmm_mymoney.dir/mymoneymoney.cpp.o] Error 1
> make[1]: *** [kmymoney/mymoney/CMakeFiles/kmm_mymoney.dir/all] Error 2
> 
> -------------------
> unquote
> 
> I built gmp-5.1.1 also without issues, if the error message is refering to
> this programm. I really cannot explain what is happening and I am runninng
> out of ideas. I have already build KMM-4.6.3 in several other machines,
> running older versions of BLFS and KDE ( 4.8 ). Am I perhaps mixing
> versions which are not compatible ?
> 
> I need of course KMM in my working partition. A fast workaround could be to
> copy KMM from my other Partition in the box, but exactly what should I
> transfer ?
> 
> Any help very appreciated, thanks in advance

The problem is an updated version of libgmp not an updated KDE version. A fix 
is already in git (master and 4.6 branch) since Feb 1st to solve this problem. 
The following patch needs to be applied to older versions.

@@ -164,7 +164,7 @@ QString MyMoneyMoney::formatMoney(const QString& currency, 
const int prec, bool
   // be much better than using KGlobal::locale()->formatMoney.
   bool bNegative = false;
   mpz_class left = value / 
static_cast<MyMoneyMoney>(convertDenominator(d)).valueRef().get_den();
-  mpz_class right = (valueRef() - mpq_class(left)) * denom;
+  mpz_class right = mpz_class((valueRef() - mpq_class(left)) * denom);
 
   if (right < 0) {
     right = -right;


p.s. Sorry 'users', this is more a developers question ;)

-- 

Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
morphir: so much confusion :S kmake, kdemake, qmake make cmake etc.
logixoul: you forgot cmakekde :)
morphir: and bakemeacake
-------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 225 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kmymoney/attachments/20130502/d50c5a70/attachment.sig>


More information about the KMyMoney mailing list