taiq wu | 16 Apr 11:12 2011
Picon

Did anyone manage to build glade hackage-package on Windows

Hi everyone,
 
I installed and tested gtk2hs successfully on a Windows 7 machine. Where I'm stucking is the glade/libglade thing.
And it is installed in D:\prgs\Gtk+
But when running the cabal-configure step it halts with the oh so familiar:
 
C:\Users\Administrator>cabal install glade --extra-lib-dirs=D:\prgs\Gtk+\lib --extra-include-dirs=D:\prgs\Gtk+\include
 
Linking C:\Users\ADMINI~1\AppData\Local\Temp\glade-0.12.03828\glade-0.12.0\dist\
setup\setup.exe ...
Configuring glade-0.12.0...
setup.exe: Missing dependencies on foreign libraries:
* Missing C libraries: glade-2.0, gtk-win32-2.0, xml2, gdk-win32-2.0, atk-1.0,
gio-2.0, gdk_pixbuf-2.0, pangowin32-1.0, gdi32, pangocairo-1.0, pango-1.0,
cairo, gobject-2.0, gmodule-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: Error: some packages failed to install:
glade-0.12.0 failed during the configure step. The exception was:
ExitFailure 1
 
And my pkg-config output:
C:\Users\Administrator>pkg-config --cflags --libs gtk+-2.0 libglade-2.0
-mms-bitfields Files/Haskell Platform/2011.2.0.0/mingw/include/libxml2 -ID:/prgs
/Gtk+/include/gtk-2.0 -ID:/prgs/Gtk+/lib/gtk-2.0/include -ID:/prgs/Gtk+/include/
atk-1.0 -ID:/prgs/Gtk+/include/cairo -ID:/prgs/Gtk+/include/pango-1.0 -ID:/prgs/
Gtk+/include/glib-2.0 -ID:/prgs/Gtk+/lib/glib-2.0/include -ID:/prgs/Gtk+/include
/libpng12 -ID:/prgs/Gtk+/include/libglade-2.0 -ID:/Program  Files/Haskell Platfo
rm/2011.2.0.0/mingw/lib -LD:/prgs/Gtk+/lib -LD:/Program -lglade-2.0 -lgtk-win32-
2.0 -lxml2 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0
 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib
-2.0 -lintl
 
 
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Gtk2hs-users mailing list
Gtk2hs-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
Axel Simon | 16 Apr 11:42 2011
Picon

Re: Did anyone manage to build glade hackage-package on Windows

Hi,

On 16.04.2011, at 11:12, taiq wu wrote:

> Hi everyone,
>
> I installed and tested gtk2hs successfully on a Windows 7 machine.  
> Where I'm stucking is the glade/libglade thing.
> I took the version from http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/glade3-3.6.7-with-GTK+.exe
> And it is installed in D:\prgs\Gtk+
> But when running the cabal-configure step it halts with the oh so  
> familiar:
>
> C:\Users\Administrator>cabal install glade --extra-lib-dirs=D:\prgs 
> \Gtk+\lib --extra-include-dirs=D:\prgs\Gtk+\include

You shouldn't be needing these extra flags. It's probably not very  
clever of cabal to suggest that you pass these flags if a library  
cannot be found since these are all libraries whose locations can be  
queried using pkg-config. If pkg-config doesn't work, it's unlikely  
that you get all the flags right that pkg-config would output.
>
> Linking C:\Users\ADMINI~1\AppData\Local\Temp 
> \glade-0.12.03828\glade-0.12.0\dist\
> setup\setup.exe ...
> Configuring glade-0.12.0...
> setup.exe: Missing dependencies on foreign libraries:
> * Missing C libraries: glade-2.0, gtk-win32-2.0, xml2, gdk- 
> win32-2.0, atk-1.0,
> gio-2.0, gdk_pixbuf-2.0, pangowin32-1.0, gdi32, pangocairo-1.0,  
> pango-1.0,
> cairo, gobject-2.0, gmodule-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: Error: some packages failed to install:
> glade-0.12.0 failed during the configure step. The exception was:
> ExitFailure 1

I'm a bit puzzled here as to the set of C libraries that pkg-config is  
trying to find here. There's no glade-2.0 on my machine, only a  
libglade-2.0. I've never heard of gtk-1.0, the first version is not  
needed and I think is called gtk. Instead gtk+-2.0 is missing.
Could you look at the glade.cabal file, maybe we've messed that up  
somehow? We've separated out the glade module in order to focus on the  
main packages, although I thought that it built alright when we did  
that.

>
> And my pkg-config output:
> C:\Users\Administrator>pkg-config --cflags --libs gtk+-2.0  
> libglade-2.0
> -mms-bitfields Files/Haskell Platform/2011.2.0.0/mingw/include/libxml2

Why is libxml2 it installed in a path with a space? That could be  
problematic.

Cheers,
Axel

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
Daniel Kahlenberg | 16 Apr 15:18 2011

Re: Did anyone manage to build glade hackage-package on Windows

I took exactly the steps described here:
http://www.haskell.org/haskellwiki/Gtk2Hs#Windows_7_32_bit

but took
http://ftp.acc.umu.se/pub/GNOME/binaries/win32/gtk+/2.22/gtk+-bundle_2.22.1-20101227_win32
version, see here:
> http://article.gmane.org/gmane.comp.lang.haskell.cafe/88022
how I did. Before patching Gtk2HsSetup.hs files you need a cabal unpack
package though.

Yes and you should really take care to have the pkg-config stuff
(PKG_CONFIG_PATH) set up correctly as shown in the Wiki and to have no
conflicting entries in PKG-CONFIG-PATH variable.

Hth
Daniel

P.S.
Another side effect can be caused by multiple gtk*.dll or zlib1.dll
versions somewhere in the systems or users search PATH. You might use
dependency-walker (depends.exe) to fiddle out from where dlls are
actually loaded, in case you experience problems, its easy).

On 16.04.2011 11:12, taiq wu wrote:
> Hi everyone,
>  
> I installed and tested gtk2hs successfully on a Windows 7 machine. Where
> I'm stucking is the glade/libglade thing.
> I took the version from
> http://ftp.gnome.org/pub/GNOME/binaries/win32/glade3/3.6/glade3-3.6.7-with-GTK+.exe
> And it is installed in D:\prgs\Gtk+
> But when running the cabal-configure step it halts with the oh so familiar:
>  
> C:\Users\Administrator>cabal install glade
> --extra-lib-dirs=D:\prgs\Gtk+\lib --extra-include-dirs=D:\prgs\Gtk+\include
>  
> Linking
> C:\Users\ADMINI~1\AppData\Local\Temp\glade-0.12.03828\glade-0.12.0\dist\
> setup\setup.exe ...
> Configuring glade-0.12.0...
> setup.exe: Missing dependencies on foreign libraries:
> * Missing C libraries: glade-2.0, gtk-win32-2.0, xml2, gdk-win32-2.0,
> atk-1.0,
> gio-2.0, gdk_pixbuf-2.0, pangowin32-1.0, gdi32, pangocairo-1.0, pango-1.0,
> cairo, gobject-2.0, gmodule-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: Error: some packages failed to install:
> glade-0.12.0 failed during the configure step. The exception was:
> ExitFailure 1
>  
> And my pkg-config output:
> C:\Users\Administrator>pkg-config --cflags --libs gtk+-2.0 libglade-2.0
> -mms-bitfields Files/Haskell Platform/2011.2.0.0/mingw/include/libxml2
> -ID:/prgs
> /Gtk+/include/gtk-2.0 -ID:/prgs/Gtk+/lib/gtk-2.0/include
> -ID:/prgs/Gtk+/include/
> atk-1.0 -ID:/prgs/Gtk+/include/cairo -ID:/prgs/Gtk+/include/pango-1.0
> -ID:/prgs/
> Gtk+/include/glib-2.0 -ID:/prgs/Gtk+/lib/glib-2.0/include
> -ID:/prgs/Gtk+/include
> /libpng12 -ID:/prgs/Gtk+/include/libglade-2.0 -ID:/Program 
> Files/Haskell Platfo
> rm/2011.2.0.0/mingw/lib -LD:/prgs/Gtk+/lib -LD:/Program -lglade-2.0
> -lgtk-win32-
> 2.0 -lxml2 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0
> -lpangowin32-1.0
>  -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0
> -lgmodule-2.0 -lglib
> -2.0 -lintl
>  
>  
> 
> 
> 
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload 
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve 
> application availability and disaster protection. Learn more about boosting 
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> 
> 
> 
> _______________________________________________
> Gtk2hs-users mailing list
> Gtk2hs-users <at> lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gtk2hs-users

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev

Gmane