[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Demexp-dev] Problem while using cduce --mlstub
From: |
Thomas Petazzoni |
Subject: |
[Demexp-dev] Problem while using cduce --mlstub |
Date: |
Thu, 14 Jul 2005 20:28:57 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050602) |
Hello,
Today, I tried to compile DemExp 0.4 (http://www.demexp.org) with CDuce
0.3.9 (it worked fine with CDuce 0.3.2). As stated in the CHANGES file,
I changed the preprocessor to "cduce --mlstub" instead of "cdo2ml --static".
However, compilation fails because "cduce --mlstub" tries to execute
cdo2ml from the current directory, and not from /usr/bin:
address@hidden:~/demexp/debian/demexp/trunk/demexp-0.4$ cduce --mlstub
srv/xml.cdo
/bin/sh: ./cdo2ml: No such file or directory
Instead, if I do :
address@hidden:~/demexp/debian/demexp/trunk/demexp-0.4$ /usr/bin/cduce
--mlstub srv/xml.cdo
everything works correctly.
I've traced down to the Ocaml source code in ocamliface/mlstub.ml,
around line 550, where the path to cdo2ml is built:
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)
Conclusion: when "cduce" is run directly (under the condition that it is
in the PATH), the cdo2ml is wrongly built. However, when "cduce" is
runned with its absolute path, it works.
I've tried Sys.argv.(0) in an ocaml interpreter and it correctly prints
the absolute path even if the ocaml interpreter has been run directly
("ocaml" and not "/usr/bin/ocaml"). So I don't understand why it doesn't
work, but I'm not a Caml expert, so I can't go further.
Is it a bug ? Did I miss something ?
Sincerly,
Thomas
--
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
signature.asc
Description: OpenPGP digital signature
- [Demexp-dev] Problem while using cduce --mlstub,
Thomas Petazzoni <=