Snow Leopard Problems with GLWF

Mark Fine mark.fine at gmail.com
Thu Sep 24 23:56:39 EDT 2009


When I try and load the SOE code, I get similar type of error messages
to what shows up when I try and load the Sample Program from
http://haskell.org/haskellwiki/GLFW (apologies in advance if I'm
setting something up wrong):

    Couldn't match expected type
`OpenGL-2.2.1.1:Graphics.Rendering.OpenGL.GL.CoordTrans.Size'
           against inferred type `Size'
    In the first argument of `openWindow', namely `(Size 400 400)'
    In a stmt of a 'do' expression:
        openWindow (Size 400 400) [DisplayAlphaBits 8] Window
    In the expression:
        do initialize
           openWindow (Size 400 400) [DisplayAlphaBits 8] Window
             windowTitle $= "GLFW Demo"
             shadeModel $= Smooth
           ....

SOE.hs:132:18:
    Couldn't match expected type
`OpenGL-2.2.1.1:Graphics.Rendering.OpenGL.GL.CoordTrans.Size'
           against inferred type `GL.Size'
    In the first argument of `GLFW.openWindow', namely `siz'
    In a stmt of a 'do' expression:
        GLFW.openWindow
          siz
          [GLFW.DisplayStencilBits 8, GLFW.DisplayAlphaBits 8]
          GLFW.Window
    In the expression:
        do let siz = maybe (GL.Size 400 300) fromSize size
           initialize
           graphicVar <- newMVar (emptyGraphic, False)
           eventsChan <- newChan


On Thu, Sep 24, 2009 at 8:20 PM, Mark Fine <mark.fine at gmail.com> wrote:
> Thanks, that worked!
>
> Mark
>
> On Thu, Sep 24, 2009 at 7:57 PM,  <paul at thev.net> wrote:
>> Hi Mark,
>>
>> The support for Snow Leopard is already in the darcs version
>> of GLFW. You may get it by:
>>
>>  darcs get http://code.haskell.org/GLFW
>>
>> But there is one more bug to GHC's snow leopard support, which
>> I reported here:
>>
>>  http://hackage.haskell.org/trac/ghc/ticket/3522
>>
>> It has been fixed only in current HEAD version of GHC. So my
>> advice for the public GHC version like 6.10.*, please edit
>> this file:
>>
>>  /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h
>>
>> and change the line that says
>>
>>   #include <block.h>
>>
>> to
>>
>>   #include "/usr/include/block.h"
>>
>> Then you may proceed with the usual "cabal install" for GLFW.
>> Hope it helps!
>>
>> Regards,
>> Paul Liu
>>
>> On Thu, Sep 24, 2009 at 07:22:17PM -0700, Mark Fine wrote:
>>> Hi!
>>>
>>> I'm running into issues trying to install GLWF. Initially, I get:
>>>
>>> # runhaskell Setup configure
>>> Configuring GLFW-0.4.1...
>>>
>>> /tmp/3301.c:1:0:
>>>      error: CPU you selected does not support x86-64 instruction set
>>> #
>>>
>>> Then, I pass in the flags "-optc-m32 -opta-m32 -optl-m32" into ghc and
>>> ghci, and then run into the following
>>>
>>> # sudo runhaskell Setup configure
>>> Configuring GLFW-0.4.1...
>>> # sudo runhaskell Setup build
>>> Preprocessing library GLFW-0.4.1...
>>> Building GLFW-0.4.1...
>>>
>>> glfw/lib/macosx/macosx_enable.c:1:0:
>>>      error: bad value (native) for -march= switch
>>>
>>> glfw/lib/macosx/macosx_enable.c:1:0:
>>>      error: bad value (native) for -mtune= switch
>>> #
>>>
>>> OR
>>>
>>> # sudo runhaskell Setup build
>>> Preprocessing library GLFW-0.4.1...
>>> Building GLFW-0.4.1...
>>>
>>> glfw/lib/macosx/macosx_enable.c:1:0:
>>>      error: bad value (apple) for -march= switch
>>>
>>> glfw/lib/macosx/macosx_enable.c:1:0:
>>>      error: bad value (apple) for -mtune= switch
>>> #
>>>
>>> These are my first forays with cabal, so if there's something I can do
>>> to provide more information, please let me know. Here's my machine:
>>>
>>> Darwin yoho.local 10.0.0 Darwin Kernel Version 10.0.0: Fri Jul 31
>>> 22:47:34 PDT 2009; root:xnu-1456.1.25~1/RELEASE_I386 i386
>>
>



More information about the GLFW mailing list