Building on Windows from scratch
Derek Atkins
warlord at MIT.EDU
Fri Dec 27 10:19:58 EST 2013
Hi,
Gary Bilkus <mail at gary.bilkus.com> writes:
> 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.
The cleaner fix would be a configure test that tests whether GCC will
accept the -no-undefined flag and add it (or not) based on the tests.
> 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.
Actually, this is a valid error message. On 64-bit platforms you don't
want to use %llu for gint64 because it's only a "long", not "long long".
Instead you want to use "%lu". The real fix here would be to use
G_GUINT64_FORMAT instead of "lu" or "llu".
> 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.
These warnings are normal and happen on all platforms.
You can safely ignore them.
> 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
AFAIK you cannot run GnuCash from the install directory on Windows.
Even on other platforms it's hard to do.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel
mailing list