Opened 16 years ago

Closed 15 years ago

#16780 closed defect (fixed)

gtk2hs 0.9.13 fails to build

Reported by: gale@… Owned by: gwright@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: n.mayr@…
Port: gtk2hs

Description

During port upgrade gtk2hs with an up-to-date ports tree, I get:

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

Change History (6)

comment:1 Changed 16 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to gwright@…

comment:2 Changed 16 years ago by n.mayr@…

Cc: n.mayr@… added

Cc Me!

comment:3 in reply to:  description Changed 16 years ago by n.mayr@…

I "solved" the problem as follows:

Edit the file "/opt/local/var/macports/portdirs/gtk2hs-0.9.13/svgcairo/Graphics/Rendering/Cairo/SVG.chs"
svgRender :: SVG -> Render ()
svgRender svg = do
cr <- ask
liftIO $ {# call unsafe render_cairo #} svg cr

svgRender :: SVG -> Render ()
svgRender svg = do
cr <- ask
liftIO $ {# call unsafe render_cairo #} svg cr
return ()

I am not shure if there are any negative consequences. The positive ones are:
- the package compiles
- demo programs work (at least the ones I tested)

Also I had a second problem after I got this package to compile:
My program uses glade and the appropriate library did non load:
Loading package array-0.1.0.0 ... linking ... done.
Loading package bytestring-0.9.0.1.1 ... linking ... done.
Loading package mtl-1.1.0.1 ... linking ... done.
Loading package glib-0.9.13 ... linking ... done.
Loading package cairo-0.9.13 ... linking ... done.
Loading package containers-0.1.0.2 ... linking ... done.
Loading package gtk-0.9.13 ... linking ... done.
Loading package glade-0.9.13 ... can't load .so/.DLL for: glade-2.0 (dlopen(libglade-2.0.dylib, 10): image not found)

Solution: Edit "/opt/local/lib/ghc-6.8.3/package.conf"
The entry for 'pkgName = "glade"'
Put 'libraryDirs = ["/opt/local/lib/gtk2hs", "/opt/local/lib"]' in there
/opt/local/lib is probably not a good directory for the libglade. but for the moment this fixes the problem.

comment:4 Changed 16 years ago by jbolden1517@…

CC me

comment:5 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:6 Changed 15 years ago by gwright@…

Resolution: fixed
Status: newclosed

This has been fixed for some time. Current gtk2hs is 0.10.1.

Note: See TracTickets for help on using tickets.