Never been a fan of GTK myself, but that's because I was a KDE developer I guess :-).<div><br></div><div>Having said that, are there any plans to make it really easy to get gtk2hs working on Mac OS X?</div><div><br></div>
<div>Dave<br><br><div class="gmail_quote">On Fri, Apr 2, 2010 at 6:34 AM, Andy Stewart <span dir="ltr"><<a href="mailto:lazycat.manatee@gmail.com">lazycat.manatee@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Jürgen,<br>
<br>
For GHC-6.12, just darcs version support.<br>
So please download darcs version.<br>
<br>
Axel has working on that make gtk2hs build on cabal.<br>
And i'm working on update All gtk2hs API to Gtk+ 2.18.3 (have finish<br>
99%), i can finish all APIs in later days.<br>
<br>
Axel have finish some sub-modules on <a href="http://www2.in.tum.de/~simona/" target="_blank">http://www2.in.tum.de/~simona/</a><br>
(Note, above cabal packages not include patches i push recently)<br>
<br>
After we finsh work, we can merge gtk2hs into Haskell Platform.<br>
<br>
Because gtk2hs just interface code for low-level C library, so it's<br>
stable enough.<br>
<br>
As recently so much new code push in gtk2hs, perhaps have bug.<br>
So please report any problem on gtk2hs mail-list, we can fix it as soon<br>
as we can.<br>
<br>
-- Haskller GUI lover<br>
<div><div></div><div class="h5"><br>
Jürgen Nicklisch-Franken <<a href="mailto:jnf@arcor.de">jnf@arcor.de</a>> writes:<br>
<br>
> I am in the damned position to have tried to develop a GUI app in<br>
> Haskell. I'm building on top of gtk2hs, now we have a new compiler<br>
> version a new Platform release and no gtk2hs release, so<br>
> I cite from a mail from a potential user/contributor for my GUI app.<br>
> What shall I say, how should he install gtk2hs? Is their a way to get a<br>
> stable version from a changing darcs repo?<br>
> If not all Haskellers were such GUI haters, we would have GUI libs with<br>
> the platform.<br>
><br>
> Jürgen<br>
><br>
> "<br>
> ...<br>
> Each gtk2hs package (like glib-0.10.1) installed in that<br>
> non-standard<br>
> location by Ubuntu apt-get does at least have a package.conf<br>
> file, like<br>
> glib.package.conf. However, on inspection, the "id" fields are<br>
> missing,<br>
> and the "depends" fields look more like .cabal file "depends"<br>
> fields (no<br>
> ABI ID).<br>
><br>
> I tried an experiment on my glib.package.conf, used "ghc<br>
> --abi-hash" to<br>
> generate an ID, so eventually creating a new line something like<br>
><br>
> id: glib-0.10.1-d41d8cd98f00b204e9800998ecf8427e<br>
><br>
> and then set up the "depends" properly by getting the real<br>
> dependencies<br>
> using "ghc-pkg -v list".<br>
><br>
> After doing this then<br>
><br>
> ghc-pkg register glib.package.conf<br>
><br>
> worked just fine, and I see it in my global DB. It's cool that<br>
> this<br>
> works but it seems highly roundabout. :-)<br>
><br>
><br>
> Building gtk2hs from source is broken. Not sure why - I did it<br>
> OK with<br>
> ghc-6.10.3. I can run ./configure no problem with<br>
><br>
> ./configure --with-hcflags=-O0 --disable-split-objs<br>
> --with-ghc=/usr/local/lib/ghc-6.12.1<br>
><br>
> and it claims that it will build:<br>
><br>
> * The following packages will be built:<br>
> *<br>
> * glib : yes<br>
> * gtk : yes<br>
> * gio : yes<br>
> * glade : yes<br>
> * cairo : yes<br>
> * svgcairo : yes<br>
> * gtkglext : no<br>
> * gconf : yes<br>
> * sourceview : no<br>
> * gtksourceview2 : yes<br>
> * mozembed : no<br>
> * soegtk : yes<br>
> * gnomevfs : no<br>
> * gstreamer : yes<br>
> * documentation : no<br>
><br>
> But "make" fails horribly...can't find any packages like "base"<br>
> that<br>
> configure had no problems finding, so I have no idea what the<br>
> problem is<br>
> there. Which is why I'd rather figure out a way to make<br>
> ghc-6.12.1<br>
> recognize the gtk2hs packages that I have in that non-standard<br>
> location.<br>
><br>
> It works but it's awkward. :-)<br>
><br>
> Each gtk2hs package (like glib-0.10.1) installed in that<br>
> non-standard<br>
> location by Ubuntu apt-get does at least have a package.conf<br>
> file, like<br>
> glib.package.conf. However, on inspection, the "id" fields are<br>
> missing,<br>
> and the "depends" fields look more like .cabal file "depends"<br>
> fields (no<br>
> ABI ID).<br>
><br>
> I tried an experiment on my glib.package.conf, used "ghc<br>
> --abi-hash" to<br>
> generate an ID, so eventually creating a new line something like<br>
><br>
> id: glib-0.10.1-d41d8cd98f00b204e9800998ecf8427e<br>
><br>
> and then set up the "depends" properly by getting the real<br>
> dependencies<br>
> using "ghc-pkg -v list".<br>
><br>
> After doing this then<br>
><br>
> ghc-pkg register glib.package.conf<br>
><br>
> worked just fine, and I see it in my global DB. It's cool that<br>
> this<br>
> works but it seems highly roundabout. :-)<br>
><br>
> I think I'll pack it in for the evening. The procedure I<br>
> described works<br>
> well in theory, but apparently if the "depends" field in the<br>
> "package<br>
> conf" files says something like foo-2.0.1.0, it's not OK to use<br>
> an<br>
> existing registered "foo" that has a higher version number...I<br>
> registered everything in gtk2hs manually but when building ltk<br>
> it<br>
> complains with<br>
><br>
> Bad interface<br>
> file: /usr/lib/haskell-packages/ghc6/lib/gtk-0.10.1/imports/Graphics/UI/Gtk.hi<br>
> mismatched interface file versions (wanted "6121", got<br>
> "")<br>
><br>
> Unfortunately when using these package configuration files one<br>
> has to<br>
> use the ABI ID - "ghc-pkg register" won't work otherwise - so<br>
> it's very<br>
> finicky.<br>
><br>
> I'll have to un-register all my gtk2hs packages, and start again<br>
> from<br>
> scratch.<br>
><br>
> Anyway, back to Ubuntu, Haskell and Leksah. :-)<br>
><br>
> I am removing vestiges of ghc-6.10.3 off my Ubuntu system as I<br>
> encounter<br>
> them, although I have no reason to believe that the presence of<br>
> directories and files for that old version are causing me any<br>
> harm. I am<br>
> keeping ghc-6.10.4 around, in parallel with ghc-6.12.1.<br>
><br>
> In any case, to the degree that I have exercised it, ghc-6.12.1<br>
> is<br>
> apparently OK. I have done some "cabal install"s on a few<br>
> executables<br>
> and libraries, both into user and global, and things seem OK as<br>
> evidenced by "ghc-pkg list".<br>
><br>
> Now, to gtk2hs and ltk and Leksah. After having initial problems<br>
> with<br>
> building gtk2hs from source, for reasons I don't want to spend<br>
> time<br>
> investigating (yet), I am returning to the apt package approach,<br>
> command-line this time instead of through the Synaptic GUI.<br>
> Running<br>
><br>
> sudo apt-get install libghc6-gtk-dev<br>
><br>
> partially returns<br>
><br>
> ---------------<br>
> Selecting previously deselected package libghc6-glib-dev.<br>
> (Reading database ... 257458 files and directories currently<br>
> installed.)<br>
> Unpacking libghc6-glib-dev<br>
> (from .../libghc6-glib-dev_0.10.1-1ubuntu2_i386.deb) ...<br>
> Selecting previously deselected package libghc6-cairo-dev.<br>
> Unpacking libghc6-cairo-dev<br>
> (from .../libghc6-cairo-dev_0.10.1-1ubuntu2_i386.deb) ...<br>
> Selecting previously deselected package libghc6-gtk-dev.<br>
> Unpacking libghc6-gtk-dev<br>
> (from .../libghc6-gtk-dev_0.10.1-1ubuntu2_i386.deb) ...<br>
> Setting up libghc6-glib-dev (0.10.1-1ubuntu2) ...<br>
> Reading package info from<br>
> "/usr/lib/haskell-packages/ghc6/lib/glib-0.10.1/glib.package.conf" ...<br>
> done.<br>
> Writing new package config file... done.<br>
><br>
> Setting up libghc6-cairo-dev (0.10.1-1ubuntu2) ...<br>
> Reading package info from<br>
> "/usr/lib/haskell-packages/ghc6/lib/cairo-0.10.1/cairo.package.conf" ...<br>
> done.<br>
> Writing new package config file... done.<br>
><br>
> Setting up libghc6-gtk-dev (0.10.1-1ubuntu2) ...<br>
> Reading package info from<br>
> "/usr/lib/haskell-packages/ghc6/lib/gtk-0.10.1/gtk.package.conf" ...<br>
> done.<br>
> Writing new package config file... done.<br>
> ---------------<br>
><br>
> You'll see the files I was talking about, the *.package.conf<br>
> files. I've<br>
> attached the one for cairo, so you can also see what I was<br>
> talking<br>
> about: these files are real close to the *.conf files in the<br>
> user and<br>
> global package.conf.d databases, but they are missing the "id"<br>
> field,<br>
> and the "depends" field entries are like<br>
><br>
> base-4.1.0.0<br>
><br>
> as opposed to a full<br>
><br>
> base-3.0.3.2-52acef427378232ec569bca0486ee48f<br>
><br>
> In other words, as is, "ghc-pkg register" can't use these files.<br>
> Which<br>
> is why I manually edited them.<br>
><br>
> I still see no reason why my manual approach will not work<br>
> (although<br>
> figuring out how to build from source would be even better), but<br>
> I'll<br>
> have to keep the exact versions specified in these<br>
> *.package.conf files.<br>
><br>
> Much obliged for the tip about using darcs for the gtk2hs build.<br>
> Worked<br>
> like a charm. Combined with that, and doing occasional "cabal<br>
> install"'s<br>
> along the way, I have ltk and haddock-leksah-6.12 now built.<br>
><br>
> I don't consider the 5 or 6 hours I spent on all this (which<br>
> includes<br>
> building ghc-6.12.1 from source) to be wasted; I learned a lot<br>
> more<br>
> about GHC package management.<br>
><br>
> Bit of a snag now with leksah-server (the version in<br>
> leksah-server.cabal<br>
> is 0.8.0.5). I've included the console output of the build.<br>
><br>
> Looking at that very first problem:<br>
><br>
> /home/arved/.cabal/lib/ltk-0.8/ghc-6.12.1/libHSltk-0.8.a(Parameters.o):<br>
> In function `s9Ao_info':<br>
> (.text+0x28b9): undefined reference to<br>
> `gtkzm0zi10zi1_GraphicsziUIziGtkziGeneralziEnums_zdfShowShadowType_closure'<br>
><br>
> I can sort of parse this. I see code concerning ShadowType in<br>
> ltk/Graphics.UI.Editor.Parameters.hs, and I can see that a<br>
> complaint is<br>
> being made about something related to ShadowType not being found<br>
> (I<br>
> believe) in gtk/Graphics.UI.Gtk.General.Enums.<br>
><br>
> With the<br>
><br>
> {-- #if MIN_VERSION_gtk(0,9,13)<br>
> -- now defined in gtk<br>
> #else<br>
> instance Show ShadowType<br>
> where show _ = "Any Shadow"<br>
> #endif<br>
> --}<br>
><br>
> in Parameters.hs, and seeing as how gtk is 0.10.1, I would<br>
> expect us to<br>
> be using gtk code to provide that Show instance for ShadowType,<br>
> no?<br>
><br>
> Any ideas?<br>
> ...<br>
> "<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br></div>