caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Martin Jambon <martin.jambon@ens-lyon.org>
To: Jeff Henrikson <jehenrik@yahoo.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] nonresolved .cma files and errors
Date: Tue, 10 Apr 2007 23:58:43 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0704102343360.2884@droopy> (raw)
In-Reply-To: <461C50C7.6090802@yahoo.com>

On Tue, 10 Apr 2007, Jeff Henrikson wrote:

> Hello caml-list,
>
> I recently had a shocking realization about why some of my experiments with 
> camlp4 weren't compiling.  I had been linking camlp4.cma, which was the old 
> name of the library.  Now camlp4.cma doesn't exist and there are multiple 
> flavors Camlp4xxx.cma where the xxx is the same flavor notation of the the 
> preprocessor binaries.  So the trouble is, why was linking such a library not 
> a fatal?  Apparently all missing .cma and .cmo files passed on the command 
> line are considered non-errors.  It seems intutive to me that both should be 
> fatals!
>
> ~/src/camlp4-beta jehenrik$ ocamlc -I +camlp4 -pp camlp4orf junk.cma 
> camlp4orf.cma -c dynamic_functor_example3.ml
> ~/src/camlp4-beta jehenrik$ ocamlc -I +camlp4 -pp camlp4orf junk.cmo 
> camlp4orf.cma -c dynamic_functor_example3.ml
> ~/src/camlp4-beta jehenrik$ ocamlc -I +camlp4 -pp camlp4orf junk.ml 
> camlp4orf.cma -c dynamic_functor_example3.ml
> I/O error: "junk.ml: No such file or directory"
> Preprocessor error

In general, a syntax extension that (like before) uses quotations in the 
revised syntax would be compiled using such a command:

ocamlc -c -I +camlp4 -pp camlp4orf pa_foo.ml

It replaces

ocamlc -c -I +camlp4 -pp 'camlp4o pa_extend.cmo q_MLast.cmo' pa_foo.ml


There might be some slight error in the commands I just wrote (it 
happens). You can have a look at my updated json-static package that 
you'll find on my web site. It supports both the old and the new camlp4, 
and it works for sure with 3.10.0+beta [it uses two different source files 
of course].


Martin

--
Martin Jambon
http://martin.jambon.free.fr


  reply	other threads:[~2007-04-11  6:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-11  3:06 Jeff Henrikson
2007-04-11  6:58 ` Martin Jambon [this message]
2007-04-11  8:04 ` [Caml-list] " Alain Frisch
2007-04-12  6:42   ` Jeff Henrikson
2007-04-12  7:05     ` Alain Frisch
2007-04-11 11:35 ` 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=Pine.LNX.4.64.0704102343360.2884@droopy \
    --to=martin.jambon@ens-lyon.org \
    --cc=caml-list@inria.fr \
    --cc=jehenrik@yahoo.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).