[Haskell-beginners] Getting Gtk2Hs working in windows

Kyle Murphy orclev at gmail.com
Sat Mar 19 01:18:34 CET 2011


Yes, I read the thread you made. Working on a hunch I downloaded the Gtk+
all in one bundle and installed it but used all the environment variables
defined by the glade installer (I just changed GTK_HOME to the newly
downloaded all in one bundle and updated the other variables as needed).
This seems to have fixed the libraries not being found, but it now looks
like I'm being bitten by another issue entirely. I'm getting the following
error:
Registering cairo-0.12.0...
Installing library in
C:\Users\Kyle\AppData\Roaming\cabal\cairo-0.12.0\ghc-7.0.2
Registering cairo-0.12.0...
setup.exe: internal error: unexpected package db stack: [UserPackageDB]

What's weird is that I found a ticket for cabal that's similar to this one (
http://hackage.haskell.org/trac/hackage/ticket/731) but it's specifically in
the case of using a custom package db which I don't think I'm doing (unless
the gtk package is doing something really weird). Maybe this is a more
general issue with the latest version of Cabal? Just in case the output from
running cabal --version:

cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library

I'm going to keep experimenting and hopefully find a way to get this all
working.

-R. Kyle Murphy
--
Curiosity was framed, Ignorance killed the cat.


On Fri, Mar 18, 2011 at 19:23, aditya siram <aditya.siram at gmail.com> wrote:

> Hi Kyle,
> I ran into this exact issue and fixed it on my Windows box at work but
> I forgot how. I won't be back there till Monday, can I get back to you
> then?
>
> If this is still an issue could send me email on Monday morning to remind
> me?
>
> thanks...
> -deech
>
> On Fri, Mar 18, 2011 at 5:49 PM, Kyle Murphy <orclev at gmail.com> wrote:
> > I'm trying to follow the instructions provided on
> > http://www.haskell.org/haskellwiki/Gtk2Hs to install Gtk2Hs in Windows 7
> (64
> > bit) and running into problems.
> > Originally I was trying to get wxHaskell installed, but it kept crashing
> > trying to build the monolithic library due to an apparent bug in the
> latest
> > port of GCC, so after talking with some of the people in #haskell I was
> > advised that Gtk2Hs was better supported and might be easier to get
> working.
> > For the most part, that appears to be true but I (as well as several
> others
> > it seems) am running into a problem where cabal can't seem to find quite
> a
> > few of the Gtk+ libraries (specifically z, cairo, gobject, glib, and
> intl).
> > Near as I can tell everything should be functioning, and running
> pkg-config
> > --modversion glib-2.0 outputs "2.20.3" so at least pkg-config seems to be
> > able to find glib. Looking in the Gtk+\lib\pkgconfig folder I see pc
> files
> > for everything but z and intl listed. Running cabal install
> > gtk2hs-buildtools also succeeds, it's only when I get to the cabal
> install
> > gtk step that things fail.
> >
> > cmd console output for the usual environment variables:
> >
> > INCLUDE: C:\libxml\include;C:\Program Files (x86)\Gtk+\include
> > LIB: C:\libxml\lib;C:\Program Files (x86)\Gtk+\lib
> > PKG_CONFIG_PATH: C:\libxml\lib\pkgconfig;C:\Program Files
> > (x86)\Gtk+\lib\pkgconfig
> >
> > I trimmed the PATH output below for everyones sanity. The vast majority
> was
> > stuff in the Windows folder or one of dozens of entries dumped in there
> by
> > some version or other of Java.
> >
> > PATH:
> > C:\Program Files (x86)\Haskell\bin;
> > C:\Program Files (x86)\Haskell Platform\2011.2.0.0\lib\extralibs\bin;
> > C:\Program Files (x86)\Haskell Platform\2011.2.0.0\bin;
> > C:\MinGW\bin;
> > C:\Users\Kyle\AppData\Roaming\cabal\bin;
> > C:\Program Files (x86)\Haskell\bin;
> > C:\Program Files (x86)\Gtk+\bin
> >
> > The exact error I'm getting when building is the following:
> > C:\Users\Kyle>cabal install gtk
> > Warning: The package list for 'hackage.haskell.org' is 23 days old.
> > Run 'cabal update' to get the latest list of available packages.
> > Resolving dependencies...
> >
> C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\Gtk2HsSetup.hs:25:2:
> > warning: #warning Setup.hs is guessing the version of Cabal. If
> > compilationof Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal
> version
> > 1.x.0 when building (prefixed by --ghc-option= when using the 'cabal'
> > command)
> > [1 of 2] Compiling Gtk2HsSetup      (
> >
> C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\Gtk2HsSetup.hs,
> >
> C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\dist\setup\Gtk2HsSetup.o
> > )
> > [2 of 2] Compiling Main             (
> > C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\Setup.hs,
> >
> C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\dist\setup\Main.o
> > )
> > Linking
> >
> C:\Users\Kyle\AppData\Local\Temp\cairo-0.12.05760\cairo-0.12.0\dist\setup\setup.exe
> > ...
> > Configuring cairo-0.12.0...
> > setup.exe: Missing dependencies on foreign libraries:
> > * Missing C libraries: z, cairo
> > This problem can usually be solved by installing the system packages that
> > provide these libraries (you may need the "-dev" versions). If the
> libraries
> > are already installed but in a non-standard location then you can use the
> > flags --extra-include-dirs= and --extra-lib-dirs= to specify where they
> are.
> >
> C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\Gtk2HsSetup.hs:25:2:
> > warning: #warning Setup.hs is guessing the version of Cabal. If
> compilation
> > of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0
> when
> > building (prefixed by --ghc-option= when using the 'cabal' command)
> > [1 of 2] Compiling Gtk2HsSetup      (
> >
> C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\Gtk2HsSetup.hs,
> >
> C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\dist\setup\Gtk2HsSetup.o
> > )
> > [2 of 2] Compiling Main             (
> > C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\Setup.hs,
> >
> C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\dist\setup\Main.o
> > )
> > Linking
> > C:\Users\Kyle\AppData\Local\Temp\glib-0.12.05760\glib-0.12.0\dist\setup\
> > setup.exe ...
> > Configuring glib-0.12.0...
> > setup.exe: Missing dependencies on foreign libraries:
> > * Missing C libraries: gobject-2.0, glib-2.0, intl
> > This problem can usually be solved by installing the system packages that
> > provide these libraries (you may need the "-dev" versions). If the
> libraries
> > are already installed but in a non-standard location then you can use the
> > flags --extra-include-dirs= and --extra-lib-dirs= to specify where they
> are.
> > cabal: permission denied
> >
> >
> > -R. Kyle Murphy
> > --
> > Curiosity was framed, Ignorance killed the cat.
> >
> > _______________________________________________
> > Beginners mailing list
> > Beginners at haskell.org
> > http://www.haskell.org/mailman/listinfo/beginners
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110318/0fbbd601/attachment.htm>


More information about the Beginners mailing list