
On Wed, Oct 20, 2010 at 10:23:59PM -0700, Alexander Dunlap wrote:
On Mon, Oct 11, 2010 at 2:11 AM, Simon Marlow
wrote: On 10/10/2010 05:22, Alexander Dunlap wrote:
On Fri, Oct 8, 2010 at 12:46 AM, Simon Marlow
wrote: On 08/10/2010 03:23, Alexander Dunlap wrote:
I recently upgraded my Arch Linux system to glibc 2.12 and static binaries compiled with GHC 6.12.3 all fail with the message "mkTextEncoding: invalid argument (Invalid argument)". This did not happen with glibc 2.11. Has anyone else had this problem? Does anyone have any advice for debugging it?
Yes, it does, but strace seems to show that the program is looking in the right place for the iconv libraries. Is there some way to step through the code of a statically-linked program? I'm not sure how to proceed debugging a Haskell-originated error that only occurs with static linking (so I can't use the GHCi debugger).
The error is almost certainly being returned by iconv(), which is called via this wrapper in base/cbits/iconv.c:
size_t hs_iconv(iconv_t cd, return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft);
Does this indicate that the error is occurring before iconv is even called?
I suspect it's actually hs_iconv_open (which calls iconv_open) which gives the error. Thanks Ian