From: "Ashish Agarwal" <agarwal1975@gmail.com>
To: caml-list@yquem.inria.fr
Subject: error building native code with ocamlbuild
Date: Mon, 3 Dec 2007 15:56:16 -0500 [thread overview]
Message-ID: <d8be5ae20712031256i214a3dccu1bbcdd641360f7f@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 849 bytes --]
Using ocamlbuild on the following example to build native code includes a
library twice, causing an error, but byte-code works fine. Am I doing
something wrong or is it a bug? Thanks for any help.
~/tmp$ cat myocamlbuild.ml
open Ocamlbuild_plugin;;
open Command;;
dispatch begin function
| After_rules ->
ocaml_lib ~extern:true "unix";
| _ -> ()
end;;
~/tmp$ cat _tags
<pwd.{native,byte}>: use_unix
~/tmp$ cat pwd.ml
let _ = print_endline (Unix.getcwd())
~/tmp$ ocamlbuild pwd.byte
Finished, 3 targets (3 cached) in 00:00:00.
~/tmp$ ocamlbuild pwd.native
+ /usr/local/bin/ocamlopt.opt unix.cmxa unix.cmxa pwd.cmx -o pwd.native
Files /usr/local/lib/ocaml/unix.cmxa and /usr/local/lib/ocaml/unix.cmxa
both define a module named Unix
Command exited with code 2.
Compilation unsuccessful after building 4 targets (2 cached) in 00:00:00.
[-- Attachment #2: Type: text/html, Size: 1064 bytes --]
next reply other threads:[~2007-12-03 20:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 20:56 Ashish Agarwal [this message]
2007-12-04 5:00 ` [Caml-list] " Erick Tryzelaar
2007-12-04 15:31 ` Ashish Agarwal
2007-12-05 2:19 ` Erick Tryzelaar
2007-12-06 17:28 ` Nicolas Pouillard
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=d8be5ae20712031256i214a3dccu1bbcdd641360f7f@mail.gmail.com \
--to=agarwal1975@gmail.com \
--cc=caml-list@yquem.inria.fr \
/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