Re: RE: More windows woe

2013-09-04 Thread Edward Z. Yang
I think this is reasonable, with the added caveat that
the macros should be placed in includes/rts/Linker.h, because that is
where pathchar is defined.  So how about something like:

diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
index e900e85..871b8cd 100644
--- a/includes/rts/Linker.h
+++ b/includes/rts/Linker.h
@@ -16,8 +16,10 @@

 #if defined(mingw32_HOST_OS)
 typedef wchar_t pathchar;
+#define FMT_PATH %S
 #else
 typedef charpathchar;
+#define FMT_PATH %s
 #endif

 /* initialize the object linker */
diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c
index a758b06..8dc8fdc 100644
--- a/rts/CheckUnload.c
+++ b/rts/CheckUnload.c
@@ -254,7 +254,7 @@ void checkUnload (StgClosure *static_objects)

   // Mark every unloadable object as unreferenced initially
   for (oc = unloaded_objects; oc; oc = oc-next) {
-  IF_DEBUG(linker, debugBelch(Checking whether to unload %s\n,
+  IF_DEBUG(linker, debugBelch(Checking whether to unload  FMT_PATH \n,
   oc-fileName));
   oc-referenced = rtsFalse;
   }
@@ -290,11 +290,11 @@ void checkUnload (StgClosure *static_objects)
   } else {
   prev-next = oc-next;
   }
-  IF_DEBUG(linker, debugBelch(Unloading object file %s\n,
+  IF_DEBUG(linker, debugBelch(Unloading object file  FMT_PATH \n,
   oc-fileName));
   freeObjectCode(oc);
   } else {
-  IF_DEBUG(linker, debugBelch(Object file still in use: %s\n,
+  IF_DEBUG(linker, debugBelch(Object file still in use:  FMT_PATH 
\n,
   oc-fileName));
   }
   }
diff --git a/rts/Linker.c b/rts/Linker.c
index 6490242..4f0a1c4 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -2790,7 +2790,7 @@ unloadObj( pathchar *path )

 initLinker();

-IF_DEBUG(linker, debugBelch(unloadObj: %s\n, path));
+IF_DEBUG(linker, debugBelch(unloadObj:  FMT_PATH \n, path));

 prev = NULL;
 for (oc = objects; oc; prev = oc, oc = next) {

Excerpts from Jost Berthold's message of Tue Sep 03 12:56:03 -0700 2013:
  From: Simon Peyton-Jones simo...@microsoft.com
  To: Edward Z. Yang ezy...@mit.edu, Simon Marlow
  marlo...@gmail.com
  Cc: ghc-devs@haskell.org ghc-devs@haskell.org
  Subject: RE: More windows woe
  Message-ID:
  
  59543203684b2244980d7e4057d5fbc1485bb...@db3ex14mbxc308.europe.corp.microsoft.com
  
  Content-Type: text/plain; charset=utf-8
 
  Simon Marlow: please help!
  At the moment windows builds are hosed, which is a Bad Situation.
 
  Actually it turns out that what want is
 
 debugBelch(Checking whether to unload %S\n, oc-fileName));
 
  That is, use %S rather than %s as format specifier for wide chars.
 
  Sadly, this works on Windows, but not on Linux:
  rts/CheckUnload.c:260:13:
error: format ?%S? expects argument of type ?wchar_t *?, but argument 
  2 has type ?pathchar *? [-Werror=format]
 
 
  So what I need guidance on, please!, is what the approved way to deal with 
  this is.  I suppose that I could identify each use of %s on a filepath and 
  say
 
  #ifdef mingw32_HOST_OS
 debugBelch(Checking whether to unload %S\n, oc-fileName));
  #else
 debugBelch(Checking whether to unload %s\n, oc-fileName));
  #endif
 
  But that seems deeply unsatisfactory doesn't it?
 
  If not that, then what?
 
 
  Simon
 
 Similar code is in place to distinguish between 32-bit and 64-bit StgWords:
 
   grep -r -e FMT_Word includes/
 includes/stg/Types.h:#define FMT_Word32u
 includes/stg/Types.h:#define FMT_Word32lu
 includes/stg/Types.h:#define FMT_Word64lu
 includes/stg/Types.h:#define FMT_Word64llu
 includes/stg/Types.h:#define FMT_Word FMT_Word64
 includes/stg/Types.h:#define FMT_Word FMT_Word32
 
 and format strings like blabla  FMT_Word  ..blabla are used inside 
 rts/. One could do the same for FMT_Path and introduce it where required.
 
 Maybe this would be acceptable?
 
 / Jost
 

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


RE: RE: More windows woe

2013-09-04 Thread Simon Peyton-Jones
 IF_DEBUG(linker, debugBelch(Checking whether to unload  FMT_PATH \n,

doesn't that expand to 

 IF_DEBUG(linker, debugBelch(Checking whether to unload  %S \n,

What does the C compiler make of three strings in a row?  Does it automatically 
concatenate them? Is that ANSI C?

S

| -Original Message-
| From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Edward
| Z. Yang
| Sent: 04 September 2013 10:15
| To: Jost Berthold
| Cc: ghc-devs
| Subject: Re: RE: More windows woe
| 
| I think this is reasonable, with the added caveat that
| the macros should be placed in includes/rts/Linker.h, because that is
| where pathchar is defined.  So how about something like:
| 
| diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
| index e900e85..871b8cd 100644
| --- a/includes/rts/Linker.h
| +++ b/includes/rts/Linker.h
| @@ -16,8 +16,10 @@
| 
|  #if defined(mingw32_HOST_OS)
|  typedef wchar_t pathchar;
| +#define FMT_PATH %S
|  #else
|  typedef charpathchar;
| +#define FMT_PATH %s
|  #endif
| 
|  /* initialize the object linker */
| diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c
| index a758b06..8dc8fdc 100644
| --- a/rts/CheckUnload.c
| +++ b/rts/CheckUnload.c
| @@ -254,7 +254,7 @@ void checkUnload (StgClosure *static_objects)
| 
|// Mark every unloadable object as unreferenced initially
|for (oc = unloaded_objects; oc; oc = oc-next) {
| -  IF_DEBUG(linker, debugBelch(Checking whether to unload %s\n,
| +  IF_DEBUG(linker, debugBelch(Checking whether to unload 
| FMT_PATH \n,
|oc-fileName));
|oc-referenced = rtsFalse;
|}
| @@ -290,11 +290,11 @@ void checkUnload (StgClosure *static_objects)
|} else {
|prev-next = oc-next;
|}
| -  IF_DEBUG(linker, debugBelch(Unloading object file %s\n,
| +  IF_DEBUG(linker, debugBelch(Unloading object file  FMT_PATH
| \n,
|oc-fileName));
|freeObjectCode(oc);
|} else {
| -  IF_DEBUG(linker, debugBelch(Object file still in use: %s\n,
| +  IF_DEBUG(linker, debugBelch(Object file still in use: 
| FMT_PATH \n,
|oc-fileName));
|}
|}
| diff --git a/rts/Linker.c b/rts/Linker.c
| index 6490242..4f0a1c4 100644
| --- a/rts/Linker.c
| +++ b/rts/Linker.c
| @@ -2790,7 +2790,7 @@ unloadObj( pathchar *path )
| 
|  initLinker();
| 
| -IF_DEBUG(linker, debugBelch(unloadObj: %s\n, path));
| +IF_DEBUG(linker, debugBelch(unloadObj:  FMT_PATH \n, path));
| 
|  prev = NULL;
|  for (oc = objects; oc; prev = oc, oc = next) {
| 
| Excerpts from Jost Berthold's message of Tue Sep 03 12:56:03 -0700 2013:
|   From: Simon Peyton-Jones simo...@microsoft.com
|   To: Edward Z. Yang ezy...@mit.edu, Simon Marlow
|   marlo...@gmail.com
|   Cc: ghc-devs@haskell.org ghc-devs@haskell.org
|   Subject: RE: More windows woe
|   Message-ID:
|  
| 59543203684b2244980d7e4057d5fbc1485bb...@db3ex14mbxc308.europe.corp.mic
| rosoft.com
|  
|   Content-Type: text/plain; charset=utf-8
|  
|   Simon Marlow: please help!
|   At the moment windows builds are hosed, which is a Bad Situation.
|  
|   Actually it turns out that what want is
|  
|  debugBelch(Checking whether to unload %S\n, oc-fileName));
|  
|   That is, use %S rather than %s as format specifier for wide
| chars.
|  
|   Sadly, this works on Windows, but not on Linux:
|   rts/CheckUnload.c:260:13:
| error: format ?%S? expects argument of type ?wchar_t *?, but
| argument 2 has type ?pathchar *? [-Werror=format]
|  
|  
|   So what I need guidance on, please!, is what the approved way to
| deal with this is.  I suppose that I could identify each use of %s on a
| filepath and say
|  
|   #ifdef mingw32_HOST_OS
|  debugBelch(Checking whether to unload %S\n, oc-fileName));
|   #else
|  debugBelch(Checking whether to unload %s\n, oc-fileName));
|   #endif
|  
|   But that seems deeply unsatisfactory doesn't it?
|  
|   If not that, then what?
|  
|  
|   Simon
| 
|  Similar code is in place to distinguish between 32-bit and 64-bit
| StgWords:
| 
|grep -r -e FMT_Word includes/
|  includes/stg/Types.h:#define FMT_Word32u
|  includes/stg/Types.h:#define FMT_Word32lu
|  includes/stg/Types.h:#define FMT_Word64lu
|  includes/stg/Types.h:#define FMT_Word64llu
|  includes/stg/Types.h:#define FMT_Word FMT_Word64
|  includes/stg/Types.h:#define FMT_Word FMT_Word32
| 
|  and format strings like blabla  FMT_Word  ..blabla are used inside
|  rts/. One could do the same for FMT_Path and introduce it where
| required.
| 
|  Maybe this would be acceptable?
| 
|  / Jost
| 
| 
| ___
| ghc-devs mailing list
| ghc-devs@haskell.org
| http://www.haskell.org/mailman/listinfo/ghc-devs

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman

RE: RE: More windows woe

2013-09-04 Thread Edward Z. Yang
Yep, it's string concatenation, and it's ANSI C as per 5.1.1.2.  We use this
idiom in other parts of the RTS.

Cheers,
Edward

Excerpts from Simon Peyton-Jones's message of Wed Sep 04 02:22:48 -0700 2013:
  IF_DEBUG(linker, debugBelch(Checking whether to unload  FMT_PATH \n,
 
 doesn't that expand to 
 
  IF_DEBUG(linker, debugBelch(Checking whether to unload  %S \n,
 
 What does the C compiler make of three strings in a row?  Does it 
 automatically concatenate them? Is that ANSI C?
 
 S
 
 | -Original Message-
 | From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Edward
 | Z. Yang
 | Sent: 04 September 2013 10:15
 | To: Jost Berthold
 | Cc: ghc-devs
 | Subject: Re: RE: More windows woe
 | 
 | I think this is reasonable, with the added caveat that
 | the macros should be placed in includes/rts/Linker.h, because that is
 | where pathchar is defined.  So how about something like:
 | 
 | diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
 | index e900e85..871b8cd 100644
 | --- a/includes/rts/Linker.h
 | +++ b/includes/rts/Linker.h
 | @@ -16,8 +16,10 @@
 | 
 |  #if defined(mingw32_HOST_OS)
 |  typedef wchar_t pathchar;
 | +#define FMT_PATH %S
 |  #else
 |  typedef charpathchar;
 | +#define FMT_PATH %s
 |  #endif
 | 
 |  /* initialize the object linker */
 | diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c
 | index a758b06..8dc8fdc 100644
 | --- a/rts/CheckUnload.c
 | +++ b/rts/CheckUnload.c
 | @@ -254,7 +254,7 @@ void checkUnload (StgClosure *static_objects)
 | 
 |// Mark every unloadable object as unreferenced initially
 |for (oc = unloaded_objects; oc; oc = oc-next) {
 | -  IF_DEBUG(linker, debugBelch(Checking whether to unload %s\n,
 | +  IF_DEBUG(linker, debugBelch(Checking whether to unload 
 | FMT_PATH \n,
 |oc-fileName));
 |oc-referenced = rtsFalse;
 |}
 | @@ -290,11 +290,11 @@ void checkUnload (StgClosure *static_objects)
 |} else {
 |prev-next = oc-next;
 |}
 | -  IF_DEBUG(linker, debugBelch(Unloading object file %s\n,
 | +  IF_DEBUG(linker, debugBelch(Unloading object file  FMT_PATH
 | \n,
 |oc-fileName));
 |freeObjectCode(oc);
 |} else {
 | -  IF_DEBUG(linker, debugBelch(Object file still in use: %s\n,
 | +  IF_DEBUG(linker, debugBelch(Object file still in use: 
 | FMT_PATH \n,
 |oc-fileName));
 |}
 |}
 | diff --git a/rts/Linker.c b/rts/Linker.c
 | index 6490242..4f0a1c4 100644
 | --- a/rts/Linker.c
 | +++ b/rts/Linker.c
 | @@ -2790,7 +2790,7 @@ unloadObj( pathchar *path )
 | 
 |  initLinker();
 | 
 | -IF_DEBUG(linker, debugBelch(unloadObj: %s\n, path));
 | +IF_DEBUG(linker, debugBelch(unloadObj:  FMT_PATH \n, path));
 | 
 |  prev = NULL;
 |  for (oc = objects; oc; prev = oc, oc = next) {
 | 
 | Excerpts from Jost Berthold's message of Tue Sep 03 12:56:03 -0700 2013:
 |   From: Simon Peyton-Jones simo...@microsoft.com
 |   To: Edward Z. Yang ezy...@mit.edu, Simon Marlow
 |   marlo...@gmail.com
 |   Cc: ghc-devs@haskell.org ghc-devs@haskell.org
 |   Subject: RE: More windows woe
 |   Message-ID:
 |  
 | 59543203684b2244980d7e4057d5fbc1485bb...@db3ex14mbxc308.europe.corp.mic
 | rosoft.com
 |  
 |   Content-Type: text/plain; charset=utf-8
 |  
 |   Simon Marlow: please help!
 |   At the moment windows builds are hosed, which is a Bad Situation.
 |  
 |   Actually it turns out that what want is
 |  
 |  debugBelch(Checking whether to unload %S\n, oc-fileName));
 |  
 |   That is, use %S rather than %s as format specifier for wide
 | chars.
 |  
 |   Sadly, this works on Windows, but not on Linux:
 |   rts/CheckUnload.c:260:13:
 | error: format ?%S? expects argument of type ?wchar_t *?, but
 | argument 2 has type ?pathchar *? [-Werror=format]
 |  
 |  
 |   So what I need guidance on, please!, is what the approved way to
 | deal with this is.  I suppose that I could identify each use of %s on a
 | filepath and say
 |  
 |   #ifdef mingw32_HOST_OS
 |  debugBelch(Checking whether to unload %S\n, oc-fileName));
 |   #else
 |  debugBelch(Checking whether to unload %s\n, oc-fileName));
 |   #endif
 |  
 |   But that seems deeply unsatisfactory doesn't it?
 |  
 |   If not that, then what?
 |  
 |  
 |   Simon
 | 
 |  Similar code is in place to distinguish between 32-bit and 64-bit
 | StgWords:
 | 
 |grep -r -e FMT_Word includes/
 |  includes/stg/Types.h:#define FMT_Word32u
 |  includes/stg/Types.h:#define FMT_Word32lu
 |  includes/stg/Types.h:#define FMT_Word64lu
 |  includes/stg/Types.h:#define FMT_Word64llu
 |  includes/stg/Types.h:#define FMT_Word FMT_Word64
 |  includes/stg/Types.h:#define FMT_Word FMT_Word32
 | 
 |  and format strings like blabla  FMT_Word  ..blabla are used inside
 |  rts/. One could do the same for FMT_Path and introduce

RE: RE: More windows woe

2013-09-04 Thread Kyle Van Berendonck
A quick search reveals that this is valid ANSI C.

Regards,

Kyle
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: RE: More windows woe

2013-09-04 Thread naur
Hello cvs-devs,

On a relatively recent Linux, man sprintf says S [conversion specifier] (Not 
in C99, but in SUSv2.) Synonym for ls. Don't use., so perhaps %ls is better 
than %S.

Best regards
Thorkil

- Original meddelelse -
 Fra: Edward Z. Yang ezy...@mit.edu
 Til: Jost Berthold berth...@mathematik.uni-marburg.de
 Cc: ghc-devs ghc-devs@haskell.org
 Dato: Ons, 04. sep 2013 11:15
 Emne: Re: RE: More windows woe
 
 I think this is reasonable, with the added caveat that
 the macros should be placed in includes/rts/Linker.h, because that
 is
 where pathchar is defined.  So how about something like:
 
 diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
 index e900e85..871b8cd 100644
 --- a/includes/rts/Linker.h
 +++ b/includes/rts/Linker.h
 @@ -16,8 +16,10 @@
 
  #if defined(mingw32_HOST_OS)
  typedef wchar_t pathchar;
 +#define FMT_PATH %S
  #else
  typedef charpathchar;
 +#define FMT_PATH %s
  #endif
 
  /* initialize the object linker */
 diff --git a/rts/CheckUnload.c b/rts/CheckUnload.c
 index a758b06..8dc8fdc 100644
 --- a/rts/CheckUnload.c
 +++ b/rts/CheckUnload.c
 @@ -254,7 +254,7 @@ void checkUnload (StgClosure *static_objects)
 
// Mark every unloadable object as unreferenced initially
for (oc = unloaded_objects; oc; oc = oc-next) {
 -  IF_DEBUG(linker, debugBelch(Checking whether to unload
 %s\n,
 +  IF_DEBUG(linker, debugBelch(Checking whether to unload 
 FMT_PATH \n,
oc-fileName));
oc-referenced = rtsFalse;
}
 @@ -290,11 +290,11 @@ void checkUnload (StgClosure *static_objects)
} else {
prev-next = oc-next;
}
 -  IF_DEBUG(linker, debugBelch(Unloading object file
 %s\n,
 +  IF_DEBUG(linker, debugBelch(Unloading object file 
 FMT_PATH \n,
oc-fileName));
freeObjectCode(oc);
} else {
 -  IF_DEBUG(linker, debugBelch(Object file still in use:
 %s\n,
 +  IF_DEBUG(linker, debugBelch(Object file still in use: 
 FMT_PATH \n,
oc-fileName));
}
}
 diff --git a/rts/Linker.c b/rts/Linker.c
 index 6490242..4f0a1c4 100644
 --- a/rts/Linker.c
 +++ b/rts/Linker.c
 @@ -2790,7 +2790,7 @@ unloadObj( pathchar *path )
 
  initLinker();
 
 -IF_DEBUG(linker, debugBelch(unloadObj: %s\n, path));
 +IF_DEBUG(linker, debugBelch(unloadObj:  FMT_PATH \n,
 path));
 
  prev = NULL;
  for (oc = objects; oc; prev = oc, oc = next) {
 
 Excerpts from Jost Berthold's message of Tue Sep 03 12:56:03 -0700
 2013:
   From: Simon Peyton-Jones simo...@microsoft.com
   To: Edward Z. Yang ezy...@mit.edu, Simon Marlow
   marlo...@gmail.com
   Cc: ghc-devs@haskell.org ghc-devs@haskell.org
   Subject: RE: More windows woe
   Message-ID:
  
 59543203684b2244980d7e4057d5fbc1485bb...@db3ex14mbxc308.europe.corp
 .microsoft.com
   
   Content-Type: text/plain; charset=utf-8
  
   Simon Marlow: please help!
   At the moment windows builds are hosed, which is a Bad
 Situation.
  
   Actually it turns out that what want is
  
  debugBelch(Checking whether to unload %S\n,
 oc-fileName));
  
   That is, use %S rather than %s as format specifier for wide
 chars.
  
   Sadly, this works on Windows, but not on Linux:
   rts/CheckUnload.c:260:13:
 error: format ?%S? expects argument of type ?wchar_t *?,
 but argument 2 has type ?pathchar *? [-Werror=format]
  
  
   So what I need guidance on, please!, is what the approved way to
 deal with this is.  I suppose that I could identify each use of %s
 on a filepath and say
  
   #ifdef mingw32_HOST_OS
  debugBelch(Checking whether to unload %S\n,
 oc-fileName));
   #else
  debugBelch(Checking whether to unload %s\n,
 oc-fileName));
   #endif
  
   But that seems deeply unsatisfactory doesn't it?
  
   If not that, then what?
  
  
   Simon
  
  Similar code is in place to distinguish between 32-bit and 64-bit
 StgWords:
  
grep -r -e FMT_Word includes/
  includes/stg/Types.h:#define FMT_Word32u
  includes/stg/Types.h:#define FMT_Word32lu
  includes/stg/Types.h:#define FMT_Word64lu
  includes/stg/Types.h:#define FMT_Word64llu
  includes/stg/Types.h:#define FMT_Word FMT_Word64
  includes/stg/Types.h:#define FMT_Word FMT_Word32
  
  and format strings like blabla  FMT_Word  ..blabla are used
 inside 
  rts/. One could do the same for FMT_Path and introduce it where
 required.
  
  Maybe this would be acceptable?
  
  / Jost
  
 
 ___
 ghc-devs mailing list
 ghc-devs@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-devs


___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: RE: More windows woe

2013-09-04 Thread Edward Z. Yang
I've gotten GHC to build on Windows, but the test suite is finicky. Here
is an error I am getting:

= T5267(normal) 50 of 3724 [0, 0, 0]   
  
cd ./arrows/should_compile  
'c:/Users/ezyang/Dev/ghc-validate/bindisttest/install   dir/bin/ghc.exe'
 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db 
-rtsopts -fno-ghci-histor
y -c T5267.hsT5267.comp.stderr 21
  
Compile failed (status 256) errors were:
  

  
T5267.hs:11:15: 
  
tee: standard output: Permission denied  

It consistently fails on this test, and when I look at the process
list I see:

I103215481548   4064  con  500 14:54:08 /usr/bin/tee

I was seeing something similar when I used parallel make, apparently
there is a known deadlock when running make -j2 (or higher). But I
don't know why tee would be deadlocking.

Edward

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: RE: More windows woe

2013-09-04 Thread Edward Z. Yang
I manually removed the tee from the validate script, and sallied on.
Here's the next error.

= cabal01(normal) 81 of 3724 [0, 0, 0]
cd ./cabal/cabal01  $MAKE -s --no-print-directory cabal01 
VANILLA=--enable-library-vanilla PR
OF=--disable-library-profiling DYN=--enable-shared CLEANUP=1/dev/null 
cabal01.run.stdout
2cabal01.run.stderr
Wrong exit code (expected 0 , actual 2 )
Stdout:

Stderr:
Creating library file: dist\build\libHStest-1.0-ghc7.7.20130904.dll.a
setup.exe: Error: Could not find module: A with any suffix: [dyn_hi] in the
search path: [dist\\build]
make[3]: *** [cabal01] Error 1

*** unexpected failure for cabal01(normal)

Cheers,
Edward

Excerpts from Edward Z. Yang's message of Wed Sep 04 14:56:30 -0700 2013:
 I've gotten GHC to build on Windows, but the test suite is finicky. Here
 is an error I am getting:
 
 = T5267(normal) 50 of 3724 [0, 0, 0] 
 
 cd ./arrows/should_compile  
 'c:/Users/ezyang/Dev/ghc-validate/bindisttest/install   dir/bin/ghc.exe'
  -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db 
 -rtsopts -fno-ghci-histor
 y -c T5267.hsT5267.comp.stderr 21  
 
 Compile failed (status 256) errors were:  
 
   
 
 T5267.hs:11:15:   
 
 tee: standard output: Permission denied  
 
 It consistently fails on this test, and when I look at the process
 list I see:
 
 I103215481548   4064  con  500 14:54:08 /usr/bin/tee
 
 I was seeing something similar when I used parallel make, apparently
 there is a known deadlock when running make -j2 (or higher). But I
 don't know why tee would be deadlocking.
 
 Edward

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: RE: More windows woe

2013-09-03 Thread Jost Berthold

From: Simon Peyton-Jones simo...@microsoft.com
To: Edward Z. Yang ezy...@mit.edu, Simon Marlow
marlo...@gmail.com
Cc: ghc-devs@haskell.org ghc-devs@haskell.org
Subject: RE: More windows woe
Message-ID:

59543203684b2244980d7e4057d5fbc1485bb...@db3ex14mbxc308.europe.corp.microsoft.com

Content-Type: text/plain; charset=utf-8

Simon Marlow: please help!
At the moment windows builds are hosed, which is a Bad Situation.

Actually it turns out that what want is

   debugBelch(Checking whether to unload %S\n, oc-fileName));

That is, use %S rather than %s as format specifier for wide chars.

Sadly, this works on Windows, but not on Linux:
rts/CheckUnload.c:260:13:
  error: format ?%S? expects argument of type ?wchar_t *?, but argument 2 
has type ?pathchar *? [-Werror=format]


So what I need guidance on, please!, is what the approved way to deal with this 
is.  I suppose that I could identify each use of %s on a filepath and say

#ifdef mingw32_HOST_OS
   debugBelch(Checking whether to unload %S\n, oc-fileName));
#else
   debugBelch(Checking whether to unload %s\n, oc-fileName));
#endif

But that seems deeply unsatisfactory doesn't it?

If not that, then what?


Simon


Similar code is in place to distinguish between 32-bit and 64-bit StgWords:

 grep -r -e FMT_Word includes/
includes/stg/Types.h:#define FMT_Word32u
includes/stg/Types.h:#define FMT_Word32lu
includes/stg/Types.h:#define FMT_Word64lu
includes/stg/Types.h:#define FMT_Word64llu
includes/stg/Types.h:#define FMT_Word FMT_Word64
includes/stg/Types.h:#define FMT_Word FMT_Word32

and format strings like blabla  FMT_Word  ..blabla are used inside 
rts/. One could do the same for FMT_Path and introduce it where required.


Maybe this would be acceptable?

/ Jost


___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs