guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: guile 2.0.9 build on mingw


From: Eli Zaretskii
Subject: Re: guile 2.0.9 build on mingw
Date: Wed, 12 Jun 2013 20:57:38 +0300

> Date: Tue, 11 Jun 2013 19:53:21 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
> 
> What eventually did the trick was configuring --with-threads=no.  Once
> I did that, the build ran successfully and almost 100% cleanly to
> completion.  (I will report the details about "almost" later.)

Here's part 1 of those details.

First, running the test suite resulted in some failures.
test-system-cmds failed because it uses '..' quoting on the command
line, which the Windows shell doesn't support.  Fixed thusly:

--- test-suite/standalone/test-system-cmds~0    2010-12-08 11:07:11.000000000 
+0200
+++ test-suite/standalone/test-system-cmds      2013-06-12 13:52:14.333269200 
+0300
@@ -10,7 +10,7 @@
          "test-system-cmds: (system) did not return a boolean\n")
         (exit 1)))
   
-  (let ((rs (status:exit-val (system "guile -c '(exit 42)'"))))
+  (let ((rs (status:exit-val (system "guile -c \"(exit 42)\""))))
     (if (not (= 42 rs))
         (begin
           (simple-format
@@ -39,4 +39,4 @@
 
 ;; Local Variables:
 ;; mode: scheme
-;; End:
\ No newline at end of file
+;; End:

Next, test-unwind failed because it assumed that either $TMPDIR or
'/tmp' will exist, none of which can be counted upon on Windows.
Here's the fix for that (the declaration of mkstemp avoids compiler
warning):

--- test-suite/standalone/test-unwind.c~0       2012-01-31 00:32:38.000000000 
+0200
+++ test-suite/standalone/test-unwind.c 2013-06-12 14:11:47.967231800 +0300
@@ -200,9 +200,19 @@ check_ports ()
 #define FILENAME_TEMPLATE "/check-ports.XXXXXX"
   char *filename;
   const char *tmpdir = getenv ("TMPDIR");
+#ifdef __MINGW32__
+  extern int mkstemp (char *);
 
   if (tmpdir == NULL)
+    tmpdir = getenv ("TEMP");
+  if (tmpdir == NULL)
+    tmpdir = getenv ("TMP");
+  if (tmpdir == NULL)
+    tmpdir = "/";
+#else
+  if (tmpdir == NULL)
     tmpdir = "/tmp";
+#endif
 
   filename = alloca (strlen (tmpdir) + sizeof (FILENAME_TEMPLATE) + 1);
   strcpy (filename, tmpdir);


Finally, the tests in check-guile fail because they unconditionally
use features that are not compiled into the MinGW build or not
supported by it, like 'lstat', AF_UNIX in sockets, etc.  Moreover,
whenever a test fails, the run stops without running the rest of the
test.  Is there a way to skip tests that are known to fail?  I see
that renaming the corresponding test files to not have the .test
extension would probably do the trick, but is there a better way?  For
that matter, is there a way of forcing the test run to continue even
if some test failed?  (I would actually suggest to skip tests
automatically based on unsupported features.)

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]