[GNC-dev] Not able to build on 23.10

john jralls at ceridwen.us
Sat Oct 21 13:08:54 EDT 2023



> On Oct 20, 2023, at 23:18, Bryan B. <goldenbluesanta at gmail.com> wrote:
> 
> I'm trying to build GnuCash 5.4 on while running 23.10.
> 
> I spent a some time trying to make sure to install every dependency listed
> in the downloadable READ.dependencies, as best as I could.
> 
> Previously, when I was running 22.10, I was able to build and run GnuCash
> without error.
> 
> Here is the console message when I attempt to build using the script
> provided on "Building on Ubuntu 22.10" wiki page.
> 
> ````
> (base) bluesanta at bluesanta:~/GnuCash/install-scripts$ ./
> 22.10-kinetic-gnucash-install-script.sh
> [sudo] password for bluesanta:
> Hit:1 https://repo.steampowered.com/steam stable InRelease
> 
> Hit:2 http://apt.postgresql.org/pub/repos/apt mantic-pgdg InRelease
> 
> Hit:3 https://dl.google.com/linux/chrome/deb stable InRelease
> 
> Hit:4 http://archive.ubuntu.com/ubuntu mantic InRelease
> Hit:5 http://archive.ubuntu.com/ubuntu mantic-updates InRelease
> Hit:6 http://archive.ubuntu.com/ubuntu mantic-security InRelease
> Hit:7 http://archive.ubuntu.com/ubuntu mantic-backports InRelease
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> All packages are up to date.
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> Calculating upgrade... Done
> #
> # Canonical released microcode updates for both Intel (CVE-2022-40982) and
> AMD
> # (CVE-2023-20593). ‘Unattended upgrades’ provide security updates by
> default.
> # Ensure it remains enabled to always get all updates as they become
> available.
> #
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Reading package lists... Done
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> Reading package lists... Done
> Building dependency tree... Done
> Reading state information... Done
> git is already the newest version (1:2.40.1-1ubuntu1).
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> fatal: destination path '/home/bluesanta/GnuCash/Build/source' already
> exists and is not an empty directory.
> warning: refname '4.13' is ambiguous.
> warning: refname '4.13' is ambiguous.
> fatal: ambiguous object name: '4.13'
> CMake Warning at CMakeLists.txt:86 (message):
>  /etc/opt/gnucash is set outside of the installation prefix /opt/gnucash.
>  That will break relocation so ENABLE_BINRELOC is set to off.  With
>  relocation disabled GnuCash will run only in its configured install
>  location.  You must set GNC_UNINSTALLED=1 and
>  GNC_BUILDDIR=/path/to/builddir to run from the build directory.  GnuCash
>  will not run from a DESTDIR.
> 
> 
> -- Using guile-3.0.x
> -- Using guile SRFI-64
> -- Using guile textual-ports
> -- Checking for GTEST
> -- Checking for GMOCK
> -- Configuring done (1.0s)
> -- Generating done (0.7s)
> -- Build files have been written to: /home/bluesanta/GnuCash/Build/build
> [  0%] Built target ChangeLog
> [  0%] Built target guile-json-details-links
> [  0%] Built target guile-json-details
> [  0%] Built target guile-json
> [  0%] Built target totd
> [  0%] Built target gnc-vcs-info
> [  0%] Built target gnucash-manpage
> [  0%] Built target gnucash-cli-manpage
> [  7%] Built target po-gmo
> [  7%] Built target iso-4217-c
> [  8%] Built target gnc-core-utils
> [ 15%] Built target gnc-engine
> [ 15%] Built target test-core
> [ 15%] Built target swig-unittest-support-python
> [ 15%] Built target swig-unittest-support-guile-c
> [ 15%] Built target test-core-guile
> [ 15%] Built target scm-test-core
> [ 15%] Generating
> ../../lib/x86_64-linux-gnu/guile/3.0/site-ccache/gnucash/deprecated/gnucash/unittest-support.go
> wrote
> `/home/bluesanta/GnuCash/Build/build/lib/x86_64-linux-gnu/guile/3.0/site-ccache/gnucash/deprecated/gnucash/unittest-support.go'
> [ 15%] Built target scm-deprecated-gnucash-unittest-support
> [ 15%] Built target gtest
> [ 15%] Built target gmock
> [ 16%] Built target jenny
> [ 16%] Built target swig-app-utils-python
> [ 16%] Built target swig-engine-c
> [ 16%] Built target swig-runtime-h
> [ 16%] Built target swig-core-utils-guile-c
> [ 18%] Built target gnucash-guile
> [ 18%] Built target swig-apputils-guile-c
> [ 18%] Built target gnc-locale-tax
> [ 18%] Building C object
> libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/file-utils.c.o
> In file included from /usr/include/glib-2.0/glib/giochannel.h:36,
>                 from /usr/include/glib-2.0/glib.h:56,
>                 from
> /home/bluesanta/GnuCash/Build/source/libgnucash/app-utils/file-utils.c:24:
> /home/bluesanta/GnuCash/Build/source/libgnucash/app-utils/file-utils.c: In
> function ‘gnc_getline’:
> /usr/include/glib-2.0/glib/gstring.h:74:5: error: ignoring return value of
> ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’
> [-Werror=unused-result]
>   70 |   (__builtin_constant_p (free_segment) ?        \
>      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   71 |     ((free_segment) ?                           \
>      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   72 |       (g_string_free) ((str), (free_segment)) : \
>      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   73 |       g_string_free_and_steal (str))            \
>      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   74 |     :                                           \
>      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   75 |     (g_string_free) ((str), (free_segment)))
>      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/bluesanta/GnuCash/Build/source/libgnucash/app-utils/file-utils.c:149:5:
> note: in expansion of macro ‘g_string_free’
>  149 |     g_string_free(gs, FALSE);
>      |     ^~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[2]: ***
> [libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/build.make:142:
> libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/file-utils.c.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:3747:
> libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/all] Error 2
> make: *** [Makefile:166: all] Error 2
> [  0%] Built target ChangeLog
> [  0%] Built target guile-json-details-links
> [  0%] Built target guile-json-details
> [  0%] Built target guile-json
> [  0%] Built target totd
> [  0%] Built target gnc-vcs-info
> [  0%] Built target gnucash-manpage
> [  0%] Built target gnucash-cli-manpage
> [  7%] Built target po-gmo
> [  7%] Built target iso-4217-c
> [  8%] Built target gnc-core-utils
> [ 15%] Built target gnc-engine
> [ 15%] Built target test-core
> [ 15%] Built target swig-unittest-support-python
> [ 15%] Built target swig-unittest-support-guile-c
> [ 15%] Built target test-core-guile
> [ 15%] Built target scm-test-core
> [ 15%] Built target scm-deprecated-gnucash-unittest-support
> [ 15%] Built target gtest
> [ 15%] Built target gmock
> [ 16%] Built target jenny
> [ 16%] Built target swig-app-utils-python
> [ 16%] Built target swig-engine-c
> [ 16%] Built target swig-runtime-h
> [ 16%] Built target swig-core-utils-guile-c
> [ 18%] Built target gnucash-guile
> [ 18%] Built target swig-apputils-guile-c
> [ 18%] Built target gnc-locale-tax
> [ 18%] Building C object
> libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/file-utils.c.o
> In file included from /usr/include/glib-2.0/glib/giochannel.h:36,
>                 from /usr/include/glib-2.0/glib.h:56,
>                 from
> /home/bluesanta/GnuCash/Build/source/libgnucash/app-utils/file-utils.c:24:
> /home/bluesanta/GnuCash/Build/source/libgnucash/app-utils/file-utils.c: In
> function ‘gnc_getline’:
> /usr/include/glib-2.0/glib/gstring.h:74:5: error: ignoring return value of
> ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’
> [-Werror=unused-result]
>   70 |   (__builtin_constant_p (free_segment) ?        \
>      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   71 |     ((free_segment) ?                           \
>      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   72 |       (g_string_free) ((str), (free_segment)) : \
>      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   73 |       g_string_free_and_steal (str))            \
>      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   74 |     :                                           \
>      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   75 |     (g_string_free) ((str), (free_segment)))
>      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /home/bluesanta/GnuCash/Build/source/libgnucash/app-utils/file-utils.c:149:5:
> note: in expansion of macro ‘g_string_free’
>  149 |     g_string_free(gs, FALSE);
>      |     ^~~~~~~~~~~~~
> cc1: all warnings being treated as errors
> make[2]: ***
> [libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/build.make:142:
> libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/file-utils.c.o] Error 1
> make[1]: *** [CMakeFiles/Makefile2:3747:
> libgnucash/app-utils/CMakeFiles/gnc-app-utils.dir/all] Error 2
> make: *** [Makefile:166: all] Error 2

That's https://bugs.gnucash.org/show_bug.cgi?id=798754, fixed in 4.13 and 5.0 by https://github.com/Gnucash/gnucash/commit/abcce5000ca72bf943ca8951867729942388848e.

Your cmake output indicates that you're actually trying to build GnuCash 4.13, but using a working tree with a HEAD commit that lacks that tag. Since using git seems to be outside your skillset I suggest that you delete that directory and use a release tarball instead; you can find a download link for the current release tarball in the upper right corner of https://www.gnucash.org/.

You might consider instead using a flatpak build, see https://wiki.gnucash.org/wiki/Flatpak

Regards,
John Ralls





More information about the gnucash-devel mailing list