More libalkimia problems/questions was: problems compiling 4.8 on system with both qt4 and qt5

Christian Dávid christian-david at web.de
Sun Oct 30 09:59:17 UTC 2016


Hello All,

I am sorry that I answer this late. Hopefully I can still help.

The cause of all trouble in alkimia is that the version checking is not done correctly. Pre alkimia 5 had a find module (which is wrong in the first place) which did not check any version. Also it would find any alkimia version (including 5 & 6).

So renaming the cmake find module and config file will not fix that issue! Even the hack of Thomas in KMyMoney's config file to prevent pulling version 6 does not work here because the find module does not even provide any version information.

In Version 5 I made a mistake, so alkimia 5 marks itself "COMPATIBILITY AnyNewerVersion" (this includes v6.0 v7.0...). However this is not an issue here. If it is easy to publish a version 5.0.1 we should fix that.

My current suggestion to solve this issue is:

1) Let alkimia 4 die. Alkimia 5 is a perfect replacement. The only reason for the version jump was a really tiny change which caused ABI incompatibility. Any code that compiles with alkimia 4 should compile with version 5, too. Also no change in any CMakeLists.txt is needed if no alkimia >= 6 is on the system.

2) In KMyMoney we add the CONFIG option to find_package(). Then alkimia <= 4 is not found anymore. Also we add correct version information to the find_package() call. The hand written check should be removed. CMake has a powerful version checking system, we should relay on that!

Then no complicated naming conventions have to be introduced (which will not solve all issues, btw).

Greetings
Christian

> Thomas Baumgart <thb at net-bembel.de> hat am 23. Oktober 2016 um 10:46 geschrieben:
> 
> 
> Hi,
> 
> On Saturday 22 October 2016 23:20:14 Ralf Habacker wrote:
> 
> > Am 22.10.2016 um 20:02 schrieb Jack:
> 
> [...]
>  
> > > Am I just trying the impossible?
> > 
> > No, I just pushed a commit to a personal repo at
> > https://github.com/rhabacker/alkimia, which readd's Qt4 support to
> > latest version of alkimia. You can build and install alkimia side by
> > side to the Qt5 variant. You may try that. See the commit log how to
> > build alkimia in this way.
> 
> I took a glimpse and this seems to make sense. Would then in KMyMoney 4.8 
> something like
> 
>   find_package(LibAlkimiaQt4)
>   if (not found)
>     find_package(LibAlkimia REQUIRED)
>   endif()
> 
> be possible to further automate for both scenarios? In case it is found, we 
> need to make sure the version check only applies to the Qt5 version if found 
> by that second find_packages() statement above, or am I missing something?
> 
> I believe my cmake foo comes to an end here really soon :)
> 
> 
> 
> -- 
> 
> Regards
> 
> Thomas Baumgart
> 
> GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
> -------------------------------------------------------------
> Memory's the second thing to go ... Can't remember the first.
> -------------------------------------------------------------


More information about the KMyMoney-devel mailing list