caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Michaël Grünewald" <michael-grunewald@wanadoo.fr>
To: caml-list@inria.fr
Subject: [Caml-list] Inconsistence between ocamlc and ocamlopt
Date: 16 Aug 2002 04:14:32 +0200	[thread overview]
Message-ID: <8765ybh7nb.fsf@ketanu.dyndns.org> (raw)

Files algo.cmx and interpolation.cmx both define a module named Algo

I just experimented something really strange, 

while building successfully a bytecode library using `ocamlfind ocamlc' it
fails when trying to build the native form for the library:

Files algo.cmx and interpolation.cmx both define a module named Algo
*** Error code 2

Which is false (and i cannot figure out how these two different files could
both define a module named algo), and the bytecode compiler 

Here are the occurences for the word algo in the source files: always on
right side, it should not be a declaraion for the word ?

    $ grep -i algo *.ml
    interpolation.ml:  module AP =  Algo.Poly(K)
    interpolation.ml:  module AM =  Algo.Matrice(K)(M)
    main.ml:module AlgP =   Algo.Poly(R);;
    main.ml:module AlgM =   Algo.Matrice(R)(M);;

Each modules are produced with lines like:

    $ make VERBOSE=YES algebre.cma
    ocamlfind ocamlc    -c -o anneau.cmo anneau.ml

    [...]

    ocamlfind ocamlc -a    -o algebre.cma anneau.cmo corps.cmo poly.cmo 
        matrice.cmo interpolation.cmo algo.cmo

or

    $ make VERBOSE=YES algebre.cmxa
    ocamlfind ocamlopt    -c -o anneau.cmx anneau.ml

    [...]

    ocamlfind ocamlopt -a    -o algebre.cmxa anneau.cmx corps.cmx poly.cmx
         matrice.cmx interpolation.cmx algo.cmx
    Files algo.cmx and interpolation.cmx both define a module named Algo
    *** Error code 2

There is nothing surnatural in the compiler's incantations, so, what's going
wrong ? That is what i cannot guess (this has nothing to do with ocamlfind,
it fails in the same manner when not using it).
-- 
Michaël Grünewald <michael-grunewald@wanadoo.fr>  - RSA PGP Key ID: 0x20D90C12
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


                 reply	other threads:[~2002-08-17 11:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=8765ybh7nb.fsf@ketanu.dyndns.org \
    --to=michael-grunewald@wanadoo.fr \
    --cc=caml-list@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;
as well as URLs for NNTP newsgroup(s).