gnucash versions 2.2 and 2.3 on same PC?

Stephen R. Besch sbesch at buffalo.edu
Wed Jul 15 11:49:31 EDT 2009


Maf. King wrote:
> On Wednesday 15 July 2009 07:30:53 Colin Law wrote:
>   
>> 2009/7/14 Maf. King <maf at chilwell.net>:
>>     
>>> On Tuesday 14 July 2009 22:35:18 Colin Law wrote:
>>>       
>>>> I am currently using 2.2.6 on Ubuntu but wish also to try 2.3.  I do
>>>> not wish to move fully over to 2.3 until it is stable.  Is it possible
>>>> to have both versions on the PC at the same time so I can continue
>>>> running 2.2.6 for my accounts but also test 2.3?
>>>>
>>>> Colin
>>>>         
>>> Hi Colin,
>>>
>>> ISTR you can pass --prefix=/opt/gc2.3 (or similar) to configure to make
>>> GC versions co-exist.  There may be something in the list/faq to expand
>>> on this from when 2.1.x was the testing version.
>>>       
>> Doing some googling suggests that the --prefix option is part of the
>> build procedure, is that right?  Does that mean I would have to build
>> it myself rather than download a pre-built version?  We are getting a
>> bit out of my comfort zone here.  Not that life has to be comfortable
>> of course.
>>
>> Colin
>>     
>
> Hi Colin,
>
> I'm not aware of any pre-built linux versions of the testing series (Phil 
> announced a new Win32 build last week, but not for linux).  So I assume that 
> you will have to compile it yourself. 
>
> You should be OK if you install all the relevant -devel packages from the 
> ubuntu repositories.  The README in the source code will have more info about 
> what those packages might be.  Also check the GC FAQ for help - or others on 
> the list will know more about building GC from source.
>
> HTH,
> Maf.
>
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
Colin,

Source compilation is not really that bad. It's just that there tends to 
be a few things that don't get mentioned. For my money, I would 
recommend checking out the sources from svn. You will have to have svn 
installed already to do this:

            sudo apt-get install subversion

Then you can checkout the sources. First change to a suitable directory. 
I use something like ~/source_installs/gnucash.  Then enter:

            svn co  http://svn.gnucash.org/repo/gnucash/trunk

This will download the entire source package. What you need to know is 
that a lot of the files needed to make the project are not part of the 
base download - they are generated on your machine after you have the 
sources loaded. Largely this is to avoid the problem of widely varying 
hardware/software configurations by having the files generated on your 
machine.  First you need to execute autogen.sh. Change to the trunk 
directory and enter:

        ./autogen.sh

(If I recall, autogen.sh already has the executable bit set. If it 
doesn't, the above will fail and you will need to "chmod 775 autogen.sh" 
first!)  This will generate a whole bunch of files needed for the next 
(configure) step. Before configuring, it is almost always a good idea to 
write your own custom shell script that enters all the configuration 
parameters for you - it gets very tedious otherwise. Here's mine:

        #!/bin/bash
        ./configure -C --enable-debug --enable-ofx --enable-aqbanking 
--enable-compile-warnings

Save it as something like "myconfig.sh". The -C is useful when 
configuring the first time, since it will cache the results and skip 
over the successful parts when you have to configure again after 
resolving any errors that configure detects. You should remove it after 
you get gnucash built the first time, since it can cause problems later 
by remembering things that it should not. You probably won't want the 
--enable-debug option (unless you are planning to run GC under the 
debugger). I left it there in case you need it later. It will make GC 
larger and load slower, so you should probably delete it. The other 3 
options should be left as they are. Also, given that you are planning to 
run 2 versions, you almost certainly will want to add the --prefix 
option as indicated elsewhere on this thread. When you are ready, set 
the executable bit on myconfig.sh (chmod 775 myconfig.sh) and enter:

       ./myconfig.sh

This is unarguably the hardest part of the entire process. Unless you 
are extremely lucky, there will be lots of things missing and configure 
should tell you about all of them. Usually you can tell right away what 
is missing from the error messages. You'll have to fish around in 
synaptic for the needed packages. Most of these will be the "-dev" 
component of some library that you already have installed. You'll just 
need to be a bit creative in finding them since the exact package name 
is usually not given in the error message. Googling the error message 
text usually works, and this usually will save the day. The only real 
clunker (on Ubuntu at least) is the guile and slib stuff. See the link 
here for some help on this if you need it 
(http://wiki.gnucash.org/wiki/Building#slib_Issues).

Once you get configure to complete without errors, the rest is simple:

    make
    sudo make install

These will take a while, but when they are done, you should be able to 
run GC from the prefix directory. Later on, when you want to update to 
the next release of the trunk code, just type:

    sudo make uninstall
    svn update
    ./myconfig.sh
    make
    sudo make install

The 'sudo make uninstall' is probably not needed except on those rare 
occasions when one of the installed components will break the current 
version. I do it for insurance rather than suffer the irritation of 
tracking down the rare case when it is needed. Every once in a while you 
may also need to  ./autogen.sh first, but this should be really rare. 
Only do this if the new version won't work after doing all the above.

Hope this helps..

Stephen R. Besch





More information about the gnucash-user mailing list