How to solve ghc-stage2: mkTextEncoding: invalid argument (Invalid argument) issue.

Simon Marlow marlowsd at
Mon Sep 21 07:50:13 EDT 2009

On 17/09/2009 22:20, Matthias Kilian wrote:
> On Thu, Sep 17, 2009 at 09:17:35AM +0100, Simon Marlow wrote:
>> Glad you got it going.  I notice there are a few test failures, many of
>> which could be fixed easily, e.g.
>> --- ./lib/IO/hClose002.stdout.normalised        Wed Sep 16 14:08:09 2009
>> +++ ./lib/IO/    Wed Sep 16 14:08:09 2009
>> @@ -1,4 +1,4 @@
>> -Left hClose002.tmp: hClose: invalid argument (Bad file descriptor)
>> +Left hClose002.tmp: hClose: invalid argument (Bad file number)
>>   Right ()
>>   Right ()
>>   Right ()
>> *** unexpected failure for hClose002(normal)
>> that just needs a platform-specific expected output file
>> (hClose002.stdout-i386-unknown-solaris2).
> BTW: is there an easy way to do some general output filtering on
> *all* tests for different platforms? It may not be helpful for the
> above test, but for some differences (like stderr in case of several
> types of core dumps on different operating systems, or the typical
> linker warnings about strcat(3), strcpy(3) etc. on OpenBSD) it may
> be less maintainance work to filter or modify the output on specific
> platforms.

This is slightly ad-hoc at the moment and could do with generalising a 
bit.  Look at the various functions beginning with normalise_ in 
testsuite/driver/  There's also a way to specify a per-test 
output normalisation function: normalise_fun().


More information about the Glasgow-haskell-users mailing list