Building 2.6.19 on Ubuntu Xenial

Adrien Monteleone adrien.monteleone at gmail.com
Wed Feb 28 11:23:48 EST 2018



> On Feb 28, 2018, at 2:47 AM, Geert Janssens <geert.gnucash at kobaltwit.be> wrote:
> 
> Op woensdag 28 februari 2018 02:54:09 CET schreef Adrien Monteleone:
>> Indeed, following a combination of the Trusty instructions and then part of
>> the sequence for Autotools from the 2.8 instructions did the trick, without
>> incident or missing dependencies. (I slightly modified the exact wiki
>> commands because I wanted the sqlite3 backend, and AqBanking)
>> 
>> I guess I was prematurely unsure of the result.
>> 
>> Now just to make a custom launcher for Unity…
>> 
>> Thanks for the help!
>> ----------
>> 
>> For posterity, I used the following command sequence:
>> 
>> sudo apt build-dep gnucash
>> sudo apt install libdbd-sqlite3
>> ./configure --prefix=/usr/local/bin/gnucash --enable-compile-warnings
>> --with-html-engine=webkit make
>> sudo make install
>> 
>> The app launched fine.
>> 
>> If anyone knows of any problems with this approach, please advise,
>> otherwise, this is done.
>> 
> The --prefix should not be the path to your executable. What you create with 
> your prefix is a directory structure like this:
> /usr/local/bin/gnucash/bin (with executable gnucash and so on)
> /usr/local/bin/gnucash/lib/....
> /usr/local/bin/gnucash/etc/....
> /usr/local/bin/gnucash/share/....
> 
> Where you most likely would want something like this:
> /usr/local/bin (with executable gnucash and so on)
> /usr/local/lib/....
> /usr/local/etc/....
> /usr/local/share/....
> 
> For the latter you should set the prefix to /usr/local.

I went with the trailing /gnucash because all of the examples on the wiki page include it. (the Trusty instructions even specify /usr/bin/gnucash as an example) I see now though that there is a warning higher up the page not to use the distro location. (I think Ubuntu still leaves /usr/local alone, however, I think this will eventually change. It seems some distros are symlinking /usr to /usr/local)


> 
> We also generally recommend not to install in prefix /usr or /usr/local as 
> both are treated special at runtime. In particular, if you install in /usr/
> local, make sure there's not another gnucash version installed in /usr. 
> Otherwise you will get unexpected results. For this reason we usually suggest 
> to install into /opt/gnucash (for multi-user environments) or even simply in 
> $HOME/gnucash (for single user environments).

I always built in my $HOME for my own use and never otherwise used /usr or /usr/local. Certainly /opt will be the way to go.

> 
> The option --with-html-engine does nothing any more in the 2.6 series, so it 
> can be dropped.

I thought I had read that somewhere but when I saw it in the instructions and didn’t see any caveat...

> 
> And while for you particular case this should be fine, we generally recommend 
> not building directly into the source tree, but rather in a separate build 
> directory. That helps solving many small annoyances one could otherwise 
> encounter. The separate build directory is to be either a hidden directory in 
> the source tree or any directory outside of it.
> Personally I usually have something like this:
> <base>/<sourcetree>
> <base>/<builddir>

I’ll adopt this as a best practice from now on. Thanks.
> 
> With this the commands would become 
> sudo apt build-dep gnucash
> sudo apt install libdbd-sqlite3
> (get a copy of the sources in <base>/<sourcetree> before the next step)
> cd <base>/<sourcetree>
> ./autogen.sh
> cd <base>/<builddir>
> <base>/<sourcetree>/configure --prefix=/usr/local --enable-compile-warnings 
> make
> sudo make install

I uninstalled and re-installed, and still unfortunately, the build is not registering the mime type properly and not creating a proper desktop file. (I’m having fits doing this manually as well, not sure why as I’m following the official Ubuntu guides.)

I tried the GetDeb package only to run into the same problems.(something is definitely wacky here)

I instead opted to install 2.6.12 from the Xenial repos for him and he’ll have to wait for an OS upgrade for a GnuCash upgrade. Maybe I’ll give a go at making a snap for 3.0. Everything seems to work properly with launcher and Dash access and the ability to double-click to open the file if he wants, so I’ll stop there.

Thanks for the help though.
> 
> 
> Regards,
> 
> Geert



More information about the gnucash-user mailing list