GnuCash Windows Build Help

russ.gorby at gmail.com russ.gorby at gmail.com
Sat Apr 5 18:19:47 EDT 2025


Thanks John, this helped.

Not sure why the GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH is not set from ‘jhbuild shell’ but is for ‘jhbuild build/buildone’ but I can workaround that.

 

The bigger problem now is that on 3/30/2025 mingw32/mingw-w64-i686-cmake upgraded to cmake v4.0.0 which apparently chokes on 

cmake_minimum_required(VERSION X.Y) if X.Y < 3.5

 

 

 

From: John Ralls <jralls at ceridwen.fremont.ca.us> 
Sent: Wednesday, April 2, 2025 9:05 AM
To: russ.gorby at gmail.com
Cc: Robert Fewell <14ubobit at gmail.com>; gnucash-devel <gnucash-devel at gnucash.org>
Subject: Re: GnuCash Windows Build Help

 

Russ,

 

Yeah, open a MinGW32 shell and start a jhbuild shell from the gnucash-on-windows directory:

  TARGET=gnucash-stable jhbuild -f jhbuildrc shell

That sets up the environment for building directly. Then you can

   cd $PREFIX/../build/gnucash-git

And work as you normally would. There’s one catch: We don’t routinely run the test suite in Windows and I have no idea whether all of the tests work. If they don’t that will lead to some frustration because you’ll have to rely on Github’s CI to do the testing for you.

 

Note that the MinGW shell is Bash, not CMD or Powershell. C: turns into /c, the path separator is / not \, and line editing is GNU Readline.

 

Regards,

John Ralls

 





On Apr 2, 2025, at 07:12, <russ.gorby at gmail.com <mailto:russ.gorby at gmail.com> > <russ.gorby at gmail.com <mailto:russ.gorby at gmail.com> > wrote:

 

So, after jhbuild completes successfully, is there a trick to getting cmake to build the gnucash.git module directly?

I’m thinking that would be better way to build for the change/build/test cycle.

I’m trying to run the cmake Ninja generator and have grabbed the cmakeargs specified from gnucash.modules for gnucash-git but that is not sufficient because it can’t find the guild/guile executables.

Discovered that the $ENV{PATH} did not contain the …/stable/inst/bin location where they live but even fixing that did not resolve the problem of find_program() not finding them, so there must be something more meta going on.

I’d like to run the cmake generator, and build phases directly

 

 

From: gnucash-devel <gnucash-devel-bounces+russ.gorby=gmail.com at gnucash.org <mailto:gnucash-devel-bounces+russ.gorby=gmail.com at gnucash.org> > On Behalf Of Robert Fewell
Sent: Wednesday, March 26, 2025 6:03 AM
To: gnucash-devel <gnucash-devel at gnucash.org <mailto:gnucash-devel at gnucash.org> >
Subject: Re: GnuCash Windows Build Help

 

I have fixed the two issues I had and have updated my changes here...

https://github.com/Bob-IT/gnucash-on-windows/tree/changes

 

If you want to try it before it is possibly uploaded then do the following...

Grab setup-mingw64.ps1 from my changes branch and add a 'pause' statement between lines 392 and 393

Run the script and when you get to the pause, get the other files I have updated and replace the ones installed in 'gnucash-on-windows.git'

Press enter to continue the script and when finished you should have a valid Msys2 build environment.

 

Now just follow the rest of the instructions on building Gnucash and hopefully it will work.

 

This environment is set up to work with 'webkitgtk3-2.4.11-999.51' version and when tested, reports could be opened along with charts.

I did try the 'webkitgtk3-2.4.11-999.6' version which seemed to work in this environment but charts fail so maybe I have missed a dependency.

There is one more version, 'webkitgtk3-2.4.11-999.7' but the file size is way bigger than previous versions so not sure if it is correct.

 

Regards,

Robert

 

 

 

 

On Mon, 24 Mar 2025 at 10:32, Robert Fewell <14ubobit at gmail.com <mailto:14ubobit at gmail.com> > wrote:

I have managed to get a build and install for a current version of the Msys2 install but have two problems to fix.

 

The first is "OpenSP" does not build, fails on the PO directory I think.

The second is that a patch for "bdw-gc" is not automatically being applied, to get round this I have deliberately misspelt the file name in gnucash.modules which allows me to drop to a shell and apply it manually and then continue.

To get round the "OpenSP" build failure for testing I copied a working "OpenSP" "src" and "build" directory when the build failed and then just rerun the build phase.

 

My changes are here, https://github.com/Bob-IT/gnucash-on-windows/tree/changes

 

For the "OpenSP" build failure, there must be an updated Msys2 file/environment change but at the moment I can not see it, the following is the failure.

 

Making all in generic
make[2]: Entering directory '/c/gcdev64/gnucash/stable/build/OpenSP-1.5.2/generic'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/c/gcdev64/gnucash/stable/build/OpenSP-1.5.2/generic'
Making all in po
make[2]: Entering directory '/c/gcdev64/gnucash/stable/build/OpenSP-1.5.2/po'
make[2]: *** No rule to make target '/config.status', needed by 'Makefile'.  Stop.
make[2]: Leaving directory '/c/gcdev64/gnucash/stable/build/OpenSP-1.5.2/po'
make[1]: *** [Makefile:544: all-recursive] Error 1
make[1]: Leaving directory '/c/gcdev64/gnucash/stable/build/OpenSP-1.5.2'
make: *** [Makefile:428: all] Error 2
*** Error during phase build of OpenSP: ########## Error running make -j 13  *** [1/12]

 

 

For information, I tried doing the complete build on my September 2024 Msys2 setup and it all worked and that was with an updated gnucash-on-windows and jhbuild directory.

 

Regards,

Robert

 

 

On Thu, 20 Mar 2025 at 21:41, flywire <flywire0 at gmail.com <mailto:flywire0 at gmail.com> > wrote:

https://www.gnucash.org/docs/v5/C/gnucash-guide/ch_python_bindings.html 

Starting with GnuCash version 2.4 you can write Python scripts to manipulate your financial data.

 

 Important
The Python extensions are an optional feature which creates additional dependencies. To be able to use Python scripts, GnuCash must have been built with the cmake -DWITH_PYTHON=ON … option enabled, otherwise all what follows won’t work. At present this option is not enabled by default, so if you need this, you may have to compile GnuCash from source yourself. But some distributions offer it also as a separate package with a name like python[version]-GnuCash

There are GnuCash Windows users who want to use the Python bindings which hasn't really been possible since you removed them from the distribution. Most users just want access to the binaries and don't care how they are created though some (including myself) would like to build them if the process was reasonable. (A GitHub workflow would be terrific.)

 

Regards

 

On Wed, 19 Mar 2025 at 14:00, John Ralls <jralls at ceridwen.us <mailto:jralls at ceridwen.us> > wrote:

Have you considered setting up a Linux build environment instead? You can install your distro of choice in the Windows Subsystem for Linux (aka WSL). Many of them have a package manager target similar to Debian/Ubuntu’s `apt build-dep gnucash` that sets up everything you need except a code editor. It’s much less frustrating than the MinGW64 environment.

_______________________________________________
gnucash-devel mailing list
gnucash-devel at gnucash.org <mailto:gnucash-devel at gnucash.org> 
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

_______________________________________________
gnucash-devel mailing list
gnucash-devel at gnucash.org <mailto:gnucash-devel at gnucash.org> 
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20250405/11be74cb/attachment.htm>


More information about the gnucash-devel mailing list