Hello (again),

Sorry, for the multiple emails, but I realized I did not state my problem correctly.

I am having linker errors when building a program to display a simple Gtk window; Window.hs is  the program and it is pasted below.  The linker errors are related to gtk2hs.  It seems that GHC can't find the Gtk libraries needed by gtk2hs for linking.
__
Donnie Jones

On Sun, Nov 30, 2008 at 3:03 PM, Donnie Jones <donnie@darthik.com> wrote:
Hello,

I decided it would be best to include the entire output from ./configure script.


./configure --prefix=$GHC_DEV --with-hc=$GHC_DEV/bin/ghc --enable-libglade --enable-cairo --enable-svg --enable-opengl --disable-gio
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for ar... /usr/bin/ar
checking for ld... /usr/bin/ld
checking for basename... /usr/bin/basename
checking for grep that handles long lines and -e... /bin/grep
checking for gzip... /bin/gzip
checking for a sed that does not truncate output... /bin/sed
checking for cut... /usr/bin/cut
checking for tar... /bin/tar
checking for touch... /usr/bin/touch
checking for ranlib... ranlib
checking for /home/donnie/UK/masters/thesis/parallel_profiling_ghc/ghc_dev/bin/ghc... /home/donnie/UK/masters/thesis/parallel_profiling_ghc/ghc_dev/bin/ghc
checking version of GHC... 6.11.20081118
checking for ghc-pkg... /home/donnie/UK/masters/thesis/parallel_profiling_ghc/ghc_dev/bin/ghc-pkg
checking for the GHC package "base"... yes, version 4.0.0.0
checking for the GHC package "haskell98"... yes, version 1.0.1.0
checking for the GHC package "mtl"... yes, version 1.1.0.2
checking for the GHC package "bytestring"... yes, version 0.9.1.4
checking for the GHC package "containers"... yes, version 0.2.0.0
checking for the GHC package "array"... yes, version 0.2.0.0
checking for the GHC package "old-time"... yes, version 1.0.0.1
checking for the GHC package "pretty"... yes, version 1.0.1.0
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GLIB... yes
checking for GTK... yes
checking whether to build gtk package... yes
checking whether to build gio package... no
checking for LIBGLADE... yes
checking whether to build glade package... yes
checking for GCONF... no
checking whether to build gconf package... no
checking for SOURCEVIEW... no
checking whether to build sourceview package... no
checking for MOZILLA_MOZEMBED... no
checking whether to build mozembed package... no
checking for SEAMONKEY_MOZEMBED... no
checking whether to build mozembed package... no
checking for FIREFOX_MOZEMBED... no
checking whether to build mozembed package... no
checking for XULRUNNER_MOZEMBED... no
checking whether to build mozembed package... no
checking for CAIRO... yes
checking whether to build cairo package... yes
checking for SVGCAIRO... yes
checking whether to build svgcairo package... yes
checking for GTKGLEXT... yes
checking whether to build gtkglext package... yes
checking for GNOMEVFS... no
checking whether to build gnomevfs package... no
checking for GSTREAMER... no
checking whether to build gstreamer package... no
Package gstreamer-0.10 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gstreamer-0.10.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gstreamer-0.10' found
Package gnome-vfs-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gnome-vfs-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gnome-vfs-2.0' found
checking whether to build deprecated bindings... yes
checking for hsc2hs... /usr/bin/hsc2hs
checking for happy... /home/donnie/.cabal/bin/happy
checking version of happy... 1.17
checking for alex... /home/donnie/.cabal/bin/alex
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tools/c2hs/toplevel/C2HSConfig.hs
config.status: creating gtk2hs.spec
config.status: creating mk/chsDepend
config.status: creating mk/link-splitobjs.sh
config.status: creating docs/prologue.txt
config.status: creating glib/glib.package.conf
config.status: creating glib/glib.cabal
config.status: creating gtk/gtk.package.conf
config.status: creating gtk/gtk.cabal
config.status: creating gio/gio.package.conf
config.status: creating gio/gio.cabal
config.status: creating glade/glade.package.conf
config.status: creating glade/glade.cabal
config.status: creating gconf/gconf.package.conf
config.status: creating gconf/gconf.cabal
config.status: creating sourceview/sourceview.package.conf
config.status: creating sourceview/sourceview.cabal
config.status: creating mozembed/mozembed.package.conf
config.status: creating mozembed/mozembed.cabal
config.status: creating cairo/cairo.package.conf
config.status: creating cairo/cairo.cabal
config.status: creating svgcairo/svgcairo.package.conf
config.status: creating svgcairo/svgcairo.cabal
config.status: creating gtkglext/gtkglext.package.conf
config.status: creating gtkglext/gtkglext.cabal
config.status: creating soegtk/soegtk.package.conf
config.status: creating soegtk/soegtk.cabal
config.status: creating gnomevfs/gnomevfs.package.conf
config.status: creating gnomevfs/gnomevfs.cabal
config.status: creating gstreamer/gstreamer.package.conf
config.status: creating gstreamer/gstreamer.cabal
config.status: creating gtk2hs-config.h
config.status: gtk2hs-config.h is unchanged
config.status: executing depfiles commands
config.status: executing default commands
**************************************************
* Configuration completed successfully.          
*                                                
* The following packages will be built:          
*                                                
* glib          : yes                            
* gtk           : yes                  
* gio           : no                  
* glade         : yes             
* cairo         : yes                
* svgcairo      : yes             
* gtkglext      : yes             
* gconf         : no                
* sourceview    : no           
* mozembed      : no             
* soegtk        : yes                  
* gnomevfs      : no             
* gstreamer     : no            
* documentation : no                   
*                                                
* Now do "(g)make" followed by "(g)make install"
**************************************************

Thanks again.
__
Donnie Jones



On Sun, Nov 30, 2008 at 3:00 PM, Donnie Jones <donnie@darthik.com> wrote:
Hello,

I forgot to include my ./configure command-line arguments.

./configure --prefix=$GHC_DEV --with-hc=$GHC_DEV/bin/ghc --enable-libglade --enable-cairo --enable-svg --enable-opengl --disable-gio
__
Donnie


On Sun, Nov 30, 2008 at 2:38 PM, Donnie Jones <donnie@darthik.com> wrote:
Hello,

When I build gtk2hs, I am getting linker errors...
$GHC_DEV/bin/ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.11.20081118

$GHC_DEV/bin/ghc-pkg list
/home/donnie/UK/masters/thesis/parallel_profiling_ghc/ghc_dev/lib/ghc-6.11.20081118/./package.conf:
Cabal-1.5.5, array-0.2.0.0, base-3.0.3.0, base-4.0.0.0,
binary-0.4.4, bytestring-0.9.1.4, cairo-0.9.13, containers-0.2.0.0,
directory-1.0.0.2, ffi-1.0, filepath-1.1.0.1, (ghc-6.11.20081118),
ghc-prim-0.1.0.0, glade-0.9.13, glib-0.9.13, gtk-0.9.13,
gtkglext-0.9.13, haddock-2.3.0, haskell98-1.0.1.0, hpc-0.5.0.2,
integer-0.1.0.0, mtl-1.1.0.2, old-locale-1.0.0.1, old-time-1.0.0.1,
packedstring-0.1.0.1, parallel-1.1.0.0, pretty-1.0.1.0,
process-1.0.1.1, random-1.0.0.1, rts-1.0, soegtk-0.9.13,
svgcairo-0.9.13, syb-0.1.0.0, template-haskell-2.3.0.0,
time-1.1.2.2, unix-2.3.1.0

-- Excerpt from config.log for gtk2hs, I can send the entire config.log if you want.
configure:5299: checking for GLIB
configure:5307: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0 gobject-2.0 >= 2.0.0"
configure:5310: $? = 0
configure:5325: $PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.0.0 gobject-2.0 >= 2.0.0"
configure:5328: $? = 0
configure:5424: result: yes
configure:5464: checking for GTK
configure:5472: $PKG_CONFIG --exists --print-errors "pango >= 1.0.0 gdk-2.0 >= 2.0.0 gdk-pixbuf-2.0 >= 0.12.0 gtk+-2.0 >= 2.0.0 gthread-2.0 >= 2.0.0"
configure:5475: $? = 0
configure:5490: $PKG_CONFIG --exists --print-errors "pango >= 1.0.0 gdk-2.0 >= 2.0.0 gdk-pixbuf-2.0 >= 0.12.0 gtk+-2.0 >= 2.0.0 gthread-2.0 >= 2.0.0"
configure:5493: $? = 0
configure:5653: result: yes
configure:5658: checking whether to build gtk package
configure:5660: result: yes

-- Window.hs
import Graphics.UI.Gtk

main :: IO ()
main = do
initGUI
window <- windowNew
widgetShowAll window
mainGUI

-- GHC build of Window.hs, Linker errors.
$GHC_DEV/bin/ghc --make Window.hs -o Window.exe
[1 of 1] Compiling Main ( Window.hs, Window.o )
Linking Window.exe ...
Window.o: In function `r2Py_info':
(.text+0x46): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziAbstractziWidget_widgetShowAll_closure'
Window.o: In function `r2Py_info':
(.text+0x4d): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziTypes_zdf548_closure'
Window.o: In function `s2PH_info':
(.text+0xc7): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziGeneralziGeneral_mainGUI_closure'
Window.o: In function `s2PJ_info':
(.text+0x149): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziWindowsziWindow_windowNew_closure'
Window.o: In function `s2PJ_info':
(.text+0x1bf): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziGeneralziGeneral_initGUI_closure'
Window.o: In function `s2PJ_info':
(.text+0x261): undefined reference to `__stginit_gtkzm0zi9zi13_GraphicsziUIziGtk_'
Window.o: In function `r2Py_srt':
(.data+0x0): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziAbstractziWidget_widgetShowAll_closure'
Window.o: In function `r2Py_srt':
(.data+0x4): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziTypes_zdf548_closure'
Window.o: In function `s2PJ_srt':
(.data+0x18): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziGeneralziGeneral_mainGUI_closure'
Window.o: In function `s2PJ_srt':
(.data+0x1c): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziWindowsziWindow_windowNew_closure'
Window.o: In function `Main_main_srt':
(.data+0x38): undefined reference to `gtkzm0zi9zi13_GraphicsziUIziGtkziGeneralziGeneral_initGUI_closure'
collect2: ld returned 1 exit status
-- Installed Debian packages
ii  libgtk2.0-dev                        2.12.11-4                            Development files for the GTK+ library
ii  libglib2.0-dev                       2.16.6-1                             Development files for the GLib library

Any help would be greatly appreciated.
Thank you.
__
Donnie Jones