Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Haskell
Wiki community
Recent changes
Random page
HaskellWiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Gtk2Hs/Mac
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Detailed instructions === This explains how to install Gtk2Hs-0.10.1 on Mac OS X 10.6 Snow Leopard, in combination with GTK+ from MacPorts. * Install the [http://hackage.haskell.org/platform/ Haskell Platform] for Mac * Download gtk2hs from [http://www.haskell.org/gtk2hs/ Gtk2Hs website] and untar it. * Install gtk, cairo, etc. from MacPorts like this (note that the <tt>+universal</tt> is needed; if you already installed gtk or one of its dependencies, it is recommended you reinstall those as detailed in the NB at the end of this section). <pre>sudo port install gtk +universal</pre> * Go to the directory where gtk2hs is untarred and run <pre>./configure --disable-split-objs --disable-gio make sudo make install</pre> Alternatively, if you wish to follow the Mac OS X style of directory layout, you can use this configure command instead: <pre>./configure --with-pkgconf=/Users/$USER/.ghc/i386-darwin-6.10.4/package.conf --prefix=/Users/$USER/Library/Haskell/packages/gtk2hs --disable-split-objs --disable-gio</pre> Right now you should be able to run the demos. Unfortunately, to build any libraries depending on Gtk2Hs, such as [http://hackage.haskell.org/package/Chart/ Chart], you need to edit one more file. You will need to find <tt>package.conf</tt> for your installed GHC by running <pre>ghc-pkg list</pre> In the output you will see the full directory to your <tt>package.conf</tt> file. In this file, you need to search for "gthread", and everywhere you can find it, add <tt>"/opt/local/lib"</tt> (with quotes) to the <tt>libraryDirs</tt> array before it. If all went well, it should be properly installed now. NB: If compiling fails with architecture errors for certain dynlibs, you need to reinstall the packages these dynlibs belong to with <tt>+universal</tt> by doing <pre>sudo port upgrade packagename --enforce-variants +universal</pre> Alternatively, and this is recommended, you can follow the steps on [http://passingcuriosity.com/2009/haskell-on-snow-leopard/ Haskell On Snow Leopard Blogpost] to immediately add the universal variant of each package: # Edit <tt>/opt/local/macports/variants.conf</tt> and add <tt>+universal</tt> to the end of this file # sudo port selfupdate # sudo port sync # sudo port upgrade --force installed
Summary:
Please note that all contributions to HaskellWiki are considered to be released under simple permissive license (see
HaskellWiki:Copyrights
for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
DO NOT SUBMIT COPYRIGHTED WORK WITHOUT PERMISSION!
Cancel
Editing help
(opens in new window)
Toggle limited content width