Daniel | 4 Apr 2011 16:01
Picon

cairo error: ghc.exe: unable to load package `cairo-0.12.0'

Hi list,

I've built gtk2hs successfully for ghc-7.0.2, but if I try to load the example
Drawing.hs from the cairo packages demo folder I get:

*Main> :load Drawing.hs
[1 of 1] Compiling Main             ( Drawing.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 process-1.0.1.5 ... linking ... done.
Loading package time-1.2.0.3 ... linking ... done.
Loading package random-1.0.0.3 ... linking ... done.
Loading package haskell98-1.1.0.1 ... linking ... done.
Loading package cairo-0.12.0 ... linking ... <interactive>:
C:/users/daniel/appd
ata/roaming/cabal\cairo-0.12.0\ghc-7.0.2\HScairo-0.12.0.o: unknown
symbol `_cair
o_image_surface_get_data'
ghc.exe: unable to load package `cairo-0.12.0'

Have tried many things so far:

 * Starting with re-inited package database
 * Doing a $ nm /h/Gtk+/bin/libcairo-2.dll | grep -i cairo_image_surface_get_data
yielding 68de04d8 T _cairo_image_surface_get_data
 * Temporarily renaming libcairo-2.dll (the only one found on my setup, even
(Continue reading)

Axel Simon | 4 Apr 2011 17:27
Picon
Favicon

Re: cairo error: ghc.exe: unable to load package `cairo-0.12.0'

Hi Daniel,

On 04.04.2011, at 16:01, Daniel wrote:

> Hi list,
>
> I've built gtk2hs successfully for ghc-7.0.2, but if I try to load  
> the example
> Drawing.hs from the cairo packages demo folder I get:
>
>
> *Main> :load Drawing.hs
> [1 of 1] Compiling Main             ( Drawing.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 process-1.0.1.5 ... linking ... done.
> Loading package time-1.2.0.3 ... linking ... done.
> Loading package random-1.0.0.3 ... linking ... done.
> Loading package haskell98-1.1.0.1 ... linking ... done.
> Loading package cairo-0.12.0 ... linking ... <interactive>:
> C:/users/daniel/appd
> ata/roaming/cabal\cairo-0.12.0\ghc-7.0.2\HScairo-0.12.0.o: unknown
> symbol `_cair
> o_image_surface_get_data'
> ghc.exe: unable to load package `cairo-0.12.0'
>
(Continue reading)

Daniel Kahlenberg | 5 Apr 2011 13:48
Picon

Re: cairo error: ghc.exe: unable to load package `cairo-0.12.0'

Hi again,

I can't get my head around one question: On one side I can install
gtk2hs with the workaround from
http://hackage.haskell.org/trac/gtk2hs/ticket/1203 applied. When I run
ghc-pkg list the packages are listed as installed and I can compile
some demo apps - apart from the mentioned package load error in ghci -
using them, BUT...

... when I try cabal install threadscope (as an example package
depending on gtk2hs) it complains about cairo etc. not being installed
and tries to re-install it on-the-fly failing due to whats described
her: http://hackage.haskell.org/trac/gtk2hs/ticket/1203! As opposed to
when I'm using the stepwise approach of cabal unpack first, then cabal
configure etc.

Also I found two slightly similar looking questions on the list, but
again I don't feel skilled enough to make best use of them, maybe they
help any other

http://www.mail-archive.com/gtk2hs-devel <at> lists.sourceforge.net/msg00580.html
http://www.mail-archive.com/gtk2hs-devel <at> lists.sourceforge.net/msg00598.html

Cheers
Daniel

2011/4/4 Axel Simon <Axel.Simon <at> in.tum.de>:
> Hi Daniel,
>
> On 04.04.2011, at 16:01, Daniel wrote:
(Continue reading)

Bulat Ziganshin | 12 Apr 2011 13:16
Picon

toolbarSetIconSize (IconSizeUser 64)

Hello gtk2hs-users,

why toolbarSetIconSize (IconSizeUser 64) doesn't work? icon sizes
remains at 32 points. i'm using built-in GTK icons (if that's
important) and ghc 6.8.3 on windows with official gtk2hs build and
пел2 runtime version 2.15 or so

--

-- 
Best regards,
 Bulat                          mailto:Bulat.Ziganshin <at> gmail.com

------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
Gtk2hs-users mailing list
Gtk2hs-users <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk2hs-users
taiq wu | 16 Apr 2011 11:12
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 2011 11:42
Picon
Favicon

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 2011 15:18

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
John Smith | 17 Apr 2011 15:42
Picon
Favicon

Re: installing gtk2hs on windows - versions?

On 25/03/2011 13:28, John Smith wrote:
> Follow the instructions at http://code.haskell.org/gtk2hs/INSTALL, and the workaround at
> http://hackage.haskell.org/trac/gtk2hs/ticket/1203

Does anyone at Gtk2Hs plan on fixing this? Shipping broken installation scripts is a pretty egregious error.

------------------------------------------------------------------------------
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
John Smith | 20 Apr 2011 21:57
Picon
Favicon

Re: installing gtk2hs on windows - versions?

May be worth a fork, if the official maintainers are indefinitely AWOL?

On 17/04/2011 23:12, Axel Simon wrote:
> I would like to but I don't have access to our repository anymore. I've tried to email various people but
with very
> little success so far. This has been going on since January so I can't promise a fix soon.
>
> Axel
>
>
> On Apr 17, 2011, at 15:42, John Smith wrote:
>
>> On 25/03/2011 13:28, John Smith wrote:
>>> Follow the instructions at http://code.haskell.org/gtk2hs/INSTALL, and the workaround at
>>> http://hackage.haskell.org/trac/gtk2hs/ticket/1203
>>
>> Does anyone at Gtk2Hs plan on fixing this? Shipping broken installation scripts is a pretty egregious error.

------------------------------------------------------------------------------
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