I've built Guile 2.0.11 today natively on Windows using MinGW and MSYS, and bumped into this problem: every single C source file in libguile won't compile with errors such as these:
make all-am make[3]: Entering directory `/d/usr/eli/utils/guile-2.0.11/libguile' CC libguile_2.0_la-alist.lo In file included from alist.c:379:0: ../libguile/alist.x: In function 'scm_init_alist': ../libguile/alist.x:2:4448: error: conflicting types for 'scm_i_register_array_implementation' In file included from ../libguile.h:34:0, from ../libguile/programs.h:22, from ../libguile/_scm.h:85, from alist.c:25: ../libguile/array-handle.h:57:19: note: previous declaration of 'scm_i_register_array_implementation' was here In file included from alist.c:379:0: ../libguile/alist.x:2:4555: error: conflicting types for 'scm_i_array_implementation_for_obj' In file included from ../libguile.h:34:0, from ../libguile/programs.h:22, from ../libguile/_scm.h:85, from alist.c:25: ../libguile/array-handle.h:58:42: note: previous declaration of 'scm_i_array_implementation_for_obj' was here and many others like that. After some tinkering, I found that all the *.x files in the libguile directory were produced by guile-snarf without any newlines, so each one of them was just a single huge (thousands of characters) line (well, there's also a relatively short header line). At least on Windows, this confuses the heck out of the compiler or cpp, see above, because there's actually nothing else that is wrong with the declarations that I could spot. (Is it even portable to have such long lines in a C source?) I then used guile-snarf from Guile 2.0.9, and the problem went away. Looking through the archives, I found this message: http://lists.gnu.org/archive/html/guile-devel/2014-03/msg00012.html and the commit mentioned there was precisely the difference between guile-snarf in 2.0.9 and the one in 2.0.11. Now, I understand that the change was made to avoid _extra_ newlines which confuse clang. Can the solution be amended so as to leave only one single newline where a newline should be? Otherwise, there will have to be a separate version of guile-snarf either for clang or for MinGW. TIA