
Hey Haskell-Cafe, I would like to run GTK2HS on my Mac 10.6.8 but after the successful installation with Homebrew of all modules (GTK+, GTK2HS) I get this failure message: Prelude> :l guitest.hs guitest.hs:1:8: Could not find module `Graphics.UI.Gtk': Use -v to see a list of the files searched for. Failed, modules loaded: none. I always changed my PATH. This is the content of my PATH: /usr/bin /bin /usr/sbin /sbin /usr/local/bin /Developer/usr/bin /Users/tanjapiechnick/.cabal/bin $HOME/.cabal/bin Is that correct? Where is the mistake? Thank you for any help! Greetings from Namibia

On 7 June 2012 03:01, Tanja Piechnick
Hey Haskell-Cafe,
I would like to run GTK2HS on my Mac 10.6.8 but after the successful installation with Homebrew of all modules (GTK+, GTK2HS) I get this failure message:
Prelude> :l guitest.hs
guitest.hs:1:8: Could not find module `Graphics.UI.Gtk': Use -v to see a list of the files searched for. Failed, modules loaded: none.
Just to confirm for us, as the same user can you please run the following: ghc-pkg list gtk As well as: ghc-pkg check
I always changed my PATH. This is the content of my PATH:
/usr/bin /bin /usr/sbin /sbin /usr/local/bin /Developer/usr/bin /Users/tanjapiechnick/.cabal/bin $HOME/.cabal/bin
I don't think this is a PATH problem; possibly a problem with library paths.
Is that correct? Where is the mistake?
Thank you for any help! Greetings from Namibia
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

Also: if you have only very recently built gtk etc via mac homebrew, you need to build the head version of gtk2hs and family. (there was a header file / api change at some point regarding gtk, and only the darcs HEAD version of gtk2hs et al has been updated to reflect that.) On Wed, Jun 6, 2012 at 6:27 PM, Ivan Lazar Miljenovic < ivan.miljenovic@gmail.com> wrote:
On 7 June 2012 03:01, Tanja Piechnick
wrote: Hey Haskell-Cafe,
I would like to run GTK2HS on my Mac 10.6.8 but after the successful installation with Homebrew of all modules (GTK+, GTK2HS) I get this failure message:
Prelude> :l guitest.hs
guitest.hs:1:8: Could not find module `Graphics.UI.Gtk': Use -v to see a list of the files searched for. Failed, modules loaded: none.
Just to confirm for us, as the same user can you please run the following:
ghc-pkg list gtk
As well as:
ghc-pkg check
I always changed my PATH. This is the content of my PATH:
/usr/bin /bin /usr/sbin /sbin /usr/local/bin /Developer/usr/bin /Users/tanjapiechnick/.cabal/bin $HOME/.cabal/bin
I don't think this is a PATH problem; possibly a problem with library paths.
Is that correct? Where is the mistake?
Thank you for any help! Greetings from Namibia
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Thank you for your response. If I execute "ghc-pkg list gtk" I receive this output:
ghc-pkg list gtk /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d /Users/tanjapiechnick/.ghc/i386-darwin-7.0.4/package.conf.d
But "ghc-pkg check" gives me no results
ghc-pkg check
Is this the issue?
if you have only very recently built gtk etc via mac homebrew, you need to build the head version of gtk2hs and family
Ok, and where can I get these informations? Am 07.06.2012 um 02:42 schrieb Carter Schonwald:
Also: if you have only very recently built gtk etc via mac homebrew, you need to build the head version of gtk2hs and family. (there was a header file / api change at some point regarding gtk, and only the darcs HEAD version of gtk2hs et al has been updated to reflect that.)
On Wed, Jun 6, 2012 at 6:27 PM, Ivan Lazar Miljenovic
wrote: On 7 June 2012 03:01, Tanja Piechnick wrote: Hey Haskell-Cafe,
I would like to run GTK2HS on my Mac 10.6.8 but after the successful installation with Homebrew of all modules (GTK+, GTK2HS) I get this failure message:
Prelude> :l guitest.hs
guitest.hs:1:8: Could not find module `Graphics.UI.Gtk': Use -v to see a list of the files searched for. Failed, modules loaded: none.
Just to confirm for us, as the same user can you please run the following:
ghc-pkg list gtk
As well as:
ghc-pkg check
I always changed my PATH. This is the content of my PATH:
/usr/bin /bin /usr/sbin /sbin /usr/local/bin /Developer/usr/bin /Users/tanjapiechnick/.cabal/bin $HOME/.cabal/bin
I don't think this is a PATH problem; possibly a problem with library paths.
Is that correct? Where is the mistake?
Thank you for any help! Greetings from Namibia
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

On 7 June 2012 18:09, Tanja Piechnick
Thank you for your response.
If I execute "ghc-pkg list gtk" I receive this output:
ghc-pkg list gtk /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d /Users/tanjapiechnick/.ghc/i386-darwin-7.0.4/package.conf.d
This means that you in fact _don't_ have the Haskell gtk package installed (in the sense that GHC knows about it), which is why you can't use it.
But "ghc-pkg check" gives me no results
No, this in fact is good: it means that you don't have a problem with your Haskell libraries.
if you have only very recently built gtk etc via mac homebrew, you need to build the head version of gtk2hs and family
Ok, and where can I get these informations?
I'm not too sure about this; Carter can hopefully tell you more about this (specifically which packages need to be built from HEAD, etc.). But you're going to want to use the darcs repository at http://code.haskell.org/gtk2hs/ . -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

All right. After a re-installation I could load my GTK2HS example successfully. But I received another error. What is the meaning of that? A wrong architecture? Prelude> :l guitest.hs [1 of 1] Compiling Main ( guitest.hs, interpreted ) Ok, modules loaded: Main. *Main> main Loading package transformers-0.2.2.0 ... linking ... done. Loading package mtl-2.0.1.0 ... linking ... done. Loading package array-0.3.0.2 ... linking ... done. Loading package containers-0.4.0.0 ... linking ... done. Loading package bytestring-0.9.1.10 ... linking ... done. Loading package cairo-0.12.3.1 ... linking ... done. Loading package glib-0.12.3.1 ... can't load .so/.DLL for: intl (dlopen(/usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib, 9): no suitable image found. Did find: /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib: mach-o, but wrong architecture) *Main> This is the Content of guitest.hs import Graphics.UI.Gtk main :: IO () main = do initGUI window <- windowNew button <- buttonNew set window [ containerBorderWidth := 10, containerChild := button ] set button [ buttonLabel := "Hello World" ] onClicked button (putStrLn "Hello World") onDestroy window mainQuit widgetShowAll window mainGUI Thank you for any help ! Am 07.06.2012 um 09:40 schrieb Ivan Lazar Miljenovic:
On 7 June 2012 18:09, Tanja Piechnick
wrote: Thank you for your response.
If I execute "ghc-pkg list gtk" I receive this output:
ghc-pkg list gtk /usr/local/Cellar/ghc/7.0.4/lib/ghc-7.0.4/package.conf.d /Users/tanjapiechnick/.ghc/i386-darwin-7.0.4/package.conf.d
This means that you in fact _don't_ have the Haskell gtk package installed (in the sense that GHC knows about it), which is why you can't use it.
But "ghc-pkg check" gives me no results
No, this in fact is good: it means that you don't have a problem with your Haskell libraries.
if you have only very recently built gtk etc via mac homebrew, you need to build the head version of gtk2hs and family
Ok, and where can I get these informations?
I'm not too sure about this; Carter can hopefully tell you more about this (specifically which packages need to be built from HEAD, etc.). But you're going to want to use the darcs repository at http://code.haskell.org/gtk2hs/ .
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

Tanja Piechnick wrote:
All right. After a re-installation I could load my GTK2HS example successfully. But I received another error. What is the meaning of that?
A wrong architecture?
Prelude> :l guitest.hs [1 of 1] Compiling Main ( guitest.hs, interpreted ) Ok, modules loaded: Main. *Main> main Loading package transformers-0.2.2.0 ... linking ... done. Loading package mtl-2.0.1.0 ... linking ... done. Loading package array-0.3.0.2 ... linking ... done. Loading package containers-0.4.0.0 ... linking ... done. Loading package bytestring-0.9.1.10 ... linking ... done. Loading package cairo-0.12.3.1 ... linking ... done. Loading package glib-0.12.3.1 ... can't load .so/.DLL for: intl (dlopen(/usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib, 9): no suitable image found. Did find: /usr/local/Cellar/gettext/0.18.1.1/lib/libintl.dylib: mach-o, but wrong architecture) *Main>
That's a 64bit / 32bit problem. The gtk library you installed via homebrew is probably 64bit while the GHC you use (7.0.4) seems to be 32bit. Either you reinstall GTK with 32bit support, or you use the 64bit version of the recently released Haskell Platform. Best regards, Heinrich Apfelmus -- http://apfelmus.nfshost.com

On Thu, Jun 7, 2012 at 8:40 AM, Heinrich Apfelmus wrote: Tanja Piechnick wrote: Loading package glib-0.12.3.1 ... can't load .so/.DLL for: intl
(dlopen(/usr/local/Cellar/**gettext/0.18.1.1/lib/libintl.**dylibhttp://0.18.1.1/lib/libintl.dylib,
9): no suitable image found. Did find:
/usr/local/Cellar/gettext/0.**18.1.1/lib/libintl.dylibhttp://0.18.1.1/lib/libintl.dylib:
mach-o, but wrong architecture)
*Main> That's a 64bit / 32bit problem. The gtk library you installed via homebrew
is probably 64bit while the GHC you use (7.0.4) seems to be 32bit. Either
you reinstall GTK with 32bit support, or you use the 64bit version of the
recently released Haskell Platform. The 7.0.4 HP package strongly suggested use of the 32-bit package even on
64-bit systems, so this is very likely.
--
brandon s allbery allbery.b@gmail.com
wandering unix systems administrator (available) (412) 475-9364 vm/sms

Thats almost certainly what happened.
(and that HP detail even had an unfortunate effect of having the
machomebrew install defaults for ghc & haskell-platform default to 32bit
rather than 64bit for a while, though that was recently corrected)
On Thu, Jun 7, 2012 at 9:05 AM, Brandon Allbery
On Thu, Jun 7, 2012 at 8:40 AM, Heinrich Apfelmus < apfelmus@quantentunnel.de> wrote:
Tanja Piechnick wrote:
Loading package glib-0.12.3.1 ... can't load .so/.DLL for: intl (dlopen(/usr/local/Cellar/**gettext/0.18.1.1/lib/libintl.**dylibhttp://0.18.1.1/lib/libintl.dylib, 9): no suitable image found. Did find: /usr/local/Cellar/gettext/0.**18.1.1/lib/libintl.dylibhttp://0.18.1.1/lib/libintl.dylib: mach-o, but wrong architecture) *Main>
That's a 64bit / 32bit problem. The gtk library you installed via homebrew is probably 64bit while the GHC you use (7.0.4) seems to be 32bit. Either you reinstall GTK with 32bit support, or you use the 64bit version of the recently released Haskell Platform.
The 7.0.4 HP package strongly suggested use of the 32-bit package even on 64-bit systems, so this is very likely.
-- brandon s allbery allbery.b@gmail.com wandering unix systems administrator (available) (412) 475-9364 vm/sms
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (5)
-
Brandon Allbery
-
Carter Schonwald
-
Heinrich Apfelmus
-
Ivan Lazar Miljenovic
-
Tanja Piechnick