Bug 312481 - KMyMoney fails to compile with gmp-5.10
Summary: KMyMoney fails to compile with gmp-5.10
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: git (master)
Platform: Compiled Sources Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-02 09:05 UTC by Michael Palimaka
Modified: 2013-02-02 23:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Palimaka 2013-01-02 09:05:08 UTC
With gmp-5.10, KMyMoney fails to compile:

[ 22%] Building CXX object kmymoney/mymoney/CMakeFiles/kmm_mymoney.dir/mymoneymoney.cpp.o
/home/michael/dev/kde/kmymoney/kmymoney/mymoney/mymoneymoney.cpp: In member function ‘QString MyMoneyMoney::formatMoney(const QString&, int, bool) const’:
/home/michael/dev/kde/kmymoney/kmymoney/mymoney/mymoneymoney.cpp:161:54: 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
make[2]: *** [kmymoney/mymoney/CMakeFiles/kmm_mymoney.dir/mymoneymoney.cpp.o] Error 1
make[1]: *** [kmymoney/mymoney/CMakeFiles/kmm_mymoney.dir/all] Error 2
make: *** [all] Error 2

Master was at acd08ea8940a10a74de64b310d61cb660b2c7046.

Reproducible: Always
Comment 1 Alex Merry 2013-02-01 15:33:38 UTC
Git commit 77209f84a85360e98d2e805d412956a8f2a77db3 by Alex Merry.
Committed on 01/02/2013 at 16:31.
Pushed by alexmerry into branch 'master'.

Fix build with GMP 5.1.0

GMP 5.1.0 no longer has implicit conversions to mpz_class from mpq_class
or mpf_class.  So we have to have an explicit conversion.

M  +1    -1    kmymoney/mymoney/mymoneymoney.cpp

http://commits.kde.org/kmymoney/77209f84a85360e98d2e805d412956a8f2a77db3
Comment 2 Cristian Oneț 2013-02-02 23:34:25 UTC
Git commit 2ef6aa38ae87c7685c9f32c0cabd0241d3a7a306 by Cristian Oneț, on behalf of Alex Merry.
Committed on 01/02/2013 at 16:31.
Pushed by conet into branch '4.6'.

Fix build with GMP 5.1.0

GMP 5.1.0 no longer has implicit conversions to mpz_class from mpq_class
or mpf_class.  So we have to have an explicit conversion.
(cherry picked from commit 77209f84a85360e98d2e805d412956a8f2a77db3)

M  +1    -1    kmymoney/mymoney/mymoneymoney.cpp

http://commits.kde.org/kmymoney/2ef6aa38ae87c7685c9f32c0cabd0241d3a7a306