[GNC-dev] Help packaging GnuCash 3.x for Ubuntu Bionic

Tommy Trussell tommy.trussell at gmail.com
Tue Sep 24 01:24:37 EDT 2019

In between other projects over a few months I have been trying to learn
enough about Debian packaging to bring the latest GnuCash releases to
Ubuntu Bionic. My goal is to learn to create a source package that compiles
properly in a "stock" Ubuntu Bionic environment, and write about the
procedure in sufficient detail that I and other volunteers can keep the
information updated for new GnuCash releases.

Bionic is significant for its "Long Term Support" status. Besides all the
folks (such as I) who have systems running Bionic, several "child" distros
(such as Mint) use the Bionic repository. I believe some number of folks
will clamor for Bionic GnuCash packages until at least next summer (2020),
after which the next scheduled Ubuntu LTS release will begin to replace

I followed Stephen Butler's work on the GnuCash lists and hoped his
packaging procedure could produce clean Bionic builds. However it seems
Stephen quit building for Bionic quite a few weeks ago.

Recently Dmitry Smirnov packaged GnuCash 3.6 and 3.7 for Debian 10
"Buster," so I have very up-to-date Debian packages to start with.
Unfortunately "Buster" diverges significantly from "Bionic" so packaging
becomes tricky.

At this point I believe I have learned a tiny bit and hope someone can
offer advice to me on how to proceed.


This message describes two of my build environments. Ultimately I hope the
first one succeeds, but since it's giving me less information to work with,
I'll describe both.

1) The sbuild utility creates "clean" chroot build environments. The
GnuCash 3.7 package builds perfectly in a Debian (sid / bullseye) chroot
just as it should, but Ubuntu Bionic hardly even starts to build.

> $ sbuild -Avs -d bionic-amd64
> dpkg-source: info: using options from gnucash-3.7/debian/source/options:
> dh clean --buildsystem=cmake --with python3,aqbanking
> dh: unable to load addon python3: Can't locate Debian/Debhelper/Sequence/
python3.pm in @INC (you may need to install the
Debian::Debhelper::Sequence::python3 module) (@INC contains: /etc/perl
/usr/local/lib/x86_64-linux-gnu/perl/5.28.1 /usr/local/share/perl/5.28.1
/usr/lib/x86_64-linux-gnu/perl5/5.28 /usr/share/perl5
/usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28
/usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at (eval 12)
line 1.
> BEGIN failed--compilation aborted at (eval 12) line 1.
> make: *** [debian/rules:33: clean] Error 2
> E: Failed to clean source directory
> $

That's it. Yes, despite the error, debhelper's dh-python package (which
includes the python3 addon) is installed. No incantation seems to nudge it
further along. I've become convinced the problem is due to an unfortunate
bug affecting the libraries in Bionic. (See my link at the end.) I presume
there might be a workaround to make the python headers "visible" when they
need to be; I just need to learn how to communicate that to debhelper (or
patch the source code somehow?) to work around the unfortunate bug.
Alternatively it may be possible to get a SRU (Stable Release Update)
pushed into Bionic to fix the broken library.


2) Since I wasn't making any progress even after tinkering in the chroots,
I set up a virtualbox with a minimal Ubuntu installation hoping to learn
more. Sadly, the build fails quite differently in the VM.

In a minimal Ubuntu Bionic Virtualbox VM the build starts well and seems to
be making progress for a few seconds, then fails with:

> Compiling the CXX compiler identification source file
"CMakeCXXCompilerId.cpp" failed.
> Compiler: /usr/bin/c++
> Build flags:
> Id flags:
> The output was:
> 1
> cc1plus: error: -Werror=stringop-truncation: no option

(the error gets repeated several times)

This gives me more to work with. A few searches turned up some hints but I
don't know how to implement them.


Today I created a post at an Ubuntu forums area designated for packaging
advice (though sadly the forum doesn't look extremely active), and included
a bit more information there.

I shared a suspicion in the first post about why the python addon seems to
be "missing" in the clean chroot build environment. But I have no clue why
it fails later in a VirtualBox VM.

More information about the gnucash-devel mailing list