Linking Problem, ghc 5.02: cannot find -lreadline

Marc van Dongen dongen@cs.ucc.ie
Tue, 5 Feb 2002 10:53:43 +0000


--TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Dear all,


After a long time I decided to start using Haskell again:-)
I've downloaded rpm sources (RPMs for SuSE Linux 7.3 (i386,
glibc 2.2) from Ralf Hinze: base and docs RPM, and profiling
libraries RPM.) from the ghc site and installed them. The
only problem I had was that I had to re-install gmp using
rpm. So that was great.

When I tried to compile some large program I was delighted
to see that all object files got created smoothly.

At the linking stage I got an error:
 ''cannot find -lreadline
   collect2: ld returned 1 exit status''

I couldn't find anything about this on the web or in the
mini faq.

Anybody there to give me a quick hint how to get around
this?

Regards,



Marc van Dongen
-- 
Marc van Dongen             | dongen@cs.ucc.ie |
Computer Science Department |     Western Road | () ASCII ribbon campaign
University College Cork     |    Cork, Ireland | /\ against HTML mail
phone: +353 (0)21 4903578   |     fax: 4903978 |

--TakKZr9L6Hm6aLOc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=log
Content-Transfer-Encoding: quoted-printable

ghc  -H20M -recomp -v -fglasgow-exts -cpp -syslib posix -syslib util -fvia-=
C -funbox-strict-fields -ddump-rules -ddump-simpl-stats -O2 -o Groebner Gro=
ebner.o Ring.o RingPrelude.o MarcMap.o MarcTypes.o GroebnerTypes.o Groebner=
Basis.o Balanced.o Sort.o Result.o MarcShow.o MarcUtils.o Utilities.o WH.o =
Terms.o ParseUtils.o PolyParse.o PolyLexer.o Coefficient.o ChangeBasis.o Si=
mplex.o
Glasgow Haskell Compiler, Version 5.02.2, for Haskell 98, compiled by GHC v=
ersion 5.02.2
Using package config file: /usr/lib/ghc-5.02.2/package.conf
Hsc static flags: -static -funbox-strict-fields -fignore-asserts -ffoldr-bu=
ild-on -fdo-eta-reduction -fdo-lambda-eta-expansion -fcase-merge -flet-to-c=
ase -flet-no-escape
*** Linker
gcc -v -o Groebner -DDONT_WANT_WIN32_DLL_SUPPORT  Groebner.o Ring.o RingPre=
lude.o MarcMap.o MarcTypes.o GroebnerTypes.o GroebnerBasis.o Balanced.o Sor=
t.o Result.o MarcShow.o MarcUtils.o Utilities.o WH.o Terms.o ParseUtils.o P=
olyParse.o PolyLexer.o Coefficient.o ChangeBasis.o Simplex.o -L/usr/lib/ghc=
-5.02.2 -lHSutil -lHSutil_cbits -lreadline -lncurses -lHSconcurrent -lHSpos=
ix -lHSposix_cbits -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -l=
m -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 P=
relPtr_Ptr_static_info -u PrelWord_Wzh_static_info -u PrelInt_I8zh_static_i=
nfo -u PrelInt_I16zh_static_info -u PrelInt_I32zh_static_info -u PrelInt_I6=
4zh_static_info -u PrelWord_W8zh_static_info -u PrelWord_W16zh_static_info =
-u PrelWord_W32zh_static_info -u PrelWord_W64zh_static_info -u PrelStable_S=
tablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_info -u P=
relFloat_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_cl=
osure -u PrelPack_unpackCString_closure -u PrelIOBase_stackOverflow_closure=
 -u PrelIOBase_heapOverflow_closure -u PrelIOBase_NonTermination_closure -u=
 PrelIOBase_BlockedOnDeadMVar_closure -u PrelWeak_runFinalizzerBatch_closur=
e -u __stginit_Prelude -u PrelMain_mainIO_closure -u __stginit_PrelMain
Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
 /usr/lib/gcc-lib/i486-suse-linux/2.95.3/collect2 -m elf_i386 -dynamic-link=
er /lib/ld-linux.so.2 -o Groebner -u Addr_Azh_static_info -u PrelBase_Izh_s=
tatic_info -u PrelBase_Czh_static_info -u PrelFloat_Fzh_static_info -u Prel=
Float_Dzh_static_info -u PrelPtr_Ptr_static_info -u PrelWord_Wzh_static_inf=
o -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 P=
relWord_W16zh_static_info -u PrelWord_W32zh_static_info -u PrelWord_W64zh_s=
tatic_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_c=
losure -u PrelBase_True_closure -u PrelPack_unpackCString_closure -u PrelIO=
Base_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 /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/gcc-lib/i48=
6-suse-linux/2.95.3/crtbegin.o -L/usr/lib/ghc-5.02.2 -L/usr/lib/gcc-lib/i48=
6-suse-linux/2.95.3 -L/usr/i486-suse-linux/lib Groebner.o Ring.o RingPrelud=
e.o MarcMap.o MarcTypes.o GroebnerTypes.o GroebnerBasis.o Balanced.o Sort.o=
 Result.o MarcShow.o MarcUtils.o Utilities.o WH.o Terms.o ParseUtils.o Poly=
Parse.o PolyLexer.o Coefficient.o ChangeBasis.o Simplex.o -lHSutil -lHSutil=
_cbits -lreadline -lncurses -lHSconcurrent -lHSposix -lHSposix_cbits -lHSla=
ng -lHSlang_cbits -lHSstd -lHSstd_cbits -lHSrts -lm -lgmp -lgcc -lc -lgcc /=
usr/lib/gcc-lib/i486-suse-linux/2.95.3/crtend.o /usr/lib/crtn.o
/usr/i486-suse-linux/bin/ld: cannot find -lreadline
collect2: ld returned 1 exit status

Failed: gcc -v -o Groebner -DDONT_WANT_WIN32_DLL_SUPPORT  Groebner.o Ring.o=
 RingPrelude.o MarcMap.o MarcTypes.o GroebnerTypes.o GroebnerBasis.o Balanc=
ed.o Sort.o Result.o MarcShow.o MarcUtils.o Utilities.o WH.o Terms.o ParseU=
tils.o PolyParse.o PolyLexer.o Coefficient.o ChangeBasis.o Simplex.o -L/usr=
/lib/ghc-5.02.2 -lHSutil -lHSutil_cbits -lreadline -lncurses -lHSconcurrent=
 -lHSposix -lHSposix_cbits -lHSlang -lHSlang_cbits -lHSstd -lHSstd_cbits -l=
HSrts -lm -lgmp -u Addr_Azh_static_info -u PrelBase_Izh_static_info -u Prel=
Base_Czh_static_info -u PrelFloat_Fzh_static_info -u PrelFloat_Dzh_static_i=
nfo -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 Pr=
elInt_I64zh_static_info -u PrelWord_W8zh_static_info -u PrelWord_W16zh_stat=
ic_info -u PrelWord_W32zh_static_info -u PrelWord_W64zh_static_info -u Prel=
Stable_StablePtr_static_info -u PrelBase_Izh_con_info -u PrelBase_Czh_con_i=
nfo -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_cl=
osure -u PrelIOBase_BlockedOnDeadMVar_closure -u PrelWeak_runFinalizzerBatc=
h_closure -u __stginit_Prelude -u PrelMain_mainIO_closure -u __stginit_Prel=
Main
*** Deleting temp files
Deleting:=20

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Packages =3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Package
   {name =3D "gmp",
    import_dirs =3D [],
    source_dirs =3D [],
    library_dirs =3D [],
    hs_libraries =3D [],
    extra_libraries =3D ["gmp"],
    include_dirs =3D [],
    c_includes =3D [],
    package_deps =3D [],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "rts",
    import_dirs =3D [],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSrts"],
    extra_libraries =3D ["m"],
    include_dirs =3D ["/usr/lib/ghc-5.02.2/include"],
    c_includes =3D ["Stg.h"],
    package_deps =3D ["gmp"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D
      ["-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"]}
Package
   {name =3D "std",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/std"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSstd"],
    extra_libraries =3D ["HSstd_cbits"],
    include_dirs =3D [],
    c_includes =3D ["HsStd.h"],
    package_deps =3D ["rts"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "lang",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/lang"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSlang"],
    extra_libraries =3D ["HSlang_cbits"],
    include_dirs =3D [],
    c_includes =3D ["HsLang.h"],
    package_deps =3D [],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D ["-u", "Addr_Azh_static_info"]}
Package
   {name =3D "concurrent",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/concurrent"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSconcurrent"],
    extra_libraries =3D [],
    include_dirs =3D [],
    c_includes =3D [],
    package_deps =3D ["lang"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "data",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/data"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSdata"],
    extra_libraries =3D [],
    include_dirs =3D [],
    c_includes =3D [],
    package_deps =3D ["lang", "util"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "net",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/net"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSnet"],
    extra_libraries =3D [],
    include_dirs =3D [],
    c_includes =3D ["HsNet.h"],
    package_deps =3D ["lang", "text", "concurrent"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "posix",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/posix"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSposix"],
    extra_libraries =3D ["HSposix_cbits"],
    include_dirs =3D [],
    c_includes =3D ["HsPosix.h"],
    package_deps =3D ["lang"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "text",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/text"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HStext"],
    extra_libraries =3D ["HStext_cbits"],
    include_dirs =3D [],
    c_includes =3D ["HsText.h"],
    package_deps =3D ["lang"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "util",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/util"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSutil"],
    extra_libraries =3D ["HSutil_cbits", "readline", "ncurses"],
    include_dirs =3D [],
    c_includes =3D ["HsUtil.h"],
    package_deps =3D ["lang", "concurrent", "posix"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "hssource",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/hssource"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HShssource"],
    extra_libraries =3D [],
    include_dirs =3D [],
    c_includes =3D [],
    package_deps =3D ["text"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "greencard",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/greencard"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSgreencard"],
    extra_libraries =3D [],
    include_dirs =3D [],
    c_includes =3D [],
    package_deps =3D ["lang"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}
Package
   {name =3D "xlib",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/xlib"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSxlib"],
    extra_libraries =3D ["HSxlib_cbits", "X11"],
    include_dirs =3D [],
    c_includes =3D ["HsXlib.h"],
    package_deps =3D ["greencard"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D ["-I/usr/X11R6/include"],
    extra_ld_opts =3D ["-L/usr/X11R6/lib"]}
Package
   {name =3D "HGL",
    import_dirs =3D ["/usr/lib/ghc-5.02.2/imports/HGL"],
    source_dirs =3D [],
    library_dirs =3D ["/usr/lib/ghc-5.02.2"],
    hs_libraries =3D ["HSHGL"],
    extra_libraries =3D [],
    include_dirs =3D [],
    c_includes =3D [],
    package_deps =3D ["xlib", "concurrent"],
    extra_ghc_opts =3D [],
    extra_cc_opts =3D [],
    extra_ld_opts =3D []}


make: *** [Groebner] Error 1

--TakKZr9L6Hm6aLOc--