
(I am posting this to Cafe and Gtk2Hs Users; if you subscribe to both, please reply to Cafe; but I will see your replies either place; thanks much.) I am trying to compile the Gtk2Hs demo program GladeTest.hs (located in the ...\demo\glade dir), under MS Windows XP. The error I get is: H:\proc\tools\Gtk2Hs\demo\glade>ghc --make GladeTest.hs GladeTest.hs:4:7: Could not find module `Graphics.UI.Gtk.Glade': (--Note:-- I am using H: instead of C: for reasons described later.) I did these okay: cabal install cabal-install cabal update cabal install gtk2hs-buildtools cabal install gtk and I can compile and run some other Gtk2Hs demos (that do not use Glade) okay. In general, I am assuming that I need to "cabal install foo" when Haskell module foo cannot be found during compile. (Please correct me if I am wrong.) I get an error during the glade install: H:\proc\dev\cmd>cabal install glade ... Configuring glade-0.11.1... setup.exe: The pkg-config package libglade-2.0 version >=2.0.0 is required but it could not be found. ... (the full output is listed below) I think I have package libglade-2.0 installed, because I installed the GTK+ and Glade bundle from: http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/glade3-3.6.7-with-G... at: http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/ at: http://glade.gnome.org/ That install created tree: H:\proc\tools\Gtk+\ which includes these: H:\proc\tools\Gtk+\include\libglade-2.0\ and H:\proc\tools\Gtk+\glade-3.exe H:\proc\tools\Gtk+\bin\libglade-2.0-0.dll H:\proc\tools\Gtk+\lib\libglade-2.0.a H:\proc\tools\Gtk+\lib\pkgconfig\libglade-2.0.pc So, I'm thinking maybe my install of Gtk+ (just running glade3-3.6.7-with-GTK+.exe) was lacking somehow, or cabal somehow doesn't see my Gtk+ dir (during "cabal install glade") ? So, I tried editing my cabal config so it would see my Gtk+ tree. I uncommented and edited these lines in the main, un-indented section: extra-include-dirs: H:\proc\tools\Gtk+\include extra-lib-dirs: H:\proc\tools\Gtk+\lib but it doesn't seem to help. (my full cabal config listing is below) Regarding my use of H: instead of C:, I have a non-standard configuration of the Haskell Platform and cabal. I need to develop (Haskell code that uses Gtk2Hs, Glade, etc.) in a MS Windows network, from any of several PCs (one at a time), each of which uses a common tools tree. So, instead of installing the Haskell Platform, cabal, Gtk+, etc. to C:, I have installed them to a network drive (H:). So, I have: H:\proc\tools\Haskell Platform H:\proc\tools\Gtk+ H:\proc\tools\cabal etc. Any help or pointers would be appreciated. Thanks very much, -- Peter --- Following is various config and output info --- My PATH is: ++++++++++++++ SET P_TOOLS=H:\proc\tools SET HASK_PLAT=%P_TOOLS%\Haskell Platform\2010.1.0.0 PATH %HASK_PLAT%\bin; %P_TOOLS%\cabal\bin; %P_TOOLS%\gtk\bin; %HASK_PLAT%\lib\extralibs\bin; %HASK_PLAT%\mingw\bin ++++++++++++++ Some of my environment vars are: ============== REM This is so Cabal will get its config from the Haskell Platform, REM rather than C:\Documents and Settings\pschmitz\Application Data\cabal SET CABAL_CONFIG=%P_TOOLS%\cabal\config CABAL_CONFIG=H:\proc\tools\cabal\config PKG_CONFIG_PATH=H:\proc\tools\Gtk+\lib\pkgconfig GTK_HOME=\\fbpxfile01\users$\pschmitz\proc\tools\Gtk+ HASK_PLAT=H:\proc\tools\Haskell Platform\2010.1.0.0 INCLUDE=\\fbpxfile01\users$\pschmitz\proc\tools\Gtk+\include LIB=\\fbpxfile01\users$\pschmitz\proc\tools\Gtk+\lib Path=H:\proc\tools\Haskell Platform\2010.1.0.0\bin;H:\proc\tools\cabal\bin;H:\proc\tools\Gtk+\bin; H:\proc\tools\Haskell Platform\2010.1.0.0\lib\extralibs\bin;H:\proc\tools\Haskell Platform\2010.1. 0.0\mingw\bin; ============== The full output from "cabal install glade" is: ----------------------------- H:\proc\dev\cmd>cabal --version cabal-install version 0.8.2 using version 1.8.0.2 of the Cabal library H:\proc\dev\cmd>cabal list glade * glade Synopsis: Binding to the glade library. Latest version available: 0.11.1 Latest version installed: [ Not installed ] Homepage: http://www.haskell.org/gtk2hs/ License: LGPL-2.1 ... H:\proc\dev\cmd>cabal info glade * glade (library) Synopsis: Binding to the glade library. Latest version available: 0.11.1 Latest version installed: [ Not installed ] Homepage: http://www.haskell.org/gtk2hs/ Bug reports: http://hackage.haskell.org/trac/gtk2hs/ Description: This library allows to load externally stored user interfaces into programs. This allows alteration of the interface without recompilation of the program. Category: Graphics License: LGPL-2.1 Author: Manuel M T Chakravarty Maintainer: gtk2hs-users@sourceforge.net Source repo: http://code.haskell.org/glade/ Dependencies: base >=4 && <5, array -any, containers -any, haskell98 -any, mtl -any, glib >=0.11 && <0.12, pango >=0.11 && <0.12, cairo >=0.11 && <0.12, gtk >=0.11 && <0.12 Cached: Yes Modules: Graphics.UI.Gtk.Glade H:\proc\dev\cmd>cabal install glade Resolving dependencies... C:\DOCUME~1\pschmitz\LOCALS~1\Temp\glade-0.11.13100\glade-0.11.1\Gtk2HsSetup.hs:25: 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:\DOCUME~1\pschmitz\LOCALS~1\Temp\glade-0.11.13100\glade-0.11.1\Gtk2HsSetup.hs, C:\DOCUME~1\pschmitz\LOCALS~1\Temp\glade-0.11.13100\glade-0.11.1\dist\setup\Gtk2HsSetup.o ) [2 of 2] Compiling Main ( C:\DOCUME~1\pschmitz\LOCALS~1\Temp\glade-0.11.13100\glade-0.11.1\Setup.hs, C:\DOCUME~1\pschmitz\LOCALS~1\Temp\glade-0.11.13100\glade-0.11.1\dist\setup\Main.o ) Linking C:\DOCUME~1\pschmitz\LOCALS~1\Temp\glade-0.11.13100\glade-0.11.1\dist\setup\setup.exe ... Configuring glade-0.11.1... setup.exe: The pkg-config package libglade-2.0 version >=2.0.0 is required but it could not be found. cabal: Error: some packages failed to install: glade-0.11.1 failed during the configure step. The exception was: ExitFailure 1 ----------------------------- My complete Cabal config follows. The email may alter the indentation, but I was careful to maintain the original indentation when editing. -- ---------------------------------------------------------------------------------------------- -- This is the configuration file for the 'cabal' command line tool. -- The available configuration options are listed below. -- Some of them have default values listed. -- Lines (like this one) beginning with '--' are comments. -- Be careful with spaces and indentation because they are -- used to indicate layout for nested sections. remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive remote-repo-cache: H:\proc\tools\cabal\packages -- local-repo: -- verbose: 1 -- compiler: ghc -- with-compiler: -- with-hc-pkg: -- scratchdir: -- program-prefix: -- program-suffix: -- library-vanilla: True -- library-profiling: False -- shared: False -- executable-profiling: False -- optimization: True -- library-for-ghci: True -- split-objs: False -- executable-stripping: True -- user-install: True -- package-db: -- flags: -- -- -------------------------------- -- extra-include-dirs: -- extra-lib-dirs: extra-include-dirs: H:\proc\tools\Gtk+\include extra-lib-dirs: H:\proc\tools\Gtk+\lib -- -------------------------------- -- -- constraint: -- cabal-lib-version: -- preference: -- documentation: False -- doc-index-file: $datadir\doc\index.html -- root-cmd: -- symlink-bindir: build-summary: H:\proc\tools\cabal\logs\build.log -- build-log: remote-build-reporting: anonymous -- username: -- password: install-dirs user prefix: "H:\\proc\\tools\\cabal" -- bindir: $prefix\bin -- libdir: $prefix -- libsubdir: $pkgid\$compiler -- libexecdir: $prefix\$pkgid datadir: "H:\\proc\\tools\\Haskell Platform\\2010.1.0.0" -- datasubdir: $pkgid -- docdir: $prefix\doc\$pkgid -- htmldir: $docdir\html -- haddockdir: $htmldir install-dirs global prefix: "H:\\proc\\tools\\Haskell Platform\\2010.1.0.0" -- bindir: $prefix\bin -- libdir: $prefix -- libsubdir: $pkgid\$compiler -- libexecdir: $prefix\$pkgid datadir: "H:\\proc\\tools\\Haskell Platform\\2010.1.0.0" -- datasubdir: $pkgid -- docdir: $prefix\doc\$pkgid -- htmldir: $docdir\html -- haddockdir: $htmldir -- ---------------------------------------------------------------------------------------------- -- end of post: Trying to compile Glade Gtk2Hs demo / cabal install glade problem --