plugin problem with newly compiled KMM from git master

Ralf Habacker ralf.habacker at freenet.de
Tue Sep 25 13:32:16 BST 2018


Am 09.05.18 um 00:47 schrieb Jack:
> In trying to track down the printing problem recently filed as a bug,
> I'm having a problem debugging plugins.  As far as I can tell, printing
> of reports is handled by KReportsView::slotPrintView() in
> kmymoney/plugins/views/reports/kreportsview.cpp.  Unfortunately, I can't
> figure out how to get gdb to set a breakpoint in that file, probably
> because it is a plugin and not part of the program itself.  If anyone
> can provide any hints or pointers on suitable instructions, I'd
> appreciate it.

In case this is not known for linux I got some success using this way:

extra-cmake-modules version >= 5.38 has support for installing binaries
in common dirs (see
https://cgit.kde.org/extra-cmake-modules.git/tree/kde-modules/KDECMakeSettings.cmake#n263)


Unfortunately, there are two problems in the kmymoney build system that
prevent you from using it:

1. an outdated ECM version is used which does not yet have this support
(see https://cgit.kde.org/kmymoney.git/tree/CMakeLists.txt#n37).

2. the created plugins are not found because kcoreaddons looks by
default for plugins in <build-dir>/bin/kmymoney
(https://cgit.kde.org/kmymoney.git/tree/kmymoney/pluginloader.cpp#n63)

1. could be fixed by patching the top level CMakeLists.txt
  find_package(ECM 5.10 REQUIRED NO_MODULE)
to
  find_package(ECM 5.38 REQUIRED NO_MODULE)

2. could be fixed by adding the following lines after
include(KDECMakeSettings)

# override settings from KDECMakeSettings
if(NOT WIN32)
  set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
endif()

and run
 cd <build-dir>
 ln -s . lib/kmymoney
 QT_PLUGIN_PATH=$QT_PLUGIN_PATH:$PWD/lib LD_LIBRARY_PATH=$PWD/lib \
 bin/kmymoney


To have icons this additional command could be performed once:

 cd <build-dir>
 make install DESTDIR=$PWD/tmp

kmymoney should then be started with

XDG_DATA_DIRS=$XDG_DATA_DIRS:$PWD/tmp/usr/local/share \
QT_PLUGIN_PATH=$QT_PLUGIN_PATH:$PWD/lib \
LD_LIBRARY_PATH=$PWD/lib bin/kmymoney

It should then be possible to set breakpoints if kmymoney is configured
with CMAKE_BUILD_TYPE=Debug or CMAKE_BUILD_TYPE=RelWithDebInfo

Ralf



More information about the KMyMoney-devel mailing list