[Haskell-cafe] GLfloat on a Mac

Thomas Davie tom.davie at gmail.com
Tue Aug 12 05:26:22 EDT 2008


On 12 Aug 2008, at 11:11, Conor McBride wrote:

> Hi folks
>
> I thought I'd try a bit of OpenGL. Perhaps I should
> send this to the more specific list, but perhaps
> other people are, like me, trying out a variety of
> UI technology. I thought I'd give OpenGL a go, because
> I saw the name whizz by when I upgraded to 6.8.3. I
> found the tutorial and got copy-paste cracking.
>
> It was all going swimmingly while I did almost nothing,
> but then ghc started dying on me. I chopped down my
> failing code to this joyous specimen:
>
> HelloWorld.lhs contains
>
> ----------------------------------
>
> > module Main where
>
> > import Graphics.Rendering.OpenGL
> > import Graphics.UI.GLUT
>
> > myFloat :: GLfloat
> > myFloat = 0.0
>
> > main = return ()
>
> ----------------------------------
>
> $ ghc -package GLUT HelloWorld.lhs -o HelloWorld
> Illegal instruction
>
> I'm using ghc 6.8.3 on a Mac PowerBook G4. Googling
> "OpenGL illegal instruction" produced an unending
> choice of horror stories.
>
> What message am I not getting? Is there some crucial
> manual I'm not reading? Is there something which we
> should be being told on the relevant wiki page?
>
> Distressed
>
> Conor

I was going to say that this builds and runs fine on my MacPro so it  
could be an endianness issue, but Malcolm's experience seems to  
contradict that.

Bob



More information about the Haskell-Cafe mailing list