unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Guile 2.0.11 doesn't build on MinGW because of guile-snarf
@ 2014-06-05 17:06 Eli Zaretskii
  0 siblings, 0 replies; only message in thread
From: Eli Zaretskii @ 2014-06-05 17:06 UTC (permalink / raw)
  To: guile-devel

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



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-06-05 17:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-05 17:06 Guile 2.0.11 doesn't build on MinGW because of guile-snarf Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).