[GNC-dev] Various failures while building MacOS/Quartz from source

John Ralls jralls at ceridwen.us
Tue Nov 1 15:58:30 EDT 2022



> On Oct 31, 2022, at 9:46 PM, Jim DeLaHunt <list+gnucash at jdlh.com> wrote:
> 
> I am continuing my attempt to build GnuCash 4.11 from source  on macOS 12.6 (M1 CPU), following the instructions at https://wiki.gnucash.org/wiki/MacOS/Quartz .
> 
> With help from John Ralls, I have completed the command: jhbuild bootstrap-gtk-osx.
> 
> I then attempted: jhbuild build .
> 
> In the next 46,000 lines of output, there were about six failures:
> 
> 1. during phase build of
>   freetype:/Users/gtkdeveloper/gnucash/src/freetype-2.11.1/src/autofit/afshaper.h:30:10:
>   fatal error: 'hb-ft.h' file not found
> 2. during phase configure of atk:
>   ../../src/atk-2.36.0/atk/meson.build:138:2: ERROR: Dependency
>   "gobject-introspection-1.0" not found, tried pkgconfig, framework
>   and cmake
> 3. during phase configure of gtk-mac-integration: configure: error:
>   Neither GTK+-2.0 nor GTK+-3.0 was found
> 4. during phase build of xmlsec: CCLD libxmlsec1-gnutls.la: Undefined
>   symbols for architecture arm64: "_gcry_mpi_cmp", "_gcry_mpi_invm", etc.
> 5. during phase configure of libchipcard: Package gwenhywfar was not
>   found in the pkg-config search path.
> 6. during phase build of libdbi: ld: unknown option:
>   --version-script=/Users/gtkdeveloper/gnucash/src/libdbi/src/libdbi.map
> 
> I can obviously dig into each one of these, but all I really want is a running GnuCash with Python bindings. I can find an easier way to get it than diagnosing these problems, I'd prefer that. MacPorts might get me what I want. It is currently posing a different obstacle, but one which I might be able to overcome more easily.
> 
> Is there interest in me describing these problems and attempting to run them to ground?  If there is a developer who wants to help me, and would like to use my experience to improve the build documentation and/or the tools, then I am willing to keep digging.

Jim,

I just did a test build and it worked. There are a couple of minor fixups required in makefiles for xml-sec (your #4) and libdbi (#6), and libdbidrivers is broken and requires a manual step as a workaround. 

Failures 2 and 3 are because you didn't fix #1. #1's error  indicates that it failed because harfbuzz-no-cairo built without freetype; that's probably because freetype-no-harfbuzz failed and you tried to keep going.

#5 is because you didn't fix #4.

The process is building chains of dependencies basically from scratch. If jhbuild stops you have to fix whatever is wrong and get the module built and installed before proceeding.

The workarounds:
xmlsec (#4): Edit build/xmlsec-1.2.32/src/gnutls/Makefile to add
	$(GCRYPT_LIBS) \
at line 490, under libxmlsec1_gnutls_la_LIBADD = \
(IMPORTANT: The leading whitespace is a single TAB)

libdbi (#6): Edit build/libdbi/src/Makefile to remove  -Wl,--version-script=${srcdir}/libdbi.map at line 346.

libdbi-drivers: Use selection 4 to open a shell. At the prompt type 'PKG_CONFIG=$PREFIX/bin/pkg-config ' (no quotes) and paste in the configure command line from the failure message after it. Press return. When configure finishes quit the shell and select 2 continue to build.

Regards,
John Ralls




More information about the gnucash-devel mailing list