
The install instructions seem very straight-forward, but they are not working for me. I did: ./configure --enable-docs --disable-deprecated make su -c'make install' but the demos won't compile (they can't find the libraries). checking the stderr from make shows: ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: mtl make: *** Deleting file `package.conf.inplace' package.conf.inplace: openBinaryFile: does not exist (No such file or directory) package.conf.inplace: openBinaryFile: does not exist (No such file or directory) ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: mtl make[1]: *** Deleting file `package.conf.inplace' package.conf.inplace: openBinaryFile: does not exist (No such file or directory) package.conf.inplace: openBinaryFile: does not exist (No such file or directory) on the commandline: Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead package.conf.inplace: openBinaryFile: does not exist (No such file or directory) make[1]: *** [glib/System/Glib.o] Error 1 make: *** [all] Error 2 My environment is Fedora 10 (64-bit). Ghc 6.10.1. Any suggestions? -- Colin Adams Preston Lancashire

Hi, Colin,
I found same problem with me.
I think gtk2hs can't compile success with GHC 6.10.1
So i back to 6.8
Regards,
-- Andy.
Colin Paul Adams
The install instructions seem very straight-forward, but they are not working for me.
I did:
./configure --enable-docs --disable-deprecated make su -c'make install'
but the demos won't compile (they can't find the libraries).
checking the stderr from make shows:
ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: mtl make: *** Deleting file `package.conf.inplace' package.conf.inplace: openBinaryFile: does not exist (No such file or directory) package.conf.inplace: openBinaryFile: does not exist (No such file or directory) ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: base ghc-pkg: Unversioned dependencies found: mtl make[1]: *** Deleting file `package.conf.inplace' package.conf.inplace: openBinaryFile: does not exist (No such file or directory) package.conf.inplace: openBinaryFile: does not exist (No such file or directory)
on the commandline: Warning: -fffi is deprecated: use -XForeignFunctionInterface or pragma {-# LANGUAGE ForeignFunctionInterface#-} instead package.conf.inplace: openBinaryFile: does not exist (No such file or directory) make[1]: *** [glib/System/Glib.o] Error 1 make: *** [all] Error 2
My environment is Fedora 10 (64-bit). Ghc 6.10.1.
Any suggestions?

"Andy" == Andy Stewart
writes:
Andy> Hi, Colin, I found same problem with me. I think gtk2hs Andy> can't compile success with GHC 6.10.1 So i back to 6.8 Thanks Andy. I removed ghc 6.10.1 then did a yum groupinstall haskell. I then tried again. This time the configure failed because it couldn't find haddock. I had to manually add a link from haddock to haddock-0.9 in /usr/bin. Clearly a problem with the rpm packaging for Fedora. Now make fails with: 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 make: *** [all] Error 2 -- Colin Adams Preston Lancashire

"Colin" == Colin Paul Adams
writes:
"Andy" == Andy Stewart
writes: Andy> Hi, Colin, I found same problem with me. I think gtk2hs Andy> can't compile success with GHC 6.10.1 So i back to 6.8
Colin> Thanks Andy. Colin> I removed ghc 6.10.1 then did a yum groupinstall haskell. Colin> I then tried again. This time the configure failed because Colin> it couldn't find haddock. I had to manually add a link from Colin> haddock to haddock-0.9 in /usr/bin. Clearly a problem with Colin> the rpm packaging for Fedora. Colin> Now make fails with: Colin> svgcairo/Graphics/Rendering/Cairo/SVG.chs:201:2: Couldn't Colin> match expected type `()' against inferred type `CInt' Colin> Expected type: Render () Inferred type: Render CInt In the Colin> expression: liftIO $ (\ (SVG arg1) (Cairo arg2) -> withForeignPtr arg1 Colin> $ \ argPtr1 -> rsvg_handle_render_cairo Colin> argPtr1 arg2) svg cr In the expression: do cr <- ask liftIO Colin> $ (\ (SVG arg1) (Cairo arg2) -> withForeignPtr arg1 Colin> $ \ argPtr1 -> rsvg_handle_render_cairo Colin> argPtr1 arg2) svg cr make[1]: *** Colin> [svgcairo/Graphics/Rendering/Cairo/SVG.o] Error 1 make: *** Colin> [all] Error 2 So I tried changing Render () to Render CInt in four places in SVG.chs. Now it installs OK with 6.8.3, and all the demos run. I'd have a go at getting it to work with 6.10.1 if I knew what to do. It appears the library structure has changed incompatibly (and ghc didn't even change its version number - that's pretty bad). Is there a document anywhere that details the structure changes? -- Colin Adams Preston Lancashire

"Colin" == Colin Paul Adams
writes:
Colin> Now it installs OK with 6.8.3, and all the demos run. Well, not quite all: mozembed fails to compile with: TestEmbedMoz.hs:5:7: Could not find module `Graphics.UI.Gtk.MozEmbed': Use -v to see a list of the files searched for. make: *** [testembedmoz] Error 1 And the svgviewer programs fail at runtime with: svgviewer: user error (Pattern match failure in do expression at SvgViewer.hs:11:2-9) and: svg2png: user error (Pattern match failure in do expression at Svg2Png.hs:9:2-18) and for treelist: make: *** No rule to make target `TreeSort.hs', needed by `treesort'. Stop. and for opengl: ghc --make RotatingCube.hs -o cube RotatingCube.hs:7:17: Could not find module `Graphics.UI.Gtk.OpenGL': Use -v to see a list of the files searched for. make: *** [cube] Error 1 and for sourceview: ghc --make SourceViewTest.hs -o sourceview SourceViewTest.hs:5:7: Could not find module `Graphics.UI.Gtk.SourceView': Use -v to see a list of the files searched for. make: *** [sourceview] Error 1 -- Colin Adams Preston Lancashire

On Sun, 2008-11-30 at 09:24 +0000, Colin Paul Adams wrote:
"Colin" == Colin Paul Adams
writes: Colin> Now it installs OK with 6.8.3, and all the demos run.
Well, not quite all:
mozembed fails to compile with:
TestEmbedMoz.hs:5:7: Could not find module `Graphics.UI.Gtk.MozEmbed': Use -v to see a list of the files searched for. make: *** [testembedmoz] Error 1
This almost certainly is because you didn't build the mozembed component of gtk2hs. The ./configure script lists all the bits that it's going to build. By default if the corresponding C devel package is not available then the binding will not be built. If you really want to build it then use ./configure --enable-firefox or --enable-xulrunner and it will stop and report exactly what bits it needed but could not find.
And the svgviewer programs fail at runtime with:
svgviewer: user error (Pattern match failure in do expression at SvgViewer.hs:11:2-9)
That's kind of by design, it's a simple demo program that does no error checking on the command line arguments. See that line in the source code: (file:_) <- getArgs So if you call it with a single .svg file parameter it should work.
and:
svg2png: user error (Pattern match failure in do expression at Svg2Png.hs:9:2-18)
Same issue.
and for treelist:
make: *** No rule to make target `TreeSort.hs', needed by `treesort'. Stop.
Good catch, that file is missing from the tarball.
and for opengl:
ghc --make RotatingCube.hs -o cube
RotatingCube.hs:7:17: Could not find module `Graphics.UI.Gtk.OpenGL': Use -v to see a list of the files searched for. make: *** [cube] Error 1
Same as the fist problem. You built gtk2hs without the opengl component. Use ./configure --enable-opengl and it'll tell you what you're missing.
and for sourceview:
ghc --make SourceViewTest.hs -o sourceview
SourceViewTest.hs:5:7: Could not find module `Graphics.UI.Gtk.SourceView': Use -v to see a list of the files searched for. make: *** [sourceview] Error 1
Same problem again, but for the sourceview component. ./configure --enable-sourceview Basically you need to install a bunch of -devel fedora packages so that the Haskell bindings can be built. The thing to check is the summary produced at that end of running ./configure Duncan

On Sun, 2008-11-30 at 09:08 +0000, Colin Paul Adams wrote:
Colin> Now make fails with:
Colin> svgcairo/Graphics/Rendering/Cairo/SVG.chs:201:2: Couldn't Colin> match expected type `()' against inferred type `CInt' Colin> Expected type: Render () Inferred type: Render CInt In the
So I tried changing Render () to Render CInt in four places in SVG.chs.
Aye, the cairo C library changed it's API from 1.6 to 1.8. It added an int return type to several functions that previously returned void.
Now it installs OK with 6.8.3, and all the demos run.
I'd have a go at getting it to work with 6.10.1 if I knew what to do. It appears the library structure has changed incompatibly (and ghc didn't even change its version number - that's pretty bad).
The version of ghc did change of course, 6.8 -> 6.10, but perhaps you mean the versions of the libraries? They changed also, to reflect the API changes.
Is there a document anywhere that details the structure changes?
Yes, the ghc-6.10 release notes. Duncan
participants (3)
-
Andy Stewart
-
Colin Paul Adams
-
Duncan Coutts