GHC 6.6.1: Where is Graphics.SOE ?

Olivier Boudry olivier.boudry@gmail.com wrote: (Wed Jul 18 11:56:56 EDT 2007)
Hi Dmitri,
I built gtk2hs on Windows with GHC 6.6.1 and gtk2hs-0.9.11. Here's are the steps that worked for me: (not sure I didn't missed some)
First you need to install a GTK+ development package for windows. I think mine comes from http://gladewin32.sourceforge.net/modules/wfdownloads/
Then you must have MSYS and MinGW installed on your computer. You'll find information on how to install this here: http://hackage.haskell.org/trac/ghc/wiki/Building/Windows.
Once you've installed that stuff you can start a MSYS shell. You'll need to set some environment variables for GTK (adapt to your path): export GTK_BASEPATH=/c/GTK_2.0 export GTK_CONFIG_PATH=/c/GTK_2.0/lib/pkgconfig
Cd to the gtk2hs source directory and type: ./configure --prefix=/c/Progra~1/Haskell make make install
Hope this helps.
Good luck,
Olivier.
Oliver, thanks! I tried that, yet have some problems. I use: GHC 6.6.1, current development version of Gtk2hs (not sure what version), Gtk+ 2.10.11 (Win32) and latest available from MinGW distributions: MSYS-1.0.10.exe msysDTK-1.0.1.exe msys-autoconf-2.59.tar.bz2 msys-automake-1.8.2.tar.bz2 msys-libtool-1.5.tar.bz2 Problem 1. Gtk2hs build requires to run autoreconf. So in MSYS I have: $ autoreconf /usr/share/aclocal/autoopts.m4:22: warning: underquoted definition of AG_PATH_AUTOOPTS run info '(automake)Extending aclocal' or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal configure.ac:101: error: possibly undefined macro: AC_MSG_ERROR If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. autoreconf: /usr/bin/autoconf failed with exit status: 1 Notwithstanding this error autoreconf creates configure script. When I run it I get: Problem 2. $ ./configure --with-hc=/c/usr/ghc-6.6.1 --prefix=/c/usr/ghc-6.6.1 checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking build system type... i686-pc-mingw32 checking host system type... i686-pc-mingw32 checking for style of include used by make... GNU checking for gcc... no checking for cc... no checking for cc... no checking for cl... no configure: error: no acceptable C compiler found in $PATH Questions: 1) Should I ignore autoreconf errors? 2) I thought that building Gtk2hs is done with GHC only. Is it right that build requires C compiler? 3) Any other ideas what is wrong with this build? Thanks! -- Dmitri O. Kondratiev dokondr@gmail.com http://www.geocities.com/dkondr

On Fri, 2007-07-20 at 13:47 +0400, Dmitri O.Kondratiev wrote:
Oliver, thanks! I tried that, yet have some problems.
Questions: 1) Should I ignore autoreconf errors?
I've never managed to get autoconf working on windows. I always generate a tarball under linux and build that on Windows.
2) I thought that building Gtk2hs is done with GHC only. Is it right that build requires C compiler?
Yes, it does need a C compiler, but mingw has one so that's ok.
3) Any other ideas what is wrong with this build?
Almost certainly the autoconf problem messed things up. It's sadly not all that easy to build from source on Windows, much easier to use a pre-built version: http://haskell.org/gtk2hs/gtk2hs-0.9.11.3.exe The final 0.9.12 will be announced soon and of course that final version will be announced and linked from the Gtk2Hs website. If you really want to build from source on Windows I can give you more detailed instructions, and I should probably update the FAQ on this issue too: http://haskell.org/gtk2hs/archives/2005/06/24/building-from-source-on-window... I've also got some semi-automated win32 build scripts: http://darcs.haskell.org/gtk2hs/tools/win32/ and also Gtk+ SDK bundles: http://haskell.org/gtk2hs/win32/ Duncan

Thanks! I just tried a new pre-built version (http://haskell.org/gtk2hs
/gtk2hs-0.9.11.3.exe) and at least this simple prog. works in GHCi:
module GWindow where
import Graphics.SOE.Gtk
main() =
runGraphics (
do w <- openWindow "Graphics Test" (300, 300)
drawInWindow w (text (100, 200) "Hello Graphics World")
k <- getKey w
closeWindow w
)
(With gtk2hs-0.9.11.exe in GHCi this trivial program hangs.)
I am happy now and hope that more complex programs will work in new version
as well :)
Thanks again!
Dima
On 7/23/07, Duncan Coutts
On Fri, 2007-07-20 at 13:47 +0400, Dmitri O.Kondratiev wrote:
Oliver, thanks! I tried that, yet have some problems.
Questions: 1) Should I ignore autoreconf errors?
I've never managed to get autoconf working on windows. I always generate a tarball under linux and build that on Windows.
2) I thought that building Gtk2hs is done with GHC only. Is it right that build requires C compiler?
Yes, it does need a C compiler, but mingw has one so that's ok.
3) Any other ideas what is wrong with this build?
Almost certainly the autoconf problem messed things up.
It's sadly not all that easy to build from source on Windows, much easier to use a pre-built version:
http://haskell.org/gtk2hs/gtk2hs-0.9.11.3.exe
The final 0.9.12 will be announced soon and of course that final version will be announced and linked from the Gtk2Hs website.
If you really want to build from source on Windows I can give you more detailed instructions, and I should probably update the FAQ on this issue too:
http://haskell.org/gtk2hs/archives/2005/06/24/building-from-source-on-window...
I've also got some semi-automated win32 build scripts: http://darcs.haskell.org/gtk2hs/tools/win32/
and also Gtk+ SDK bundles: http://haskell.org/gtk2hs/win32/
Duncan
participants (2)
-
Dmitri O.Kondratiev
-
Duncan Coutts