From: Andre Nathan <andre@digirati.com.br>
To: caml-list@yquem.inria.fr
Subject: [Caml-list] Building a camlp4 toplevel with oasis/ocamlbuild
Date: Mon, 19 Mar 2012 15:40:40 -0300 [thread overview]
Message-ID: <1332182440.8276.8.camel@andre> (raw)
Hello
I'm trying to convert my ospec library
(https://github.com/andrenth/ospec) to oasis, so far without success.
Currently I build the camlp4-enabled toplevel with these commands:
ocamlfind ocamlc -dtypes -syntax camlp4o \
-package camlp4.extend,camlp4.quotations -c pa_spec.ml
ocamlfind ocamlc -dtypes -c spec.mli
ocamlfind ocamlc -dtypes -c spec.ml
ocamlfind ocamlc -dtypes -c report.mli
ocamlfind ocamlc -dtypes -c report.ml
ocamlfind ocamlc -dtypes -c helpers.ml
ocamlfind ocamlc -dtypes -c gen.ml
ocamlfind ocamlc -dtypes -c prop.mli
ocamlfind ocamlc -dtypes -c prop.ml
ocamlfind ocamlc -dtypes -o ospec dynlink.cma -I +camlp4 \
-package findlib toplevellib.cma camlp4o.cma str.cma \
spec.cmo report.cmo helpers.cmo gen.cmo prop.cmo \
pa_spec.cmo ospec.ml -linkpkg \
-pp "camlp4o Camlp4MacroParser.cmo"
So far what I have for the conversion is this:
_oasis file:
Library ospec
Path: .
BuildTools: ocamlbuild
CompiledObject: byte
Modules: Helpers, Prop, Spec, Gen, Pa_spec, Report
Executable ospec
Path: .
BuildTools: ocamlbuild
MainIs: ospec.ml
CompiledObject: byte
BuildDepends: ospec
_tags file:
"ospec.byte": use_ospec
"ospec.byte": use_toplevel
"ospec.byte": use_dynlink
"ospec.byte": use_camlp4
"ospec.byte": pkg_findlib
"ospec.byte": pkg_str
<ospec.ml>: use_ospec
<ospec.ml>: pkg_findlib
<ospec.ml>: syntax_camlp4o, pkg_camlp4.macro
<pa_spec.ml>: pkg_camlp4.quotations.o
<pa_spec.ml>: pkg_camlp4.extend
<pa_spec.ml>: syntax_camlp4o, pkg_camlp4.extend, pkg_camlp4.quotations
myocamlbuild.ml file:
flag ["file:ospec.byte"]
(S[A"dynlink.cma"; A"toplevellib.cma"; A"camlp4o.cma"]);
With this configuration I can get the library to compile, but when I try
to execute the toplevel I get this:
$ ./ospec.byte
Fatal error: exception Symtable.Error("Printexc")
Can anyone give me a hand here?
Thanks in advance,
Andre
next reply other threads:[~2012-03-19 18:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 18:40 Andre Nathan [this message]
2012-03-19 20:45 ` Jérémie Dimino
2012-03-20 14:11 ` Andre Nathan
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=1332182440.8276.8.camel@andre \
--to=andre@digirati.com.br \
--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