Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000216OCamlOCaml generalpublic2000-10-30 08:462000-10-30 11:31
Reporteradministrator 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000216: RE: /usr/bin/ld: cannot find -lcurses
DescriptionI don't think it is a CAML-bug, it just some package or similar that isn't
installed on my machine. However, curses is so normal so I can't understand
why. I hoped somewhere out there had the same problem and just tell me what
is missing.

/mattias

-----Original Message-----
From: Pierre Weis [mailto:Pierre.Weis@inria.fr]
Sent: Monday, October 30, 2000 8:26 AM
To: Mattias Waldau
Cc: caml-bugs@inria.fr
Subject: Re: /usr/bin/ld: cannot find -lcurses


Hi,

Thank you for your message to the Caml mailing list.

However your message seems to be a bug report; hence I send it to the
relevant mailing list

caml-bugs@inria.fr

Thank again for your interest in Caml.

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/ [^]

> From: "Mattias Waldau" <mattias.waldau@abc.se>
> To: "Caml-List" <caml-list@inria.fr>
>
> Problem linking a program using the optimizing compiler, it works using
the
> ordinary byte-code compiler.
>
> I use a vanilla-redhat 6.2, with standard developments tools installed.
What
> have I forgotten?
>
> /mattias waldau
>
> [mattias@pro@fforum extract]$ make all
> ocamlc -g -c dir.mli
> ocamlc -g -c dir.ml
> ocamlc -g -c column.mli
> ocamlc -g -c column.ml
> ocamlc -g -c regexp.mli
> ocamlc -g -c regexp.ml
> ocamlc -g -c extract.mli
> ocamlc -g -c extract.ml
> ocamlc -g -c source.mli
> ocamlc -g -c source.ml
> ocamlc -g -o all -custom str.cma unix.cma dir.cmo column.cmo regexp.cmo
> extract.cmo source.cmo
> [mattias@pro@fforum extract]$ make opt
> ocamlopt -inline 10 -unsafe -c dir.ml
> ocamlopt -inline 10 -unsafe -c column.ml
> ocamlopt -inline 10 -unsafe -c regexp.ml
> ocamlopt -inline 10 -unsafe -c extract.ml
> ocamlopt -inline 10 -unsafe -c source.ml
> ocamlopt -inline 10 -unsafe -o opt unix.cmxa str.cmxa -ccopt -static
> dir.cmx column.cmx regexp.cmx extract.cmx source.cmx
> /usr/bin/ld: cannot find -lcurses
> collect2: ld returned 1 exit status
> Error during linking
> make: *** [opt] Error 2



TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0002176)
administrator (administrator)
2000-10-30 11:30

> I don't think it is a CAML-bug, it just some package or similar that isn't
> installed on my machine. However, curses is so normal so I can't understand
> why. I hoped somewhere out there had the same problem and just tell me what
> is missing.

Actually, both byte-code and native-code compiled programs need curses.
The problem is a little bit more subtle.


>> ocamlopt -inline 10 -unsafe -o opt unix.cmxa str.cmxa -ccopt -static
>> dir.cmx column.cmx regexp.cmx extract.cmx source.cmx
>> /usr/bin/ld: cannot find -lcurses

You're linking with -static, so you need static versions of all the libraries.
But RedHat has a dynamic version of curses but no static version. It's
essentially a RedHat bug. Fortunately, the fix is simple: in /usr/lib,
make a symbolic link from libcurses.a to libncurses.a:

ln -s /usr/lib/libncurses.a /usr/lib/libcurses.a

-- Damien
(0002177)
administrator (administrator)
2000-10-30 18:12

thanks, it works!


-----Original Message-----
From: Damien Doligez [mailto:caml-bugs@pauillac.inria.fr]
Sent: Monday, October 30, 2000 11:31 AM
To: mattias.waldau@abc.se
Subject: RE: /usr/bin/ld: cannot find -lcurses (PR#216)


> I don't think it is a CAML-bug, it just some package or similar that isn't
> installed on my machine. However, curses is so normal so I can't
understand
> why. I hoped somewhere out there had the same problem and just tell me
what
> is missing.

Actually, both byte-code and native-code compiled programs need curses.
The problem is a little bit more subtle.


>> ocamlopt -inline 10 -unsafe -o opt unix.cmxa str.cmxa -ccopt -static
>> dir.cmx column.cmx regexp.cmx extract.cmx source.cmx
>> /usr/bin/ld: cannot find -lcurses

You're linking with -static, so you need static versions of all the
libraries.
But RedHat has a dynamic version of curses but no static version. It's
essentially a RedHat bug. Fortunately, the fix is simple: in /usr/lib,
make a symbolic link from libcurses.a to libncurses.a:

ln -s /usr/lib/libncurses.a /usr/lib/libcurses.a

-- Damien


- Issue History
Date Modified Username Field Change
2005-11-18 10:13 administrator New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker