caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Malcolm Matalka <mmatalka@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] -custom linking against -lncurses?
Date: Fri, 30 Nov 2012 15:59:08 +0100	[thread overview]
Message-ID: <1354287548.3042.5.camel@thinkpad> (raw)
In-Reply-To: <87lidjqvwi.fsf@li195-236.members.linode.com>

It's a configure-time issue: Look at the output of "ocamlc -config", and
you see an -lncurses in bytecomp_c_libraries. Basically, the curses
library is only needed for the toploop (for accessing terminfo), but as
the toploop uses the bytecode compiler, the -lncurses option is
propagated to all bytecode programs. I guess this is for simplicity of
the runtime system.

You can get rid of that by passing -no-curses to the "configure" script
when you build ocaml.

Gerd

Am Freitag, den 30.11.2012, 04:31 -0500 schrieb Malcolm Matalka:
> I have noticed on my machine, ocamlc, using -custom, tries to link the
> resulting code against ncurses[1].
> 
> Is this behaviour expected?  I know how to get around this on my OS but
> not sure why it's happening in the first place.
> 
> /Malcolm 
> 
> [1]
> malcolm@nix-junkyard:/tmp$ ocamlc -o foo foo.ml
> malcolm@nix-junkyard:/tmp$ ocamlc -custom -o foo foo.ml
> /nix/store/1iigiim5855m8j7pmwf5xrnpf705s4dh-binutils-2.21.1a/bin/ld:
> cannot find -lncurses
> collect2: ld returned 1 exit status
> File "foo.ml", line 1, characters 0-1:
> Error: Error while building custom runtime system
> 

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
*** Searching for new projects! Need consulting for system
*** programming in Ocaml? Gerd Stolpmann can help you.
------------------------------------------------------------


      reply	other threads:[~2012-11-30 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-30  9:31 Malcolm Matalka
2012-11-30 14:59 ` Gerd Stolpmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354287548.3042.5.camel@thinkpad \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=mmatalka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).