From: Jianzhou Zhao <jianzhou@seas.upenn.edu>
To: caml-list@yquem.inria.fr
Subject: magic_numbers in config.ml
Date: Sat, 13 Nov 2010 17:10:45 -0500 [thread overview]
Message-ID: <AANLkTik0oW5TvkWwEriBm=t7ZxLir4-Y==P5cEU7M5Kt@mail.gmail.com> (raw)
Hello,
I got an open source code (http://pho.ucsd.edu/liquid/dsolve.tar.gz),
which contains three files, config.mli. config.mlp and config.mlbuild.
After configuration, they generated a config.ml, something like
http://docs.camlcity.org/docs/godisrc/frama-c-Helium-20080701.tar.gz/frama-c-Helium-20080701/why/why-2.13/ml/utils/config.ml
with magic_numbers
let exec_magic_number = "Caml1999X008"
and cmi_magic_number = "Caml1999I010"
and cmo_magic_number = "Caml1999O006"
and cma_magic_number = "Caml1999A007"
and cmx_magic_number = "Caml1999Y011"
and cmxa_magic_number = "Caml1999Z010"
and ast_impl_magic_number = "Caml1999M011"
and ast_intf_magic_number = "Caml1999N010"
At runtime, the code checks if the magic_number matches my local
OCaml. The check fails and returns
'/usr/lib/ocaml/pervasives.cmi is not a compiled interface'
at runtime.
I usually got this "...cmi is not a compiled interface'" while
compilation if some OCaml objects are compiled by old versions. and
'make clean; recompile' can always solve the problem. But I have no
idea how the number is used and checked at runtime. How can I know
which OCaml to use from these numbers?
--
Jianzhou
reply other threads:[~2010-11-13 22:10 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='AANLkTik0oW5TvkWwEriBm=t7ZxLir4-Y==P5cEU7M5Kt@mail.gmail.com' \
--to=jianzhou@seas.upenn.edu \
--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