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

Bug#572760: FTBFS: /dev/urandom: hGetChar: invalid argument (Invalid or incomplete multibyte or wide character)



Package: src:kaya
Version: 0.4.4-3
Severity: serious

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

as can be seen here:
https://buildd.debian.org/fetch.cgi?pkg=kaya&arch=kfreebsd-amd64&ver=0.4.4-3&stamp=1267577990&file=log&as=raw
kaya fails to build from source with a current ghc6-6.12. This also
affects other, non-Debian-users:
http://lists.kayalang.org/archives/kaya-devel/2010-January/000644.html

The reason seems to be that kayac uses hGetChar to read from
/dev/urandom. With ghc6-6.12, hGetChar tries to read a char according to
the current locale, which can be UTF-8, and a random byte is not always
a valid UTF-8 character...

A proper fix would be to use hGetBuf. A work-arond would be to use
hSetBinaryMode on the handle before using hGetChar.

Greetings,
Joachim

- -- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkuSSP8ACgkQ9ijrk0dDIGyxHgCdGJJVmsd9Gbs/HWdGM4r2xLFs
N2cAoMCVt0/Zkn3zQ5jl1robsoXRKWI+
=jxMq
-----END PGP SIGNATURE-----



Reply to: