This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How do I build a separate development version of KMyMoney?

Tags: None
(comma "," separated)
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
Hello all,

I've been trying to build a development version of KMyMoney separate from the one I use to track my finances, so that there wouldn't be any threat of breakage if I mess something up in devel. So far, I've tried to do this by using the build instructions given for CVS download and build. I've changed the config command to this:

Code: Select all
./configure --prefix=/home/wolfemi1/Desktop/kmymoney_testing  --enable-ofxplugin --enable-ofxbanking --enable-leak-check


This is my attempt to put all the stuff I'm building into the directory listed (the kmymoney_testing one), but when I try to run the executable from that area, I always get an error like the following:

Code: Select all
kmymoney: symbol lookup error: /home/wolfemi1/Desktop/kmymoney_testing/lib/kde3/kmm_ofximport.so: undefined symbol: _ZnwmPKci


I think I'm doing this wrong. Is the --prefix argument really the one I want?

Thanks,

-Mike


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
wolfemi1 wrote:I think I'm doing this wrong. Is the --prefix argument really the one I want?


The current off-the-shelf setup of KMyMoney does not really allow you to use two (very) different versions at the same time from the same (KDE) environment. In some cases it could work in others it doesn't. The case heavily depends on the progress of the CVS source code.

The best bet to achieve what you want would be to setup a different (unix) user (I will call him/her example) and create a local KDE environment for this user. This requires to fiddle a bit with environment variables for this user. I somehow remember, that you need to setup KDEDIR (or was it KDEDIRS) to include the local version of example as well as the standard one. There are some tutorials out there how to do that precisely.

Your standard can be found with the following command:

Code: Select all
kde-config --prefix


Now you create a home directory for example in /home/example and within it you create a directory called kde. This will be the local KDE path.

example's KDEDIR variable now contains two paths

Adding /home/example/kde/bin to the PATH in front of the regular-kde/bin directory is also a good idea, so that you first search the applications in the local tree. LD_LIBRARY_PATH might be another candidate where the local /home/example/kde/lib directory needs to be in front of the regular one.

With this setup, you just need to run configure as follows:

Code: Select all
configure --prefix=/home/example/kde


and you should be set. make install will then install all required KMyMoney files in the /home/example/kde/ -subtree.

P.S. In case you know how to set this up, it might be a good idea to write a small tutorial. I am sure, there are others for which this might come handy.[hr]
Here's what I found a mail on the developer list going back into 2005:

- the "Installing from CVS" instructions on the website are good. I
followed them step by step and everything worked fine. But they could
use one major improvement: with the use of custom KDEDIRS, PATH, and
LD_LIBRARY_PATH environment variables, one can install kmymoney in
their home directory and never have to worry about su-ing to root and
installing random files that aren't managed by their system's package
manager all over their /usr directory. For example:

In ~/.bashrc, I have

export KDEDIRS=$HOME/bin/kde:$KDEDIRS
export PATH=$HOME/bin/kde/bin:$PATH
export LD_LIBRARY_PATH=$HOME/bin/kde/lib:$LD_LIBRARY_PATH

Then I ran

./configure --prefix=$HOME/bin/kde

and I was able to make ; make install without every switching to root.
Everything runs great!

Last edited by ipwizard on Mon Jan 05, 2009 5:30 pm, edited 1 time in total.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
Okay, I have a new user set up and I'm trying to get this working by following the steps outlined in the email you provided. I'm having a problem, first off, with the $PATH variable. I'm pretty new to Linux (the guts of it, anyway), and I was wondering: is there a way to have more than one $PATH variable? If I set it like the email shows, I lose /usr/bin, which has all the really useful things (like ls!) that I need to use all the time.

-Mike[hr]
Well, it looks like I got it working! I made a new user, and added the following to my .bashrc:

Code: Select all
export KDEDIRS=/home/kmymoneytest/kmymoneylocal:/usr
export LD_LIBRARY_PATH=$HOME/kdelocal/lib;$LD_LIBRARY_PATH
export CVSROOT=$HOME/kmymoneylocal;$CVSROOT


(Note: this causes the following errors to come up when opening a new bash shell:

bash: /home/kmymoneytest/kdelocal/lib: is a directory
bash: /home/kmymoneytest/kmymoneylocal: is a directory

I don't think it's the correct way to do it, but I'm unsure of the proper syntax for these at the moment.)

In this example, I made a ~/kdelocal/lib/ directory to hold the KDE libs (but there's nothing there now, so that may be superfluous). Also, I made a ~/kmymoneylocal directory which I pulled the sources into through CVS (hence the CVSROOT variable) and used the following config line:

Code: Select all
./configure --enable-ofxplugin --enable-ofxbanking --prefix=/home/kmymoneytest/kmymoneylocal/


I built and found out it worked! I could launch it from the command line locally, and there was no requirement to have root privileges for a make install.

-Mike

Last edited by wolfemi1 on Mon Jan 05, 2009 1:00 am, edited 1 time in total.


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Colons ( : ) are used instead of semi-colons ( ; ) by bash to seperate values in variables. This is why it encounters those errors.

Try these instead:
Code: Select all
export KDEDIRS=/home/kmymoneytest/kmymoneylocal:/usr
 export LD_LIBRARY_PATH=$HOME/kdelocal/lib:$LD_LIBRARY_PATH
 export CVSROOT=$HOME/kmymoneylocal:$CVSROOT


Also, you will need to set $PATH. When an executable is searched for, is checks each directory in turn, continuing if an executable is found. The export PATH=.... line provided above is perfectly fine, it will incorporate your existing $PATH variable into the new one when it is executed.

Last edited by bcooksley on Mon Jan 05, 2009 6:22 am, edited 1 time in total.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
wolfemi1 wrote:I built and found out it worked! I could launch it from the command line locally, and there was no requirement to have root privileges for a make install.

-Mike


Ok, the semi-colon / colon problem has been mentioned already. I fixed the example above accordingly. Typical cut/paste problem.

The CVSROOT variable is used to point to the repository, so what you did is not needed. Also, CVSROOT can't have two entries but only one.

In case what you did really works, then I have a gut feeling that you still use some libraries if not the whole application from a different version that is 'installed' on your system in the standard paths.

Using your paths, I try to guess the correct settings here:

Code: Select all
export KDEDIRS=$HOME/kdelocal:/usr
export LD_LIBRARY_PATH=$HOME/kdelocal/lib:$LD_LIBRARY_PATH
export PATH=$HOME/kdelocal/bin:$PATH


This assumes, that $HOME is identical to /home/kmymoneytest and that the source of the project can be found in /home/kmymoneytest/kmymoneylocal. To build the software, install and run it from this location, you should perform the following steps:

Code: Select all
cd $HOME/kmymoneylocal
make -f Makefile.dist
./configure --enable-ofxplugin --enable-ofxbanking --prefix=/home/kmymoneytest/kdelocal


At this stage, it is important to verify the library location again before it causes other pain. Run the following command exactly as shown:

Code: Select all
grep "^#define KDELIBSUFF" config.log


The output of this command can come in two flavors depending on your machine:

  1. #define KDELIBSUFF ""
  2. #define KDELIBSUFF "64"

In case of 1. you can continue with the make command below, in case of 2. we need to set the LD_LIBRARY_PATH different because the build process will drop them there. Change it to

Code: Select all
export LD_LIBRARY_PATH=$HOME/kdelocal/lib64:$LD_LIBRARY_PATH


The other variables remain untouched. Make sure by running

Code: Select all
echo $LD_LIBRARY_PATH


that you see the updated value. In case you changed .bashrc, log out and back in again. Then proceed with the following (still in $HOME/kmymoneytest)

Code: Select all
make
make install
which kmymoney
kmymoney


The output of the 'which'-command above should read /home/kmymoneytest/kdelocal/bin/kmymoney. In case it doesn't, something is still wrong, but now you should see from where you start KMyMoney.

Hope this doesn't confuse you too much. After all, *NIX systems are very powerful and it looks like magic to the new user what can be done. But let me tell you: it's all logical and not magical as with other OSes :)


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
Fantastic! I had to do a make uninstall && make clean, but it appears to be working now! The 'which kmymoney' command returns the local path and everything!

Now I'm ready to get working. :-D

By the way, I agree: Unixes are all deep magic to me, but I think it's just because I'm not quite familiar with all the arcane incantations and secret rites yet. ;-)


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
Hey all,

Sorry to resurrect this long-dead thread, but I made the mistake of trying to upgrade from Intrepid to the Jaunty Alpha in Kubuntu, and it borked my X server, so I decided it would just be easier to reinstall. Unfortunately, now I can't get the CVS version to build, or even to pass the configure step.

I followed the directions in the CVS FAQ like before, and created the same directories (initially I even copied over the old home directory and used that). However, every configure or make I try gives me the same error message:

Code: Select all
checking whether uic supports -nounload ... yes
checking if Qt needs -ljpeg... no
checking for rpath... yes
checking for KDE... configure: error:
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
So, check this please and use another prefix!


Anyone know what I'm doing wrong? I'm setting this up exactly like shown above in the earlier comments...

Thanks,

Mike


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
wolfemi1 wrote:Anyone know what I'm doing wrong? I'm setting this up exactly like shown above in the earlier comments...


From the README file:

To compile, you will need the development headers for KDE libs and all additional
you install (libofx, aqbanking, etc)
Also, you will need the compile tools. This includes make and gcc

Example for K/Ubuntu:

sudo apt-get install kdelibs4-dev build-essential


Hope that gets you going.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
wolfemi1
Registered Member
Posts
58
Karma
0
OS
ipwizard wrote:
wolfemi1 wrote:Anyone know what I'm doing wrong? I'm setting this up exactly like shown above in the earlier comments...


From the README file:

To compile, you will need the development headers for KDE libs and all additional
you install (libofx, aqbanking, etc)
Also, you will need the compile tools. This includes make and gcc

Example for K/Ubuntu:

sudo apt-get install kdelibs4-dev build-essential


Hope that gets you going.


Thomas, thanks again for your fantastic help. I was able to stumble through getting KMyMoney to compile again, but it was a bit of a chore to look up old forum posts and reconstruct how to do it again. Is there a wiki for KMyMoney where I could post some detailed step-by-step instructions for this process and aggregate all the useful information in one place? I would like to make this happen. Thanks!

-Mike


wolfemi1, proud to be a member of KDE forums since 2008-Dec.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
wolfemi1 wrote:Is there a wiki for KMyMoney where I could post some detailed step-by-step instructions for this process and aggregate all the useful information in one place? I would like to make this happen. Thanks!


AFAIK, the web-site is currently reconstructed and part of it should contain a wiki. Please give us just some more time to work this out.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Evergrowing, Google [Bot], rblackwell