caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Building a camlp4 toplevel with oasis/ocamlbuild
@ 2012-03-19 18:40 Andre Nathan
  2012-03-19 20:45 ` Jérémie Dimino
  0 siblings, 1 reply; 3+ messages in thread
From: Andre Nathan @ 2012-03-19 18:40 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-20 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-19 18:40 [Caml-list] Building a camlp4 toplevel with oasis/ocamlbuild Andre Nathan
2012-03-19 20:45 ` Jérémie Dimino
2012-03-20 14:11   ` Andre Nathan

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).