Compiling GnuCash on Windows 7 to debug MySQL crashes

John Ralls jralls at ceridwen.us
Mon Jul 16 10:33:59 EDT 2012


On Jul 15, 2012, at 10:45 PM, Art wrote:

> I blew several days and gave up. I initially downloaded the GnuCash binaries in 2009 and used it with the ".xml" database file. I wanted to use SQL, so I re-downloaded the binaries last month and converted my ".xml" data to MySQL, but it kept crashing and couldn't read it back and said the database was locked.
> 
> So, I downloaded MSYS, MinGW and installed them in f:/usr/msys/1.0 and f:/usr/mingw, respectively. I did the links, per the documentation, then ran install.sh from MSYS sitting in the /h/ws/repackaging directory, right out of the latest SVN build. It failed - badly. I don't know if this has been documented and I'm just reiterating the obvious, but, I'll say what I did and hopefully, someone will let me know what I did right and where I went wrong.
> 
> The initial binary failed with MySQL. I tried my personal login, root, both with @127.0.0.1 and @localhost.
> Initial installation was,
> GnuCash v2.4.10   - /cygdrive/f/usr/gnucash
> MySQL v5.5.24   - /cygdrive/f/usr/MySQL/MySQL\ Server\
>      5.5/
> (I'm editing from Cygwin, but not running nor building GnuCash from Cygwin.)
> I tried several versions of Perl and finally settled with msys-perl via mingw-get.
> 

> However, automake is broken,
> pinaar at HVS2 ~
> $ $INSTALLER_DIR/install.sh
> Build Starting at Sun Jul 15 22:35:22 PDT 2012
> 
> ############################################################
> ###  Wget
> ############################################################
> already installed in /usr/local/bin.  skipping.
> 
> ############################################################
> ###  MSYS DTK
> ############################################################
> msys dtk already installed in /F/usr/msys/1.0.  skipping.
> ,,,
> ############################################################
> ###  Autotools
> ############################################################
> Extracting autoconf-2.63.tar.bz2 ... done
> Extracting automake-1.11.1.tar.bz2 ... done
> 
> !!! Exactly one directory is required, but detected 2; please delete all but the latest one: /h/pinaar/ws/tmp/autoconf-2.63 /h/pinaar/ws/tmp/autoconf-2.69 !!!
> !!! ABORTING !!!
> resetting msys to use original mingw.
> mv: cannot stat `/etc/fstab.': No such file or directory
> 
> I worked around the broken "mv" command, failing every other time (I just used "cp").
> Actually, the above response from the automake installation is different from this morning when I gave up. It was,
> pinaar at HVS2 ~
> $ automake --help
> Can't locate Automake/Struct.pm in @INC (@INC contains: /mingw/share/automake-1.11 .) at f:/usr/mingw/bin/automake-1.11 line 46.
> BEGIN failed--compilation aborted at f:/usr/mingw/bin/automake-1.11 line 46.
> 
> 
> So, I was wracking my brains - I assumed it was Perl screwing up, but autoconf was pointed out by automake as broken when I tried to build automake from source.

Mv isn't broken, automake isn't broken, and Perl doesn't "screw up".  

You must follow the instructions in the Wiki *exactly*, right down to the version numbers and paths. The Windows build scripts are extremely brittle and they work only with the version of MSYS specified in the instructions. It would be great to get it to work with newer versions of MinGW and MSYS, but it would be a bit of work.

> 
> 
> I would love to build the code in Visual Studio 2010, but the Wiki said I had to build a basis with MSYS and MinGW.
> (I am far more comfortable with the IDE to debug the MySQL problem.)

Gnucash, like all of its dependencies, is an autotools project. While it's possible to get libtool to work with the Microsoft command-line compilers, code must generally be adjusted (using #ifdef blocks) to account for differences between M$ compilers and gcc. A little of that was done in Gnucash a long time ago, but it hasn't been maintained. Other than the basic Gtk+ stack (which Dieter Verfalle keeps compilable with M$ tools), I don't know if any of Gnucash's dependencies are buildable with M$ tools. It would be a big project.

Regards,
John Ralls


More information about the gnucash-devel mailing list