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

Jack ostroffjh at users.sourceforge.net
Wed Nov 2 19:24:49 UTC 2016


On 2016.11.02 14:35, Ralf Habacker wrote:
> Am 01.11.2016 um 00:05 schrieb Jack:

>> For Gentoo, if two versions are coinstallable, they get assigned to  
>> different "slots" and in this case, I think the slot number would  
>> easily correspond to the qt version (4 or 5) to align with other qt  
>> and kde packages.  Also, as Gentoo is a source based distro, they  
>> really cannot install any files with the same name, so the base  
>> libalkimia.so should go to libalkimia4.so and libalkimia5.so.  (One  
>> of them could stay libalkimia.so, but why not make things consistent  
>> if were changing that much anyway?)

> Collecting all requirements we get the following installation path  
> layout:
> 
> Alikima 6.0.90 Qt4: [on a x86_64 system using /usr/local install  
> prefix]
> -- Installing: /usr/local/lib64/libalkimia4.so.6.0.90
> -- Installing: /usr/local/lib64/libalkimia4.so.6
> -- Installing: /usr/local/lib64/libalkimia4.so
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia4-6.0/LibAlkimia4Targets.cmake
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia4-6.0/LibAlkimia4Targets-noconfig.cmake
> -- Installing: /usr/local/include/alkimia4-6.0/alkimia/alkvalue.h
> -- Installing: /usr/local/include/alkimia4-6.0/alkimia/alkquoteitem.h
> -- Installing: /usr/local/include/alkimia4-6.0/alkimia/alkcompany.h
> -- Installing: /usr/local/include/alkimia4-6.0/alkimia/alk_export.h
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia4-6.0/LibAlkimia4Config.cmake [1]
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia4-6.0/LibAlkimia4ConfigVersion.cmake
> -- Installing: /usr/local/lib64/cmake/LibAlkimia4-6.0/FindGMP.cmake
> -- Installing: /usr/local/lib64/pkgconfig/libalkimia4.pc [2]
> 
> [1] with  
> LIBALKIMIA4_INCLUDE_DIR=${PACKAGE_PREFIX_DIR}/include/alkimia4-6.0/  
> and  
> LIBALKIMIA4_LIBRARIES=${PACKAGE_PREFIX_DIR}/lib64/libalkimia4.so.6.0.90
> [2] with includedir=include/alkimia4-6.0 and Libs:-lalkimia4
> 
> Alkimia 6.0.90 Qt5:  [on a x86_64 system using /usr/local install  
> prefix]
> -- Installing: /usr/local/lib64/libalkimia5.so.6.0.90
> -- Installing: /usr/local/lib64/libalkimia5.so.6
> -- Installing: /usr/local/lib64/libalkimia5.so
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia5-6.0/LibAlkimia5Targets.cmake
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia5-6.0/LibAlkimia5Targets-noconfig.cmake
> -- Installing: /usr/local/include/alkimia5-6.0/alkimia/alkvalue.h
> -- Installing: /usr/local/include/alkimia5-6.0/alkimia/alkquoteitem.h
> -- Installing: /usr/local/include/alkimia5-6.0/alkimia/alkcompany.h
> -- Installing: /usr/local/include/alkimia5-6.0/alkimia/alk_export.h
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia5-6.0/LibAlkimia5Config.cmake [1]
> -- Installing:  
> /usr/local/lib64/cmake/LibAlkimia5-6.0/LibAlkimia5ConfigVersion.cmake
> -- Installing: /usr/local/lib64/cmake/LibAlkimia5-6.0/FindGMP.cmake
> -- Installing: /usr/local/lib64/pkgconfig/libalkimia5.pc [2]
> 
> [1] with  
> LIBALKIMIA5_INCLUDE_DIR=${PACKAGE_PREFIX_DIR}/include/alkimia5-6.0/  
> and  
> LIBALKIMIA5_LIBRARIES=${PACKAGE_PREFIX_DIR}/lib64/libalkimia5.so.6.0.90
> [2] with includedir=include/alkimia5-6.0 and Libs:-lalkimia5
> 
> 
> On the client side this would required to use
> 
> if(QT4_FOUND)
>    find_package(LibAalkimia4)
>    if(NOT LIBALKIMIA4_FOUND)
> 	find_package(LibAalkimia)
>    endif()
> else()
>    find_package(LibAalkimia5)
> endif()
> 
> if(QT4_FOUND)
>    set(QT_SLOT 4)
> else()
>    set(QT_SLOT 5)
> endif()
> 
> find_package(LibAalkimia${QT_SLOT})
> ...
> 
> |add_executable(<target> ...) target_link_libraries(<target>
> Alkimia::alkimia)|
> 
> BTW: Using the '4' slot has also the advantage to not conflict with  
> the present cmake find module for version 4.3.2 which already results  
> in some detection issues.
> 
> If that is accepted I would provide a pull or review request for  
> alkimia with a related patch.
> 
> Cheers
> Ralf
> 
> 
I don't see any problems - hopefully someone who is more of a Gentoo  
developer will also confirm.  Note that QT_SLOT is not the same as a  
Gentoo ebuild slot, although I suspect they will always match as both 4  
or both 5.

One question on the above - the first if(QT4_FOUND) seems to call the  
appropriate find_package, so are the second if(QT_4_FOUND) and the  
following find_package really needed, or do I just not understand the  
cmake-foo?

Jack


More information about the KMyMoney-devel mailing list