Re: hsc2hs on Mac

2011-05-23 Thread Simon Marlow
On 17/05/2011 03:10, Kazu Yamamoto (山本和彦) wrote: Hello, Not directly. hsc2hs calls the C compiler to determine these numbers. It seems it is calling gcc-4.0 rather than gcc-4.2. It might be a bug that it is calling the wrong compiler, but that might just be misconfiguration in your environmen

Re: hsc2hs on Mac

2011-05-16 Thread 山本和彦
Hello, >> Not directly. hsc2hs calls the C compiler to determine these numbers. >> It seems it is calling gcc-4.0 rather than gcc-4.2. It might be a bug >> that it is calling the wrong compiler, but that might just be >> misconfiguration in your environment, or in the Haskell Platform. >> >>> gc

Re: hsc2hs on Mac

2011-05-16 Thread Simon Marlow
On 13/05/2011 08:20, Malcolm Wallace wrote: hsc2hs converts (#const sizeof(struct stat)) (#peek struct stat, st_mtimespec) to 108 36 but the correct values are 144 32. Is this a bug of hsc2hs? Not directly. hsc2hs calls the C compiler to determine these numbers. It seems it is c

Re: hsc2hs on Mac

2011-05-13 Thread Malcolm Wallace
> hsc2hs converts > (#const sizeof(struct stat)) > (#peek struct stat, st_mtimespec) > to > 108 > 36 > but the correct values are > 144 > 32. > > Is this a bug of hsc2hs? Not directly. hsc2hs calls the C compiler to determine these numbers. It seems it is calling gcc-4.0 rather than gcc

hsc2hs on Mac

2011-05-12 Thread 山本和彦
Hello, I'm using Haskell Platform 2011.2.0.1 on MacOS (Snow Leapard). hsc2hs converts (#const sizeof(struct stat)) (#peek struct stat, st_mtimespec) to 108 36 but the correct values are 144 32. Is this a bug of hsc2hs? gcc-4.0 says sizeof (struct stat) is 108 while gcc-4.2 (default

Re: hsc2hs on Mac OS 10.6 unreliable?

2010-06-09 Thread Chris Kuklewicz
That was in the official hsc2hc binary but was commented out in my macports hsc2hs. I have uncommented the line and rebuilt a working gtk2hs. Thanks! On 09/06/2010 09:30, Christian Maeder wrote: > Chris Kuklewicz schrieb: >> hsc2hs: On OS 10.6 ghc is calling hsc2hs without any special -arch >> o

Re: hsc2hs on Mac OS 10.6 unreliable?

2010-06-09 Thread Axel Simon
Hi Christian, On 09.06.2010, at 10:30, Christian Maeder wrote: Chris Kuklewicz schrieb: hsc2hs: On OS 10.6 ghc is calling hsc2hs without any special -arch option, and hsc2hs is calculating offsets in x86_64 mode. This is breaking the interface between ghc and c-structures for various librarie

Re: hsc2hs on Mac OS 10.6 unreliable?

2010-06-09 Thread Christian Maeder
Chris Kuklewicz schrieb: > hsc2hs: On OS 10.6 ghc is calling hsc2hs without any special -arch > option, and hsc2hs is calculating offsets in x86_64 mode. This is > breaking the interface between ghc and c-structures for various > libraries. In particular I ran into this with gtk2hs. > > It may s

Re: hsc2hs on Mac OS 10.6 unreliable?

2010-06-09 Thread Chris Kuklewicz
The story on OS X 10.6 with ghc-6.12 on x86 hardware seems to be this: Apple's gcc: Defaults to i386 or ppc on Mac OS X 10.5 and earlier, depending on the CPU type detected at runtime. On Mac OS X 10.6 the default is x86_64 if the CPU supports it, i386 otherwise. Passing -arch i386 or -arch x86_64

Re: hsc2hs on Mac OS 10.6 unreliable?

2010-06-09 Thread Max Bolingbroke
On 8 June 2010 22:03, Axel Simon wrote: > The offsets that hsc2hs calculates are too large, so it is probably in > x86_64 mode. Is it just this problem: http://hackage.haskell.org/trac/ghc/ticket/3400 If you use an older GHC you will need to manually patch the hsc2hs script to pass the right com

hsc2hs on Mac OS 10.6 unreliable?

2010-06-08 Thread Axel Simon
Hi all, we're facing serious problems (the seg'faulting kind) with Gtk2Hs on Mac OS 10.6. Chris has tracked this down to incorrect structure offsets that hsc2hs calculates. The offsets that hsc2hs calculates are too large, so it is probably in x86_64 mode. The offsets with which Gtk+ was