[jhc] A patch to build jhc on darcs repo.

Kiwamu Okabe kiwamu at gmail.com
Sat Dec 8 04:17:02 CET 2012


On Sat, Dec 8, 2012 at 10:35 AM, John Meacham <john at repetae.net> wrote:
> Thanks! out of curiosity, were you encountering issues on a specific system
> with the other name?

My report had too few information.
Jhc on darcs repo can't compile Haskell code on Debian GNU/Linux sid.

$ jhc -o Fib.jhc Fib.hs
jhc -o Fib.jhc Fib.hs
jhc 0.8.1 (0.8.0-59)
/tmp/jhc_lEuIgU/rts/gc_jgc.c:21:14: error: conflicting types for ‘aligned_alloc’
In file included from /tmp/jhc_lEuIgU/jhc_rts_header.h:8:0,
                 from /tmp/jhc_lEuIgU/rts/gc_jgc.c:1:
/usr/include/stdlib.h:513:14: note: previous declaration of
‘aligned_alloc’ was here
/tmp/jhc_lEuIgU/main_code.c: In function ‘ftheMain’:
/tmp/jhc_lEuIgU/main_code.c:541:25: warning: statement with no effect
Exiting abnormally. Work directory is '/tmp/jhc_lEuIgU'
jhc: user error (C code did not compile.)

Because the aligned_alloc function is defined on C11.

$ zcat /usr/share/doc/libc6-dev/changelog.Debian.gz | head -1
eglibc (2.16-0experimental0) experimental; urgency=low
$ cat /usr/include/stdlib.h
#ifdef __USE_ISOC11
/* ISO C variant of aligned allocation.  */
extern void *aligned_alloc (size_t __alignment, size_t __size)
     __THROW __wur __attribute__ ((__malloc__, __alloc_size__ (2)));

Then, I think it's useful to rename it.

Kiwamu Okabe

More information about the jhc mailing list