trouble with ghc-4.08.2-1.i386.rpm

Jens-Ulrik Petersen jens-ulrik.petersen@nokia.com
09 Mar 2001 14:37:20 +0900


I tried ghc-4.08.2-1.i386.rpm (both the RH-6 rpm and the RH-7 rpm) on
my Linux box running RH rawhide-2001-02-06 (a touch newer than the
RH-7.0.90 beta release Fisher), which both use glibc-2.2.1.

When I compile a program, eg a test program like "test.hs":

        module Main (main) where
        main = putStrLn "Hello!"

I get a put linking errors:

---- Start of included text -----------------------8<--- cut here -------------
% ghc test.hs
/usr/lib/ghc-4.08.2/libHSrts.a(Storage.o): In function `initStorage':
Storage.o(.text+0x2c2): undefined reference to `mp_set_memory_functions'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `addr2Integerzh_fast':
PrimOps.o(.text+0x4a6): undefined reference to `mpz_init_set_str'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `plusIntegerzh_fast':
PrimOps.o(.text+0x6fa): undefined reference to `mpz_init'
PrimOps.o(.text+0x710): undefined reference to `mpz_add'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `minusIntegerzh_fast':
PrimOps.o(.text+0x78e): undefined reference to `mpz_init'
PrimOps.o(.text+0x7a4): undefined reference to `mpz_sub'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `timesIntegerzh_fast':
PrimOps.o(.text+0x822): undefined reference to `mpz_init'
PrimOps.o(.text+0x838): undefined reference to `mpz_mul'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `gcdIntegerzh_fast':
PrimOps.o(.text+0x8b6): undefined reference to `mpz_init'
PrimOps.o(.text+0x8cc): undefined reference to `mpz_gcd'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `quotIntegerzh_fast':
PrimOps.o(.text+0x94a): undefined reference to `mpz_init'
PrimOps.o(.text+0x960): undefined reference to `mpz_tdiv_q'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `remIntegerzh_fast':
PrimOps.o(.text+0x9de): undefined reference to `mpz_init'
PrimOps.o(.text+0x9f4): undefined reference to `mpz_tdiv_r'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `divExactIntegerzh_fast':
PrimOps.o(.text+0xa72): undefined reference to `mpz_init'
PrimOps.o(.text+0xa88): undefined reference to `mpz_divexact'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `quotRemIntegerzh_fast':
PrimOps.o(.text+0xb06): undefined reference to `mpz_init'
PrimOps.o(.text+0xb15): undefined reference to `mpz_init'
PrimOps.o(.text+0xb2f): undefined reference to `mpz_tdiv_qr'
/usr/lib/ghc-4.08.2/libHSrts.a(PrimOps.o): In function `divModIntegerzh_fast':
PrimOps.o(.text+0xbbe): undefined reference to `mpz_init'
PrimOps.o(.text+0xbcd): undefined reference to `mpz_init'
PrimOps.o(.text+0xbe7): undefined reference to `mpz_fdiv_qr'
collect2: ld returned 1 exit status
---- End of included text -------------------------8<--- and here -------------

I think these are related to gmp2.  (BTW are there plans to upgrade
to gmp3, which seems to be standard now in the Linux world?)

I can compile ok with nhc98 (from "nhc98-1.02-1.i386.rpm").
Any ideas why the ghc rpms aren't working for me?

Best wishes, Jens