demexp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Demexp-dev] DemExp 0.4 compilation issue with CDuce 0.3.9


From: Thomas Petazzoni
Subject: Re: [Demexp-dev] DemExp 0.4 compilation issue with CDuce 0.3.9
Date: Thu, 14 Jul 2005 19:32:52 +0200
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050602)

Hello,

Thomas Petazzoni a écrit :

> I traced down the issue a bit further, and I come to the conclusion that
> cdo2ml doesn't work the way it worked, or it is buggy. Trying to
> manually run cdo2ml doesn't work (it waits forever). Running it with
> strace gives interesting stuff :

I went further again. According to the CHANGES file of CDuce 0.3.9, one
shouldn't use 'cdo2ml' directly as a preprocessor, but should rather use
the new '--mlstub' CDuce option. According to the documentation [1] :

===
Compile the OCaml glue code ocamlfind ocamlc -c -package cduce -pp
"cduce --mlstub" -impl foo.cdo. The --mlstub option tells CDuce to
extract the OCaml glue code from the CDuce bytecode file. You can
directly run cduce --mlstub on a .cdo file to better understand how the
OCaml/CDuce interface works.
===

So, in the Makefile, I replaced -pp "cdo2ml -static" by "cduce
--mlstub", but now, cduce --mlstub fails at finding cdo2ml, because it
looks for it in the current directory :

address@hidden:~/demexp/debian/demexp/trunk/demexp-0.4$ cduce --mlstub
srv/xml.cdo

/bin/sh: ./cdo2ml: Aucun fichier ou répertoire de ce type

I grepped in cduce source code, and I think the call to cdo2ml is in
ocamliface/mlstub.ml, around line 550 :

  let exe = Filename.concat (Filename.dirname Sys.argv.(0)) "cdo2ml" in
  print_endline prolog;
  let oc = Unix.open_process_out exe in
  Marshal.to_channel oc str_items [];
  flush oc;
  ignore (Unix.close_process_out oc)

The Filename.concat (Filename.dirname Sys.argv.(0)) "cdo2ml" stuff must
be wrong, but hey, how could I fix it, I don't program in Caml ! ;-)

Caml experts, any idea ?

Sincerly,

Thomas

[1] http://www.cduce.org/manual_interfacewithocaml.html
-- 
PETAZZONI Thomas - address@hidden
http://thomas.enix.org - Jabber: address@hidden
KOS: http://kos.enix.org/ - SOS: http://sos.enix.org
Fingerprint : 0BE1 4CF3 CEA4 AC9D CC6E  1624 F653 CB30 98D3 F7A7

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]