Building on Windows from scratch - guile problem SOLVED
jralls at ceridwen.us
Fri Jan 10 10:03:28 EST 2014
On Jan 9, 2014, at 11:13 PM, Gary Bilkus <mail at gary.bilkus.com> wrote:
> Well, interestingly enough, the problem is not directly with the compiler optimizer. It's with the configure test for strncasecmp. This test fails on mingw in its current incarnation because guile uses a standard test for the function, but on mingw strncasecmp is actually a cpp definition. As a result, guile is compiled with #HAVE_STRNCASECMP unset, and so guile tries to create its own version in read.c
> Now if you compile with no optimization, the compiler notices that read.c is attempting to create this with a different signature and bombs out. However, with optimisation on, the code compiles for some reason, and then fails to run properly.
> So there seem to be two problems: one in configure for guile and/or the standard configure macros on mingw, the other in the compiler.
> Fortunately, there's a very easy although ugly workaround, which is to add an
> echo "#define HAVE_STRNCASECMP" >>config.h
Would adding -DHAVE_STRNCASECMP to $CFLAGS work? It's a bit cleaner than echoing a #define into the config header.
Better yet, sometimes there's a variable that can be defined on the configure command line -- perhaps $ac_have_strncasecmp -- to force configure to do the right thing.
> in install-impl.sh
> just after the guile configure and before the make
> I've incorporated this fix into my downloadable file of fixes as referred to on the wiki page I updated.
> More as and when I find any further issues. As always, feedback or other experiences welcome.
More information about the gnucash-devel