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