gtk+hs and libgmp

Gérard Milmeister gemi@bluewin.ch
29 Oct 2001 20:24:05 +0100


--=-xkHwY1Ks2KWvTtD9GpjI
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On Mon, 2001-10-29 at 11:11, Simon Marlow wrote:
>=20
> > On Sat, 2001-10-27 at 17:27, Manuel M. T. Chakravarty wrote:
> > > G=E9rard Milmeister <gemi@bluewin.ch> wrote,
> > >=20
> > > > On Thu, 2001-10-25 at 13:53, Simon Marlow wrote:
> > > > > It seems very strange that the libgmp in your GHC=20
> > installation doesn't work.  How did you install GHC?  Do you=20
> > have problems linking other programs, or just gtk+hs programs?
> > > > >=20
> > > > As far as I know, it happens only with gtk+hs. Small=20
> > programs I have
> > > > written are linked alright.
> > >=20
> > > Do these small programs actually use any arbitrary precision
> > > arthimetic - ie, use the type Integer?
> > >=20
> > > Manuel
> > Something like this?
> >=20
> > module Main where
> >=20
> > main =3D print (1000000000000000000000000000000::Integer)
> >=20
> > Yes, it works.
>=20
> I know that gtk+hs adds a -L/usr/lib option to the command line, which co=
mes originally from gtk-config.
>=20
> I'm still confused by what you said about GHC not linking with the libgmp=
.a in /opt/ghc, and yet it still manages to link programs using arbitrary p=
recision integers somehow.  Normally GHC won't look in /usr/local/lib for l=
ibraries, so it won't even find your GMP 3 library at all.
>=20
> Hmm.  All very mysterious.  I think you'll need to send us output from gh=
c -v for a link that failed and one that succeeded.
>=20
> Cheers,
> 	Simon
Here is the output:
1. Main.out from a link that succeeds.
2. GtkHelloWorld.out, a sample program from gtk+hs, compiled with
ghc -v -fglasgow-exts -lgtkHS GtkHelloWorld.hs `gtkhs-config --cflags` `gtk=
hs-config --libs` `gtk-config --cflags` `gtk-config --libs`

In fact, you are right, there is a -L/usr/lib before -lgmp. Maybe the libgm=
p.a included
with ghc should be renamed, for example  libgmp_ghc.a

n.b. I send the message only to you, not to the mailing list because
of the attachments.

Regards,


--=-xkHwY1Ks2KWvTtD9GpjI
Content-Type: text/plain
Content-Disposition: attachment; filename=Main.out
Content-Transfer-Encoding: 7bit

Glasgow Haskell Compiler, Version 5.02, for Haskell 98, compiled by GHC version 5.02
Using package config file: /opt/ghc/lib/ghc-5.02/package.conf
Hsc static flags: -static -fignore-interface-pragmas -fomit-interface-pragmas -fdo-lambda-eta-expansion -flet-no-escape
*** Checking old interface for hs = Just "Main.hs", hspp = Just "Main.hs":
compilation IS NOT required
*** Touching object file
touch Main.o
*** Linker
gcc -v -o a.out -DDONT_WANT_WIN32_DLL_SUPPORT  Main.o -L/opt/ghc/lib/ghc-5.02 -lHSstd -lHSstd_cbits -lHSrts -lm -lgmp -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_info -u PrelPtr_Ptr_static_info -u PrelWord_Wzh_static_info -u PrelInt_I8zh_static_info -u PrelInt_I16zh_static_info -u PrelInt_I32zh_static_info -u PrelInt_I64zh_static_info -u PrelWord_W8zh_static_info -u PrelWord_W16zh_static_info -u PrelWord_W32zh_static_info -u PrelWord_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelFloat_Fzh_con_info -u PrelFloat_Dzh_con_info -u PrelPtr_Ptr_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_closure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelIOBase_stackOverflow_closure -u PrelIOBase_heapOverflow_closure -u PrelIOBase_NonTermination_closure -u PrelIOBase_BlockedOnDeadMVar_closure -u PrelWeak_runFinalizzerBatch_closure -!
u __stginit_Prelude -u PrelMain_mainIO_closure -u __stginit_PrelMain
Reading specs from /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
 /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_info -u PrelPtr_Ptr_static_info -u PrelWord_Wzh_static_info -u PrelInt_I8zh_static_info -u PrelInt_I16zh_static_info -u PrelInt_I32zh_static_info -u PrelInt_I64zh_static_info -u PrelWord_W8zh_static_info -u PrelWord_W16zh_static_info -u PrelWord_W32zh_static_info -u PrelWord_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelFloat_Fzh_con_info -u PrelFloat_Dzh_con_info -u PrelPtr_Ptr_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_closure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelIOBase_stackOverflow_closure -u PrelIOBase_heapOverflow_closure -u PrelIOBase_NonTermination_closure -u PrelIOBase_BlockedOnDeadMVar_closure -u PrelWeak_runFinalizzerBatch_closure -u __st!
ginit_Prelude -u PrelMain_mainIO_closure -u __stginit_PrelMain /usr/lib/crt1.o /usr/lib/crti.o /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtbegin.o -L/opt/ghc/lib/ghc-5.02 -L/opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3 -L/opt/gcc/lib Main.o -lHSstd -lHSstd_cbits -lHSrts -lm -lgmp -lgcc -lc -lgcc /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtend.o /usr/lib/crtn.o
*** Deleting temp files
Deleting: /tmp/ghc9560.s /tmp/ghc9560.hspp
Warning: deleting non-existent /tmp/ghc9560.s
Warning: deleting non-existent /tmp/ghc9560.hspp

--=-xkHwY1Ks2KWvTtD9GpjI
Content-Type: text/plain
Content-Disposition: attachment; filename=GtkHelloWorld.out
Content-Transfer-Encoding: 7bit

Glasgow Haskell Compiler, Version 5.02, for Haskell 98, compiled by GHC version 5.02
Using package config file: /opt/ghc/lib/ghc-5.02/package.conf
Hsc static flags: -static -fignore-interface-pragmas -fomit-interface-pragmas -fdo-lambda-eta-expansion -flet-no-escape
*** Checking old interface for hs = Just "GtkHelloWorld.hs", hspp = Just "GtkHelloWorld.hs":
compilation IS NOT required
*** Touching object file
touch GtkHelloWorld.o
*** Linker
gcc -v -o a.out -DDONT_WANT_WIN32_DLL_SUPPORT  GtkHelloWorld.o -L/opt/ghc/lib/gtk+hs-0.11.5/ghc5 -L/opt/ghc/lib/c2hs-0.9.9/ghc5 -L/usr/lib -L/usr/X11R6/lib -L/usr/lib -L/usr/X11R6/lib -lgtkHS -lgtkHS -lgdkHS -lglibHS -lc2hs -lgtk -lgdk -lgmodule -lgthread -lglib -lpthread -ldl -lXext -lX11 -lm -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lm -L/opt/ghc/lib/ghc-5.02 -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -lm -lgmp -u Addr_Azh_static_info -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_info -u PrelPtr_Ptr_static_info -u PrelWord_Wzh_static_info -u PrelInt_I8zh_static_info -u PrelInt_I16zh_static_info -u PrelInt_I32zh_static_info -u PrelInt_I64zh_static_info -u PrelWord_W8zh_static_info -u PrelWord_W16zh_static_info -u PrelWord_W32zh_static_info -u PrelWord_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelFloat_Fzh_con_info -u PrelFloat_Dzh!
_con_info -u PrelPtr_Ptr_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_closure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelIOBase_stackOverflow_closure -u PrelIOBase_heapOverflow_closure -u PrelIOBase_NonTermination_closure -u PrelIOBase_BlockedOnDeadMVar_closure -u PrelWeak_runFinalizzerBatch_closure -u __stginit_Prelude -u PrelMain_mainIO_closure -u __stginit_PrelMain
Reading specs from /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
 /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o a.out -u Addr_Azh_static_info -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_info -u PrelPtr_Ptr_static_info -u PrelWord_Wzh_static_info -u PrelInt_I8zh_static_info -u PrelInt_I16zh_static_info -u PrelInt_I32zh_static_info -u PrelInt_I64zh_static_info -u PrelWord_W8zh_static_info -u PrelWord_W16zh_static_info -u PrelWord_W32zh_static_info -u PrelWord_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelFloat_Fzh_con_info -u PrelFloat_Dzh_con_info -u PrelPtr_Ptr_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_closure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelIOBase_stackOverflow_closure -u PrelIOBase_heapOverflow_closure -u PrelIOBase_NonTermination_closure -u PrelIOBase_BlockedOnDeadMVar_closure -u PrelWeak_runFinaliz!
zerBatch_closure -u __stginit_Prelude -u PrelMain_mainIO_closure -u __stginit_PrelMain /usr/lib/crt1.o /usr/lib/crti.o /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtbegin.o -L/opt/ghc/lib/gtk+hs-0.11.5/ghc5 -L/opt/ghc/lib/c2hs-0.9.9/ghc5 -L/usr/lib -L/usr/X11R6/lib -L/usr/lib -L/usr/X11R6/lib -L/opt/ghc/lib/ghc-5.02 -L/opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3 -L/opt/gcc/lib GtkHelloWorld.o -lgtkHS -lgtkHS -lgdkHS -lglibHS -lc2hs -lgtk -lgdk -lgmodule -lgthread -lglib -lpthread -ldl -lXext -lX11 -lm -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lm -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -lm -lgmp -lgcc -lc -lgcc /opt/gcc/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/crtend.o /usr/lib/crtn.o
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__413.o): In function `shP2_2_alt':
PrelFloat__413.o(.text+0x2b0): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__413.o): In function `shP5_1_alt':
PrelFloat__413.o(.text+0x32c): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__413.o): In function `shP5_2_alt':
PrelFloat__413.o(.text+0x390): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__413.o): In function `shP8_2_alt':
PrelFloat__413.o(.text+0x462): undefined reference to `__gmpz_cmp_ui'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__442.o): In function `shUy_2_alt':
PrelFloat__442.o(.text+0x2b4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__442.o): In function `shUB_1_alt':
PrelFloat__442.o(.text+0x334): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__442.o): In function `shUB_2_alt':
PrelFloat__442.o(.text+0x39c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__442.o): In function `shUE_2_alt':
PrelFloat__442.o(.text+0x46e): undefined reference to `__gmpz_cmp_ui'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__42.o): In function `s5bC_2_alt':
PrelNum__42.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__42.o): In function `s5bE_1_alt':
PrelNum__42.o(.text+0x120): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__42.o): In function `s5bE_2_alt':
PrelNum__42.o(.text+0x194): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__92.o): In function `s563_ret':
PrelNum__92.o(.text+0x11d): undefined reference to `__gmpn_gcd_1'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelBase__130.o): In function `s3WN_info':
PrelBase__130.o(.text+0xab): undefined reference to `__gmpn_gcd_1'
PrelBase__130.o(.text+0x105): undefined reference to `__gmpn_gcd_1'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvt_2_alt':
PrelFloat__158.o(.text+0x790): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvw_1_alt':
PrelFloat__158.o(.text+0x814): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvw_2_alt':
PrelFloat__158.o(.text+0x87c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvA_2_alt':
PrelFloat__158.o(.text+0x978): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvD_1_alt':
PrelFloat__158.o(.text+0x9f0): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvD_2_alt':
PrelFloat__158.o(.text+0xa4c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvH_2_alt':
PrelFloat__158.o(.text+0xb20): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvK_1_alt':
PrelFloat__158.o(.text+0xb8c): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvK_2_alt':
PrelFloat__158.o(.text+0xbec): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvO_2_alt':
PrelFloat__158.o(.text+0xca4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvR_1_alt':
PrelFloat__158.o(.text+0xd10): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__158.o): In function `shvR_2_alt':
PrelFloat__158.o(.text+0xd70): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__44.o): In function `s5bO_2_alt':
PrelNum__44.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__44.o): In function `s5bP_1_alt':
PrelNum__44.o(.text+0x12c): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__44.o): In function `s5bP_2_alt':
PrelNum__44.o(.text+0x1a0): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelReal__68.o): In function `s79y_2_alt':
PrelReal__68.o(.text+0x388): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelReal__68.o): In function `s79B_1_alt':
PrelReal__68.o(.text+0x3fc): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelReal__68.o): In function `s79B_2_alt':
PrelReal__68.o(.text+0x45c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__46.o): In function `s5bX_2_alt':
PrelNum__46.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__46.o): In function `s5bY_1_alt':
PrelNum__46.o(.text+0x12c): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__46.o): In function `s5bY_2_alt':
PrelNum__46.o(.text+0x1a0): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__47.o): In function `s5c0_2_alt':
PrelNum__47.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__47.o): In function `s5c1_1_alt':
PrelNum__47.o(.text+0x128): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__47.o): In function `s5c1_2_alt':
PrelNum__47.o(.text+0x1a0): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__48.o): In function `s5c3_2_alt':
PrelNum__48.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__48.o): In function `s5c4_1_alt':
PrelNum__48.o(.text+0x128): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__48.o): In function `s5c4_2_alt':
PrelNum__48.o(.text+0x1a0): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__51.o): In function `s5c8_2_alt':
PrelNum__51.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__51.o): In function `s5cd_1_alt':
PrelNum__51.o(.text+0x130): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__51.o): In function `s5cd_2_alt':
PrelNum__51.o(.text+0x1b4): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__346.o): In function `shIf_2_alt':
PrelFloat__346.o(.text+0x90): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__346.o): In function `shIi_1_alt':
PrelFloat__346.o(.text+0x108): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__346.o): In function `shIi_2_alt':
PrelFloat__346.o(.text+0x16c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__347.o): In function `shIm_2_alt':
PrelFloat__347.o(.text+0x90): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__347.o): In function `shIp_1_alt':
PrelFloat__347.o(.text+0x108): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__347.o): In function `shIp_2_alt':
PrelFloat__347.o(.text+0x16c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shIK_2_alt':
PrelFloat__349.o(.text+0x98): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shIN_1_alt':
PrelFloat__349.o(.text+0x11c): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shIN_2_alt':
PrelFloat__349.o(.text+0x188): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shIR_2_alt':
PrelFloat__349.o(.text+0x268): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shIU_1_alt':
PrelFloat__349.o(.text+0x2dc): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shIU_2_alt':
PrelFloat__349.o(.text+0x344): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shIY_2_alt':
PrelFloat__349.o(.text+0x400): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shJ1_1_alt':
PrelFloat__349.o(.text+0x46c): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__349.o): In function `shJ1_2_alt':
PrelFloat__349.o(.text+0x4cc): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__351.o): In function `shJ8_2_alt':
PrelFloat__351.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__351.o): In function `shJ9_1_alt':
PrelFloat__351.o(.text+0x130): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__351.o): In function `shJ9_2_alt':
PrelFloat__351.o(.text+0x1a8): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__371.o): In function `shJG_2_alt':
PrelFloat__371.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__371.o): In function `shJH_1_alt':
PrelFloat__371.o(.text+0x134): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__371.o): In function `shJH_2_alt':
PrelFloat__371.o(.text+0x1a8): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__43.o): In function `s5bI_2_alt':
PrelNum__43.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__43.o): In function `s5bK_1_alt':
PrelNum__43.o(.text+0x120): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelNum__43.o): In function `s5bK_2_alt':
PrelNum__43.o(.text+0x194): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__348.o): In function `shIv_2_alt':
PrelFloat__348.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__348.o): In function `shIx_1_alt':
PrelFloat__348.o(.text+0x124): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__348.o): In function `shIx_2_alt':
PrelFloat__348.o(.text+0x194): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__348.o): In function `shIB_2_alt':
PrelFloat__348.o(.text+0x258): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__348.o): In function `shIE_1_alt':
PrelFloat__348.o(.text+0x2c4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__348.o): In function `shIE_2_alt':
PrelFloat__348.o(.text+0x32c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__366.o): In function `shJp_2_alt':
PrelFloat__366.o(.text+0x98): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__366.o): In function `shJs_1_alt':
PrelFloat__366.o(.text+0x114): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__366.o): In function `shJs_2_alt':
PrelFloat__366.o(.text+0x184): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__366.o): In function `shJw_2_alt':
PrelFloat__366.o(.text+0x248): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__366.o): In function `shJz_1_alt':
PrelFloat__366.o(.text+0x2b4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__366.o): In function `shJz_2_alt':
PrelFloat__366.o(.text+0x31c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__379.o): In function `shJR_2_alt':
PrelFloat__379.o(.text+0x98): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__379.o): In function `shJU_1_alt':
PrelFloat__379.o(.text+0x114): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__379.o): In function `shJU_2_alt':
PrelFloat__379.o(.text+0x184): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__379.o): In function `shJY_2_alt':
PrelFloat__379.o(.text+0x248): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__379.o): In function `shK1_1_alt':
PrelFloat__379.o(.text+0x2b4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__379.o): In function `shK1_2_alt':
PrelFloat__379.o(.text+0x31c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__380.o): In function `shK7_2_alt':
PrelFloat__380.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__380.o): In function `shK9_1_alt':
PrelFloat__380.o(.text+0x124): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__380.o): In function `shK9_2_alt':
PrelFloat__380.o(.text+0x194): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__380.o): In function `shKd_2_alt':
PrelFloat__380.o(.text+0x258): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__380.o): In function `shKg_1_alt':
PrelFloat__380.o(.text+0x2c4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__380.o): In function `shKg_2_alt':
PrelFloat__380.o(.text+0x32c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__387.o): In function `shKq_2_alt':
PrelFloat__387.o(.text+0x98): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__387.o): In function `shKt_1_alt':
PrelFloat__387.o(.text+0x114): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__387.o): In function `shKt_2_alt':
PrelFloat__387.o(.text+0x184): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__387.o): In function `shKx_2_alt':
PrelFloat__387.o(.text+0x248): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__387.o): In function `shKA_1_alt':
PrelFloat__387.o(.text+0x2b4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__387.o): In function `shKA_2_alt':
PrelFloat__387.o(.text+0x31c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__388.o): In function `shKG_2_alt':
PrelFloat__388.o(.text+0xa8): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__388.o): In function `shKI_1_alt':
PrelFloat__388.o(.text+0x124): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__388.o): In function `shKI_2_alt':
PrelFloat__388.o(.text+0x194): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__388.o): In function `shKM_2_alt':
PrelFloat__388.o(.text+0x258): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__388.o): In function `shKP_1_alt':
PrelFloat__388.o(.text+0x2c4): undefined reference to `__gmpz_cmp_si'
/opt/ghc/lib/ghc-5.02/libHSstd.a(PrelFloat__388.o): In function `shKP_2_alt':
PrelFloat__388.o(.text+0x32c): undefined reference to `__gmpz_cmp'
/opt/ghc/lib/ghc-5.02/libHSrts.a(Storage.o): In function `initStorage':
Storage.o(.text+0x36f): undefined reference to `__gmp_set_memory_functions'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `plusIntegerzh_fast':
PrimOps.o(.text+0x552): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x56c): undefined reference to `__gmpz_add'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `minusIntegerzh_fast':
PrimOps.o(.text+0x5e6): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x600): undefined reference to `__gmpz_sub'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `timesIntegerzh_fast':
PrimOps.o(.text+0x67e): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x698): undefined reference to `__gmpz_mul'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `gcdIntegerzh_fast':
PrimOps.o(.text+0x712): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x72c): undefined reference to `__gmpz_gcd'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `quotIntegerzh_fast':
PrimOps.o(.text+0x7a6): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x7c0): undefined reference to `__gmpz_tdiv_q'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `remIntegerzh_fast':
PrimOps.o(.text+0x83e): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x858): undefined reference to `__gmpz_tdiv_r'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `divExactIntegerzh_fast':
PrimOps.o(.text+0x8d2): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x8ec): undefined reference to `__gmpz_divexact'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `andIntegerzh_fast':
PrimOps.o(.text+0x966): undefined reference to `__gmpz_init'
PrimOps.o(.text+0x980): undefined reference to `__gmpz_and'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `orIntegerzh_fast':
PrimOps.o(.text+0x9fe): undefined reference to `__gmpz_init'
PrimOps.o(.text+0xa18): undefined reference to `__gmpz_ior'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `xorIntegerzh_fast':
PrimOps.o(.text+0xa92): undefined reference to `__gmpz_init'
PrimOps.o(.text+0xaac): undefined reference to `__gmpz_xor'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `complementIntegerzh_fast':
PrimOps.o(.text+0xb06): undefined reference to `__gmpz_init'
PrimOps.o(.text+0xb1b): undefined reference to `__gmpz_com'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `quotRemIntegerzh_fast':
PrimOps.o(.text+0xb96): undefined reference to `__gmpz_init'
PrimOps.o(.text+0xba6): undefined reference to `__gmpz_init'
PrimOps.o(.text+0xbc2): undefined reference to `__gmpz_tdiv_qr'
/opt/ghc/lib/ghc-5.02/libHSrts.a(PrimOps.o): In function `divModIntegerzh_fast':
PrimOps.o(.text+0xc4e): undefined reference to `__gmpz_init'
PrimOps.o(.text+0xc5e): undefined reference to `__gmpz_init'
PrimOps.o(.text+0xc7a): undefined reference to `__gmpz_fdiv_qr'
collect2: ld returned 1 exit status

Failed: gcc -v -o a.out -DDONT_WANT_WIN32_DLL_SUPPORT  GtkHelloWorld.o -L/opt/ghc/lib/gtk+hs-0.11.5/ghc5 -L/opt/ghc/lib/c2hs-0.9.9/ghc5 -L/usr/lib -L/usr/X11R6/lib -L/usr/lib -L/usr/X11R6/lib -lgtkHS -lgtkHS -lgdkHS -lglibHS -lc2hs -lgtk -lgdk -lgmodule -lgthread -lglib -lpthread -ldl -lXext -lX11 -lm -lgtk -lgdk -lgmodule -lglib -ldl -lXext -lX11 -lm -L/opt/ghc/lib/ghc-5.02 -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -lm -lgmp -u Addr_Azh_static_info -u PrelBase_Izh_static_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_info -u PrelPtr_Ptr_static_info -u PrelWord_Wzh_static_info -u PrelInt_I8zh_static_info -u PrelInt_I16zh_static_info -u PrelInt_I32zh_static_info -u PrelInt_I64zh_static_info -u PrelWord_W8zh_static_info -u PrelWord_W16zh_static_info -u PrelWord_W32zh_static_info -u PrelWord_W64zh_static_info -u PrelStable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u PrelFloat_Fzh_con_info -u PrelF!
loat_Dzh_con_info -u PrelPtr_Ptr_con_info -u PrelStable_StablePtr_con_info -u PrelBase_False_closure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelIOBase_stackOverflow_closure -u PrelIOBase_heapOverflow_closure -u PrelIOBase_NonTermination_closure -u PrelIOBase_BlockedOnDeadMVar_closure -u PrelWeak_runFinalizzerBatch_closure -u __stginit_Prelude -u PrelMain_mainIO_closure -u __stginit_PrelMain
*** Deleting temp files
Deleting: /tmp/ghc9661.s /tmp/ghc9661.hspp
Warning: deleting non-existent /tmp/ghc9661.s
Warning: deleting non-existent /tmp/ghc9661.hspp

--=-xkHwY1Ks2KWvTtD9GpjI--