| Anonymous | Login | Signup for a new account | 2013-06-20 09:15 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0005208 | OCaml | OCamlbuild (the tool) | public | 2011-01-20 17:36 | 2012-09-19 15:00 | ||||||
| Reporter | dbuenzli | ||||||||||
| Assigned To | xclerc | ||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||||
| Status | feedback | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.12.0 | ||||||||||
| Target Version | later | Fixed in Version | |||||||||
| Summary | 0005208: cmo -> cma rule brings too much dependencies in | ||||||||||
| Description | When ocamlbuild builds a cma from a cmo it brings too much deps in the cma. For example : > cd /tmp > echo "let f x = x + 1" > a.ml > echo "let f x = A.f x" > b.ml > ocamlbuild -classic-display b.cma /usr/local/bin/ocamldep.opt -modules b.ml > b.ml.depends /usr/local/bin/ocamldep.opt -modules a.ml > a.ml.depends /usr/local/bin/ocamlc.opt -c -o a.cmo a.ml /usr/local/bin/ocamlc.opt -c -o b.cmo b.ml /usr/local/bin/ocamlc.opt -a a.cmo b.cmo -o b.cma However I expected only b.cmo in that cma for the following reason : > ocamlbuild -classic-display b.cmxs /usr/local/bin/ocamlopt.opt -shared b.cmx -o b.cmxs Since cma are the pendant of cmxs for dynamically loaded plugins I expect them to build the same way w.r.t. dependencies. And for plugins you don't want automatically these dependencies since it's likely to be the plugin api itself which will be in the program loading the plugin. Best, Daniel | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0005787) ertai (developer) 2011-01-20 20:32 |
If you want to manually choose the list of modules which goes into the library then I suggest you the use of .mllib files. The rule from .cmo to .cma takes the transitive closure of its dependencies by default. HTH |
|
(0005788) dbuenzli (reporter) 2011-01-20 20:40 |
I understand that but I think that's not what you want in practice and it's inconsistant with the rule for .cmx -> .cmxs. |
|
(0008115) doligez (manager) 2012-09-19 15:00 |
But it's consistent for the rule for .cmx -> .cmxa. The problem is that .cma is the pendant of both .cmxa and .cmxs and ocamlbuild cannot know whether you are going to dynlink that .cma or link it normally. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2011-01-20 17:36 | dbuenzli | New Issue | |
| 2011-01-20 20:32 | ertai | Note Added: 0005787 | |
| 2011-01-20 20:40 | dbuenzli | Note Added: 0005788 | |
| 2011-01-21 14:25 | doligez | Status | new => acknowledged |
| 2011-06-06 13:01 | xclerc | Status | acknowledged => assigned |
| 2011-06-06 13:01 | xclerc | Assigned To | => xclerc |
| 2012-02-02 15:17 | protz | Category | OCamlbuild => OCamlbuild (the tool) |
| 2012-07-10 17:16 | doligez | Target Version | => 4.01.0+dev |
| 2012-07-31 13:36 | doligez | Target Version | 4.01.0+dev => 4.00.1+dev |
| 2012-09-19 15:00 | doligez | Note Added: 0008115 | |
| 2012-09-19 15:00 | doligez | Status | assigned => feedback |
| 2012-09-19 15:00 | doligez | Target Version | 4.00.1+dev => later |
| Copyright © 2000 - 2011 MantisBT Group |