[GNC] Idiots guide to building GNC 4.9 on Ubuntu 20.04LTS

Jeff beastmaster126 at hotmail.com
Tue Jan 4 01:49:52 EST 2022


On 12/24/21 8:30 AM, david whiting wrote:
> On Fri, 24 Dec 2021 at 09:11, Jeff <beastmaster126 at hotmail.com> wrote:
>
> [...]
>> But it appears I am not even a day old computer programmer, after 40
>> plus years of coding.  For the life of me I cannot get the 4.9 code and
>> tools for Ubuntu to install.  I've followed every link I can find, even
>> those that David Cousins provided and I still cannot get the source or
>> dependencies to install or download.
>>
>> Would someone please list for me in baby steps howto download and build
>> GNC 4.9 for Ubuntu?
>>
> Hi Jeff,
>
> The script below will build version 4.9 on Ubuntu 20.04 LTS. I have
> verified this on a clean installation of Ubuntu.
> One thing that tripped me up a few times is remembering to tick
> "Source Code" in the Software And Updates dialogue. If you don't do
> this, it will fail.
> Please note that I have used -y with apt install so it will install
> and build without asking.
>
> I will try to get around to putting this in the wiki to make it easier
> for people to find.
>
> === build.sh ===
>
> ## Ubuntu 20.04
> ## In "Software and Updates":
> ## Tick "Source code"
> ## Tick "Community-maintained free and open-source software (Universe)"
>
> ## Change this if you want to build it somewhere else.
> SOURCEDIR="$HOME/Documents/gnucash/source"
> BUILDDIR="$HOME/Documents/gnucash/build"
>
> ## Change this if you want to install it somewhere else.
> INSTALLDIR=/opt/gnucash
>
> sudo apt -y update
> sudo apt -y upgrade
> sudo apt -y install git
> sudo apt -y build-dep gnucash
>
> ## To build series 4 of gnucash on Ubuntu 20.04
> sudo apt -y install libboost-program-options1.71-dev
>
> mkdir -p $SOURCEDIR
> mkdir -p $BUILDDIR
>
> ## Clone gnucash source from git
> git clone https://github.com/Gnucash/gnucash.git $SOURCEDIR
>
> ## Checkout version 4.9
> cd $SOURCEDIR
> git checkout -b 4.9 4.9
>
> cd $BUILDDIR
> cmake -DCMAKE_INSTALL_PREFIX=$INSTALLDIR $SOURCEDIR
>
> make
>
> === End of build.sh ===
>
> Fingers-crossed this will work for you.
>
>
> David

I executed the above script but it did not build an executable version 
of GNC.  Correction, it built an executable program, that immediately 
started spouting error messages then even faster closed its terminal window.

A couple of posts remind to remember to "tick Source Code in the 
Software And Updates dialogue" or the script would not work.  They fail 
to mention for what PPA.

What PPA's do I need for GNC?  (on Ubuntu 20.04LTS)

The desktop icon file was also a complete gremlin. That issue may 
resolve itself once I can successfully build a live, healthy, vivacious, 
running version of 4.9 from source.

As of now I am renaming the thread from "how to remove both GNC 4.2 and 
Flathub version 4.8 so can upgrade to 4.9 on Ubuntu 20.04LTS" to "Idiots 
guide to building GNC 4.9 on Ubuntu 20.04LTS" as we have moved way past 
removing 4.2 and Flathub 4.8.  Right now I feel like a CSC 101 student 
in a CSC 401 class, even though I went to CSC 640 in college and 880 in 
the real world, yet I cannot successfully build GNC.  Both irritating 
and humiliating.

Somewhere I am overlooking that one simple first year programmers error.

-- 
--JEffrey Black M.B.A.



More information about the gnucash-user mailing list