Re: Building on Windows from scratch - guile problem SOLVED
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 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. Gary On 09/01/2014 16:49, Gary Bilkus wrote: Hmm, The problem appears to be with the compiler optimiser doing something too aggressive, If I manually recompile guile with -O0 instead of -O2 the problem seems to go away. This could be caused by one of the new optimisations in the more recent versions of gcc in which case it could start to matter on *nix at some point. Anyone know much about this? Gary -Original message- From:Gary Bilkus Sent:Thu 09-01-2014 13:37 Subject:Building on Windows from scratch - guile problem To:gnucash-devel@gnucash.org; I have done some testing of my build, and it appears there is some kind of problem with guile The symptom is that whenever I try to run a report, even hello world, it fails. Digging into things, it turns out that there is at least one problem with the guile build, whcih is that character constants like #\space are not being initialized correctly. Just running guile standalone shows the problem. guile> #\space \#nul So there's obviously some problem with the guile build over and above the library naming one I found earlier. Not sure if it's the version, the compiler version or what. Will investigate further, but any suggestions or experience from other would be welcome Gary On 08/01/2014 15:07, Gary Bilkus wrote: I have written up the procedure which as of today is working to build gnucash 2.6 from scratch on windows and updated http://wiki.gnucash.org/wiki/Windows/Development It would be really nice if the patch file I have created along with my modified version of geert's vbs file could find their way into the official repo. It should be safe enough as all the changes are to the win32 directory except for two, which I'm reasonably confident won't break anything else: - configure.ac now deals with the -no-undefined flag more cleverly - gnc-split-reg.h has a couple of #undef statements added to avoid DELETE and DUPLICATE being defined in windows headers. It probably also makes sense for the page to be split up again, and some of the older information moved away, but it would be good to get some feedback from people who try following the instructions. I've done my best to ensure that there are no ambiguities or misprints, and the entire process has worked for me, but feel free to fix any errors, or tell me of any changes I can/should make to the zip file I've published. Please note that I haven't extensively tested all the features of the program. There could be some issues with the build which don't immediately manifest themselves..but at least it runs. Also, I haven't yet tried packaging the app into an msi or installable exe Gary ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
RE: Building on Windows from scratch - guile problem
Hmm, The problem appears to be with the compiler optimiser doing something too aggressive, If I manually recompile guile with -O0 instead of -O2 the problem seems to go away. This could be caused by one of the new optimisations in the more recent versions of gcc in which case it could start to matter on *nix at some point. Anyone know much about this? Gary -Original message- From:Gary Bilkus Sent:Thu 09-01-2014 13:37 Subject:Building on Windows from scratch - guile problem To:gnucash-devel@gnucash.org; I have done some testing of my build, and it appears there is some kind of problem with guile The symptom is that whenever I try to run a report, even hello world, it fails. Digging into things, it turns out that there is at least one problem with the guile build, whcih is that character constants like #\space are not being initialized correctly. Just running guile standalone shows the problem. guile> #\space \#nul So there's obviously some problem with the guile build over and above the library naming one I found earlier. Not sure if it's the version, the compiler version or what. Will investigate further, but any suggestions or experience from other would be welcome Gary On 08/01/2014 15:07, Gary Bilkus wrote: > I have written up the procedure which as of today is working to build > gnucash 2.6 from scratch on windows and updated > http://wiki.gnucash.org/wiki/Windows/Development > > It would be really nice if the patch file I have created along with my > modified version of geert's vbs file could find their way into the > official repo. > It should be safe enough as all the changes are to the win32 directory > except for two, which I'm reasonably confident won't break anything else: > - configure.ac now deals with the -no-undefined flag more cleverly > - gnc-split-reg.h has a couple of #undef statements added to avoid > DELETE and DUPLICATE being defined in windows headers. > > It probably also makes sense for the page to be split up again, and > some of the older information moved away, but it would be good to get > some feedback from people who try following the instructions. > > I've done my best to ensure that there are no ambiguities or > misprints, and the entire process has worked for me, but feel free to > fix any errors, or tell me of any changes I can/should make to the zip > file I've published. > > Please note that I haven't extensively tested all the features of the > program. There could be some issues with the build which don't > immediately manifest themselves..but at least it runs. > > Also, I haven't yet tried packaging the app into an msi or installable > exe > > Gary > ___ > gnucash-devel mailing list > gnucash-devel@gnucash.org > https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel
Building on Windows from scratch - guile problem
I have done some testing of my build, and it appears there is some kind of problem with guile The symptom is that whenever I try to run a report, even hello world, it fails. Digging into things, it turns out that there is at least one problem with the guile build, whcih is that character constants like #\space are not being initialized correctly. Just running guile standalone shows the problem. guile> #\space \#nul So there's obviously some problem with the guile build over and above the library naming one I found earlier. Not sure if it's the version, the compiler version or what. Will investigate further, but any suggestions or experience from other would be welcome Gary On 08/01/2014 15:07, Gary Bilkus wrote: I have written up the procedure which as of today is working to build gnucash 2.6 from scratch on windows and updated http://wiki.gnucash.org/wiki/Windows/Development It would be really nice if the patch file I have created along with my modified version of geert's vbs file could find their way into the official repo. It should be safe enough as all the changes are to the win32 directory except for two, which I'm reasonably confident won't break anything else: - configure.ac now deals with the -no-undefined flag more cleverly - gnc-split-reg.h has a couple of #undef statements added to avoid DELETE and DUPLICATE being defined in windows headers. It probably also makes sense for the page to be split up again, and some of the older information moved away, but it would be good to get some feedback from people who try following the instructions. I've done my best to ensure that there are no ambiguities or misprints, and the entire process has worked for me, but feel free to fix any errors, or tell me of any changes I can/should make to the zip file I've published. Please note that I haven't extensively tested all the features of the program. There could be some issues with the build which don't immediately manifest themselves..but at least it runs. Also, I haven't yet tried packaging the app into an msi or installable exe Gary ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel ___ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel