Discussion:
Plugins path in master branch
Łukasz Wojniłowicz
2016-06-18 17:41:53 UTC
Permalink
Hello community,

I need some wise person to set path to KMM plugins correctly.

Recently, I compiled master branch and was missing CSV importer plugin.
Following output in terminal:

The environment variable QT_PLUGIN_PATH might be not correctly set
Error loading plugin "kmm_csvimport" "Shared library not available."
Plugin search paths are ("/usr/lib64/qt5/plugins", "/usr/bin")

I do:

export QT_PLUGIN_PATH=/usr/lib64/plugins/

and CSV importer plugin is available again. I could fix it in code by myself
but what is the right approach:
1) changing installation path of kmm_csvimport.so,
2) changing search path of kmm_csvimport.so,

I hope someone knows better.

Cheers
Łukasz
Cristian Oneț
2016-06-18 18:30:25 UTC
Permalink
Hi,

Running a local development version requires the following environment
to be set (solution 2):

PREFIX=the_value_of_CMAKE_INSTALL_PREFIX
export QT_PLUGIN_PATH=$PREFIX/lib64/plugins:$QT_PLUGIN_PATH
export XDG_CONFIG_DIRS=$PREFIX/etc/xdg:$XDG_CONFIG_DIRS
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
# run kmymoney
$PREFIX/bin/kmymoney

Regards,
Cristian
Post by Łukasz Wojniłowicz
Hello community,
I need some wise person to set path to KMM plugins correctly.
Recently, I compiled master branch and was missing CSV importer plugin.
The environment variable QT_PLUGIN_PATH might be not correctly set
Error loading plugin "kmm_csvimport" "Shared library not available."
Plugin search paths are ("/usr/lib64/qt5/plugins", "/usr/bin")
export QT_PLUGIN_PATH=/usr/lib64/plugins/
and CSV importer plugin is available again. I could fix it in code by myself
1) changing installation path of kmm_csvimport.so,
2) changing search path of kmm_csvimport.so,
I hope someone knows better.
Cheers
Łukasz
Łukasz Wojniłowicz
2016-06-19 08:11:30 UTC
Permalink
I do not run local development version. After each compilation I do
"sudo make install"
What about that?

Cheers,
Łukasz
Message: 7
Date: Sat, 18 Jun 2016 20:30:25 +0200
Subject: Re: Plugins path in master branch
Content-Type: text/plain; charset=UTF-8
Hi,
Running a local development version requires the following environment
PREFIX=the_value_of_CMAKE_INSTALL_PREFIX
export QT_PLUGIN_PATH=$PREFIX/lib64/plugins:$QT_PLUGIN_PATH
export XDG_CONFIG_DIRS=$PREFIX/etc/xdg:$XDG_CONFIG_DIRS
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
# run kmymoney
$PREFIX/bin/kmymoney
Regards,
Cristian
o***@gmail.com
2016-06-19 09:43:25 UTC
Permalink
The same applies, just set the prefix to the proper value and it will work.

Sent from my iPhone
Post by Łukasz Wojniłowicz
I do not run local development version. After each compilation I do
"sudo make install"
What about that?
Cheers,
Łukasz
Message: 7
Date: Sat, 18 Jun 2016 20:30:25 +0200
Subject: Re: Plugins path in master branch
Content-Type: text/plain; charset=UTF-8
Hi,
Running a local development version requires the following environment
PREFIX=the_value_of_CMAKE_INSTALL_PREFIX
export QT_PLUGIN_PATH=$PREFIX/lib64/plugins:$QT_PLUGIN_PATH
export XDG_CONFIG_DIRS=$PREFIX/etc/xdg:$XDG_CONFIG_DIRS
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
# run kmymoney
$PREFIX/bin/kmymoney
Regards,
Cristian
Jack
2016-06-19 16:03:21 UTC
Permalink
If you are compiling from source from git, that is running a local
development version. That is compared to running a binary version
provided by your distribution.
Post by Łukasz Wojniłowicz
I do not run local development version. After each compilation I do
"sudo make install"
What about that?
Cheers,
Łukasz
Message: 7
Date: Sat, 18 Jun 2016 20:30:25 +0200
Subject: Re: Plugins path in master branch
Content-Type: text/plain; charset=UTF-8
Hi,
Running a local development version requires the following
environment
PREFIX=the_value_of_CMAKE_INSTALL_PREFIX
export QT_PLUGIN_PATH=$PREFIX/lib64/plugins:$QT_PLUGIN_PATH
export XDG_CONFIG_DIRS=$PREFIX/etc/xdg:$XDG_CONFIG_DIRS
export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS
# run kmymoney
$PREFIX/bin/kmymoney
Regards,
Cristian
Łukasz Wojniłowicz
2016-06-19 08:20:29 UTC
Permalink
Message: 4
Date: Sat, 18 Jun 2016 20:24:12 +0200
Subject: Re: [kmymoney/4.8] kmymoney/plugins/csvimport: Set start line
to one during CSV import
Content-Type: text/plain; charset=UTF-8
Is the start line always greater than zero? Isn't it 0 based like all
sane programming structures which use indexes?
I think it could be, but right now is not and it causes errors during first
creation of CSV Importer profile.
On a side note, when committing bugfixes to thr 4.8 branch make sure
1. Use the FIXED-IN tag to describe the version in which the fix will
be available 4.8.1 (the next release) [1], [2]
2. Follow that your commits get cherry-picked in master by someone if
you don't do that yourself
3. Only commit essential stuff like bugfixes and try to avoid changing
too much code because 4.8 is a dead end branch and merging to master
could be painful because of the possible conflicts (the more lines are
changed the higher the probability of a conflict)
A general note about the CSV importer in master. A bunch of files
making up the CSV importer are just copy pasted and the code is way
too verbose and contains too much deprecated API. During the removal
of kdelibs4 support a lot of code was simply disabled (search for
"TODO: port to kf5"). I will not invest any of my time into porting
that unmaintainable code so someone must need to step up and do this
job otherwise the CSV importer will either be removed or rewritten
before a 5.0 release.
I think it is not as bad as you write. Due to some minor changes, I get it to
run again with Qt5. I think it would be disgrace to simply remove work Allan
Anderson initially did. I agree that it's over complicated but you cannot do
it all at once. Let us focus on running it as before first.

Cheers
Łukasz
Thomas Baumgart
2016-06-19 10:19:23 UTC
Permalink
Hi,
Post by Łukasz Wojniłowicz
Message: 4
Date: Sat, 18 Jun 2016 20:24:12 +0200
Subject: Re: [kmymoney/4.8] kmymoney/plugins/csvimport: Set start line
to one during CSV import
m>
Content-Type: text/plain; charset=UTF-8
Is the start line always greater than zero? Isn't it 0 based like all
sane programming structures which use indexes?
I think it could be, but right now is not and it causes errors during first
creation of CSV Importer profile.
On a side note, when committing bugfixes to thr 4.8 branch make sure
1. Use the FIXED-IN tag to describe the version in which the fix will
be available 4.8.1 (the next release) [1], [2]
2. Follow that your commits get cherry-picked in master by someone if
you don't do that yourself
3. Only commit essential stuff like bugfixes and try to avoid changing
too much code because 4.8 is a dead end branch and merging to master
could be painful because of the possible conflicts (the more lines are
changed the higher the probability of a conflict)
A general note about the CSV importer in master. A bunch of files
making up the CSV importer are just copy pasted and the code is way
too verbose and contains too much deprecated API. During the removal
of kdelibs4 support a lot of code was simply disabled (search for
"TODO: port to kf5"). I will not invest any of my time into porting
that unmaintainable code so someone must need to step up and do this
job otherwise the CSV importer will either be removed or rewritten
before a 5.0 release.
I think it is not as bad as you write. Due to some minor changes, I get it
to run again with Qt5. I think it would be disgrace to simply remove work
Allan Anderson initially did. I agree that it's over complicated but you
cannot do it all at once. Let us focus on running it as before first.
Great to see you working on the CSV importer and port it to KF5. Please see my
comments on reviewboard.
--
Regards

Thomas Baumgart

GPG-FP: E55E D592 F45F 116B 8429 4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
-------------------------------------------------------------
Łukasz Wojniłowicz
2016-06-19 18:28:21 UTC
Permalink
What about final 5.0 version? Will the user be required to set QT_PLUGIN_PATH?
I didn't have to set any variable in previous master branch.
Message: 4
Date: Sun, 19 Jun 2016 11:43:25 +0200
Subject: Re: Plugins path in master branch
Content-Type: text/plain; charset=utf-8
The same applies, just set the prefix to the proper value and it will work.
Cristian Oneț
2016-06-20 12:25:47 UTC
Permalink
No, that will be handled by distros. If you now need to set
QT_PLUGIN_PATH that means you are not building kmymoeny according to
the way your distro does. Simply installing kmymoney in the system
folders (by running sudo make install) is not enough if you the
destination is not properly setup during configure. Someone please
step in and explain this better.

Regards,
Cristian
Post by Łukasz Wojniłowicz
What about final 5.0 version? Will the user be required to set QT_PLUGIN_PATH?
I didn't have to set any variable in previous master branch.
Message: 4
Date: Sun, 19 Jun 2016 11:43:25 +0200
Subject: Re: Plugins path in master branch
Content-Type: text/plain; charset=utf-8
The same applies, just set the prefix to the proper value and it will work.
Jack
2016-06-20 15:17:19 UTC
Permalink
I think this is related to an issue I ran into trying to have more than
one version of KMM installed on my system at the same time (in my case,
both production and development version of 4.x). It is easy enough to
actually install them to different places, but much of where KDE looks
for things at runtime (icons, themes, plugins, ....) is controlled by
environment variables, so you have to be careful that you don't run one
executable which then finds the plugins compiled for the other
version. (In addition, KDE caches much of this stuff, which is reset
by kbuildsycoca4 or 5 (build system configuration cache)).

Basically, this means there needs to be some coordination in settings
between compile time and runtime.

I suspect it's even more an issue when mixing KDE4 and Frameworks, such
as compiling for one under the other.


Jack
Post by Cristian Oneț
No, that will be handled by distros. If you now need to set
QT_PLUGIN_PATH that means you are not building kmymoeny according to
the way your distro does. Simply installing kmymoney in the system
folders (by running sudo make install) is not enough if you the
destination is not properly setup during configure. Someone please
step in and explain this better.
Regards,
Cristian
2016-06-19 21:28 GMT+03:00 Łukasz Wojniłowicz
Post by Łukasz Wojniłowicz
What about final 5.0 version? Will the user be required to set
QT_PLUGIN_PATH?
Post by Łukasz Wojniłowicz
I didn't have to set any variable in previous master branch.
Dnia niedziela, 19 czerwca 2016 10:19:06
Message: 4
Date: Sun, 19 Jun 2016 11:43:25 +0200
Subject: Re: Plugins path in master branch
Content-Type: text/plain; charset=utf-8
The same applies, just set the prefix to the proper value and it
will work.
Łukasz Wojniłowicz
2016-06-20 19:40:34 UTC
Permalink
I use only development version, so it's not the same problem.
Message: 3
Date: Mon, 20 Jun 2016 11:17:19 -0400
Subject: Re: Plugins path in master branch
Content-Type: text/plain; charset=UTF-8; DelSp=Yes; Format=Flowed
I think this is related to an issue I ran into trying to have more than
one version of KMM installed on my system at the same time (in my case,
both production and development version of 4.x). It is easy enough to
actually install them to different places, but much of where KDE looks
for things at runtime (icons, themes, plugins, ....) is controlled by
environment variables, so you have to be careful that you don't run one
executable which then finds the plugins compiled for the other
version. (In addition, KDE caches much of this stuff, which is reset
by kbuildsycoca4 or 5 (build system configuration cache)).
Basically, this means there needs to be some coordination in settings
between compile time and runtime.
I suspect it's even more an issue when mixing KDE4 and Frameworks, such
as compiling for one under the other.
Jack
Do you have to set QT_PLUGIN_PATH at all on your system after "sudo make
install" with master branch? If no, then what's your distro?

I configure my build according to README.cmake i.e.
"cmake .. -DCMAKE_INSTALL_PREFIX=/usr"
Is there something, I could do more?
Message: 1
Date: Mon, 20 Jun 2016 15:25:47 +0300
Subject: Re: Re: Plugins path in master branch
Content-Type: text/plain; charset=UTF-8
No, that will be handled by distros. If you now need to set
QT_PLUGIN_PATH that means you are not building kmymoeny according to
the way your distro does. Simply installing kmymoney in the system
folders (by running sudo make install) is not enough if you the
destination is not properly setup during configure. Someone please
step in and explain this better.
Regards,
Cristian
Christian Dávid
2016-06-22 16:45:03 UTC
Permalink
<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi &#321;ukasz,<br/>
hi everybody else,<br/>
<br/>
maybe I can clarify some things here. Starting with version 5 KMyMoney will look in the environment variable QT_PLUGIN_PATH for plugins. It is usually set to something like /usr/lib(64)/plugins. Of course the distribution will not require the user to set this variable.<br/>
<br/>
If you run cmake with the variable CMAKE_PREFIX_PATH you change the install dir of the plugins and have to adopt QT_PLUGIN_PATH accordingly (and the other variables Cristian mentioned for other purposes). Note QT_PLUGIN_PATH &ne; CMAKE_PREFIX_PATH. You may need to rerun kbuildsycoca5 after setting this variable.<br/>
<br/>
If you have multiple versions of KMyMoney or plugins installed, you have to set this variable before starting KMyMoney. There are no compile time options for this, the location is always read at runtime from the environment variable (maybe there is a Qt default if the variable is not set). Again you may need to rerun kbuildsycoca5. However, it is totally fine to have multiple versions installed.<br/>
<br/>
There is no additional trouble if you have KF5 and KDE 4 based versions of KMyMoney on your system. Just the variable names differ and of course you have to take care that the install folders of the different versions of KMyMoney do not clash. Some time ago I wrote a longer mail about the KDE 4 variables &ndash; that information is still valid. For KMyMoney 5 these variables are not used anymore.<br/>
<br/>
Currently I am rewriting the plugin loader to make it simpler (and to get rid of all the warnings). Then the cache won&#39;t be used anymore (for most plugins). You just have to install the plugin into the correct path (it will be QT_PLUGIN_PATH/kmymoney/gui-plugins/). KBuildsycoca5 is not required then. I hope to push this change within the next two weeks. Thanks to the Randa meeting to make this possible!<br/>
<br/>
Greetings<br/>
Christian<br/>
<br/>
&gt; &#321;ukasz Wojni&#322;owicz &lt;***@gmail.com&gt; hat am 18. Juni 2016 um 19:41 geschrieben:<br/>
&gt;<br/>
&gt;<br/>
&gt; Hello community,<br/>
&gt;<br/>
&gt; I need some wise person to set path to KMM plugins correctly.<br/>
&gt;<br/>
&gt; Recently, I compiled master branch and was missing CSV importer plugin.<br/>
&gt; Following output in terminal:<br/>
&gt;<br/>
&gt; The environment variable QT_PLUGIN_PATH might be not correctly set<br/>
&gt; Error loading plugin &quot;kmm_csvimport&quot; &quot;Shared library not available.&quot;<br/>
&gt; Plugin search paths are (&quot;/usr/lib64/qt5/plugins&quot;, &quot;/usr/bin&quot;)<br/>
&gt;<br/>
&gt; I do:<br/>
&gt;<br/>
&gt; export QT_PLUGIN_PATH=/usr/lib64/plugins/<br/>
&gt;<br/>
&gt; and CSV importer plugin is available again. I could fix it in code by myself<br/>
&gt; but what is the right approach:<br/>
&gt; 1) changing installation path of kmm_csvimport.so,<br/>
&gt; 2) changing search path of kmm_csvimport.so,<br/>
&gt;<br/>
&gt; I hope someone knows better.<br/>
&gt;<br/>
&gt; Cheers<br/>
&gt; &#321;ukasz</div></div></body></html>

Loading...