Building on Windows from scratch

Gary Bilkus mail at gary.bilkus.com
Fri Dec 27 03:30:34 EST 2013


> > A bit further now.....
>
> > If I change the REL_REPOS_DIR to $GLOBAL_DIR\\gnucash.git
>
> This doesn't make sense to me. REL_REPOS_DIR is not used in the 
> install script, but only in the nightly build scripts.
>
> Which script are you running exactly to build gnucash ?
>
> It should be install.sh
>
> > then it runs configure OK and bombs out on libxml2 tests
>
> > This is because the compiler doesn't recognise -no-undefined, so I
>
> > guess I got to where you were.
>
> > If you remove -no-undefined from configure.ac and try again, configure
>
> > completes and the make starts.
>
> > It then fails in libqof/qof/guid.c line 243 unknown conversion type
>
> > character l in format [-Werror=format=]
>
> > and again in line 510 and 513....
>
> That's indeed as far as I got before I ran out of time.
>
> Geert
>
Hi Geert,
I was indeed running install.sh - the version I found in packaging/win32
The reference to REL_REPOS_DIR is actuall in install-impl.sh which is 
called by install.sh.
Specifically, in that file  in the function inst_gnucash() around line 1281.

Anyway, I've made some more progress. The -no-undefined problem is 
caused because more recent versions of gcc apparently don't understand 
that flag, and don't ignore it but just fail. So although you need to 
pass it to libtool, you mustn't pass it direct to gcc.any more. 
Unfortunately, that means that adding -no-undefined to LDFLAGS causes 
lots of the tests in configure to go wrong with compilation errors, and 
it just happens that the libxml one is the first which is mandatory.

I did a very kludgy workaround by removing -no-undefined from 
configure.ac, running configure, and then running a script to add 
-no-undefined back into every resulting Makefile. I imagine there's a 
cleaner fix somewhere to put the flag into libtool only, but I haven't 
yet found it.

Anyway, when you do that, it starts to compile the app, and the next 
problem is that some of the code files fail to compile.
Specifically:
libqof/qof/guid.c  and backend/xml/sixtp-utils.c
both fail with compiler warnings about %llu formats  in strings. There 
appears to be a bug in the version of gcc (4.8.1) as downloaded for 
mingw cd . which treats these formats as invalid
even though they aren't. Then because -Werror is set, the compile fails.
The solution for the moment was to edit the Makefile to remove the -Wall 
from those files. They then recompile happily.

The only other source file issue is in
gnome-gnc-split-reg.h
where we get the error: expected identifier before numeric constant DELETE,
A bit of trial and error got this to go away by adding
#undef DELETE
#undef DUPLICATE
on line 116, but to be honest I'm not entirely sure what's going on here 
yet.

After all that, a make followed by make install seems to complete, 
although with lots of
libtool: link: warning : 'c/soft/mongw/lib/lib.....la seems to be moved
warnings coming up.

Unfortunately, after all that, I can't get it to run.
If I try to start it from /c/soft/gnucash/inst/bin there are lots of 
missing dlls, which all appear to be dotted around in other places.
If I copy everything into a single directory and try to run I get
Error: Unspecified fatal error encountered, aborting.....

And that's as far as I've got.
Gary









More information about the gnucash-devel mailing list