Cairo build fail on OS X Leapord

Installing gtk2hs from MacPorts on a clean mac: 2 -I/usr/X11R6/include svgcairo/Graphics/Rendering/Cairo/SVG.chs:201:2: Couldn't match expected type `()' against inferred type `CInt' Expected type: Render () Inferred type: Render CInt In the expression: liftIO $ (\ (SVG arg1) (Cairo arg2) -> withForeignPtr arg1 $ \ argPtr1 -> rsvg_handle_render_cairo argPtr1 arg2) svg cr In the expression: do cr <- ask liftIO $ (\ (SVG arg1) (Cairo arg2) -> withForeignPtr arg1 $ \ argPtr1 -> rsvg_handle_render_cairo argPtr1 arg2) svg cr make[1]: *** [svgcairo/Graphics/Rendering/Cairo/SVG.o] Error 1 rm svgcairo/Graphics/Rendering/Cairo/SVG.hs make: *** [all] Error 2 Error: Status 1 encountered during processing. -- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow. -- Jessica Edwards

On Fri, 2008-10-31 at 14:55 -0400, Jefferson Heard wrote:
Installing gtk2hs from MacPorts on a clean mac:
svgcairo/Graphics/Rendering/Cairo/SVG.chs:201:2: Couldn't match expected type `()' against inferred type `CInt'
The latest major release of the cairo C lib changed the API to return an int status code for a C function that previously returned void. c2hs guarantees us some degree of cross-language type safety and caught this api change for us (by turning it into a Haskell type error). I expect the updates to work with the new cairo api are in the gtk2hs darcs version. Duncan

how can we use those from MacPorts? Is it possible?
On Mon, Nov 3, 2008 at 5:59 AM, Duncan Coutts
On Fri, 2008-10-31 at 14:55 -0400, Jefferson Heard wrote:
Installing gtk2hs from MacPorts on a clean mac:
svgcairo/Graphics/Rendering/Cairo/SVG.chs:201:2: Couldn't match expected type `()' against inferred type `CInt'
The latest major release of the cairo C lib changed the API to return an int status code for a C function that previously returned void.
c2hs guarantees us some degree of cross-language type safety and caught this api change for us (by turning it into a Haskell type error).
I expect the updates to work with the new cairo api are in the gtk2hs darcs version.
Duncan
-- I try to take things like a crow; war and chaos don't always ruin a picnic, they just mean you have to be careful what you swallow. -- Jessica Edwards

On Mon, 2008-11-03 at 09:10 -0500, Jefferson Heard wrote:
how can we use those from MacPorts? Is it possible?
Either use macports to downgrade to an older version of the cairo C lib, or grab the darcs version of gtk2hs and try that. If macports only supports has one version of a lib at once (I seem to recall someone saying that's the case) then you'll have to pick the second option. Duncan
On Mon, Nov 3, 2008 at 5:59 AM, Duncan Coutts
wrote: On Fri, 2008-10-31 at 14:55 -0400, Jefferson Heard wrote:
Installing gtk2hs from MacPorts on a clean mac:
svgcairo/Graphics/Rendering/Cairo/SVG.chs:201:2: Couldn't match expected type `()' against inferred type `CInt'
The latest major release of the cairo C lib changed the API to return an int status code for a C function that previously returned void.
c2hs guarantees us some degree of cross-language type safety and caught this api change for us (by turning it into a Haskell type error).
I expect the updates to work with the new cairo api are in the gtk2hs darcs version.
participants (2)
-
Duncan Coutts
-
Jefferson Heard