Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RE: /usr/bin/ld: cannot find -lcurses #2604

Closed
vicuna opened this issue Oct 30, 2000 · 2 comments
Closed

RE: /usr/bin/ld: cannot find -lcurses #2604

vicuna opened this issue Oct 30, 2000 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Oct 30, 2000

Original bug ID: 216
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

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.

/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

@vicuna
Copy link
Author

vicuna commented Oct 30, 2000

Comment author: administrator

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

@vicuna vicuna closed this as completed Oct 30, 2000
@vicuna
Copy link
Author

vicuna commented Oct 30, 2000

Comment author: administrator

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 (#2604)

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

@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant