Alain Frisch a écrit :
> Just so you can coordinate your efforts: I think Stéphane Glondu was
> also working on extracting a clean patch against OCaml.
So this is what I've done:
http://glondu.net/tmp/ocamlduce-3.11.0.0rc1.tar.gz
The README.ocamlduce is not up-to-date yet. This is how the tarball is
supposed to be used:
* have the OCaml source tarball somewhere, and adapt the Makefile
accordingly
* execute:
make prepare && cd ocaml-*
./configure <your-options>
make -f Makefile.ocamlduce <target>
where <target> is one of:
- world: build only bytecode stuff
- world.opt: build bytecode and native stuff
- installbyte: install only bytecode stuff
- installopt: install only native stuff
- clean: as usual...
* enjoy
There is also a git repository where I intend to maintain this:
http://git.debian.org/?p=users/glondu-guest/ocamlduce.upstream.git
I will move it to forge.ocamlcore.org if I get Alain's blessing (and
when I figure out how to get a git repos there... ping gildor). The
repository tracks directly patched OCaml (from official upstream
tarballs), and there is an additional "dist" target in
Makefile.ocamlduce that makes the distribution tarball.
Some general remarks:
* The toplevel (in bytecode), dump_schema (in native and bytecode) and
Ocsigen (in bytecode) seem to work properly.
* It basically uses only the ocamlbuild-based build system. The
renamings are done at install.
* I added the possibility to omit OCamlDuce during link with the
OCAMLDUCE_LIGHTLINK environment variable. This is needed for a
simpler build of OCamlDuce itself, and it seems to be needed
for ocamlducefind (at least when linking native executables).
* To facilitate the build of OCamlDuce itself, I now require
./configure to be run, and I recompile asmrun and byterun. By
default, the Makefile invokes ./configure with the options quoted
in `ocamlc -where`/Makefile.config (OT, this actually fails because
of quoting problems).
* The changes to expunge.ml seem not to be specific to OCamlDuce, what
about integrating them upstream? or dropping them...
* I do no longer install expungeduce nor ocamlducemktop by default. A
priori, these could be installed and used, but I haven't done much
tests.
* The following warnings are generated during compilation:
> File "bytecomp/translcore.ml", line 785, characters 10-1428:
> Warning P: this pattern-matching is not exhaustive.
> Here is an example of a value that is not matched:
> Text _
>
> File "tools/ocamlprof.ml", line 289, characters 28-501:
> Warning P: this pattern-matching is not exhaustive.
> Here is an example of a value that is not matched:
> Pextexp_id _
>
> File "tools/addlabels.ml", line 281, characters 18-386:
> Warning P: this pattern-matching is not exhaustive.
> Here is an example of a value that is not matched:
> (Pextexp_id _|Pextexp_check (_, _)|Pextexp_to_ml _|Pextexp_from_ml _|
> Pextexp_namespace (_, _, _))
AFAICT, the last two concern files that are not used by installed
stuff, so one could say "I don't care", or just not compile them...
but they are harmless and can guide in future merges.
* The file custom.ml, when compiled with ocamlc and ocamlducec,
provides two .cmi files with different MD5: is this expected?
More technical details concerning merges with OCaml 3.11 (feedback welcome):
* The CVS version 1.43 of bytecomp/lambda.mli changes the type of
Lapply, adding a Location.t argument. This affects
bytecomp/translext.ml. I solved it adding "Location.none" wherever
needed.
* OCamlDuce seems to revert partially the change in CVS version 1.79 of
typing/typemod.ml, line 784/795. I am not sure the current patch is
still correct... but wasn't able to exhibit a runtime error.
BTW, I have not yet looked at Richard's work, so maybe there is possible
improvements there.
Cheers,
--
Stéphane
Attachment:
signature.asc
Description: OpenPGP digital signature