[GHC] #3201: ar: Bad file number

GHC trac at galois.com
Mon May 11 17:39:16 EDT 2009


#3201: ar: Bad file number
-----------------------------+----------------------------------------------
    Reporter:  simonmar      |        Owner:         
        Type:  bug           |       Status:  new    
    Priority:  normal        |    Milestone:  6.12.1 
   Component:  Build System  |      Version:  6.10.2 
    Severity:  normal        |   Resolution:         
    Keywords:                |   Difficulty:  Unknown
    Testcase:                |           Os:  Windows
Architecture:  x86           |  
-----------------------------+----------------------------------------------
Changes (by asklinge):

 * cc: asklingenberg at gmail.com (added)

Comment:

 I get the same error.  It appears to me to be a problem with xargs that
 does not realize it overflows the Windows command line, and passes
 truncated file names to  `ar`.

 What I do to get GHC to build in MSYS is move `/bin/xargs.exe` to
 `/bin/_xargs.exe` and create an `xargs` shell script:
 {{{
 #!/bin/sh
 _xargs -s 32767 $@
 }}}
 And it works with `SplitObjs` enabled.  Quicker than editing multiple
 Makefiles, but it's a hack.

 Maybe a solution is to set up a wrapper in the build system to call
 `xargs` in this fashion when building on MSYS?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3201#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the Glasgow-haskell-bugs mailing list