| Anonymous | Login | Signup for a new account | 2013-05-20 11:12 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 | ||||||
| 0003922 | OCaml | OCaml general | public | 2005-12-13 18:39 | 2012-09-11 14:49 | ||||||
| Reporter | frisch | ||||||||||
| Assigned To | |||||||||||
| Priority | low | Severity | text | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.09.0 | ||||||||||
| Target Version | 4.00.2+dev | Fixed in Version | |||||||||
| Summary | 0003922: Detecter inclusions multiples de .cmx | ||||||||||
| Description | Le linker natif détecte en général si on lui demande de mettre plusieurs fois le même module: ../ocaml/ocamlopt -o bug y.cmx y.cmx Files y.cmx and y.cmx both define a module named Y Par contre, si l'on -pack un module, la détection ne marche plus: ../ocaml/ocamlopt -for-pack X -c a.ml ../ocaml/ocamlopt -pack -o x.cmx a.cmx ../ocaml/ocamlopt -o bug a.cmx x.cmx a.o: In function `camlX__A__data_begin': : multiple definition of `camlX__A__data_begin' x.o:: first defined here a.o: In function `camlX__A__entry': : multiple definition of `camlX__A__code_begin' x.o:: first defined here a.o: In function `camlX__A': : multiple definition of `camlX__A' x.o:: first defined here a.o: In function `camlX__A__entry': : multiple definition of `camlX__A__entry' x.o:: first defined here a.o: In function `camlX__A__code_end': : multiple definition of `camlX__A__code_end' x.o:: first defined here a.o: In function `camlX__A__data_end': : multiple definition of `camlX__A__data_end' x.o:: first defined here a.o: In function `camlX__A__frametable': : multiple definition of `camlX__A__frametable' x.o:: first defined here collect2: ld returned 1 exit status Error during linking | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0003434) frisch (developer) 2005-12-13 18:59 |
Voilà un patch qui implémente le test. Ça donne qqchose comme: Files a.cmx and x.cmx both define a module named X__A (pas très joli). |
|
(0006741) lefessan (developer) 2012-01-19 22:17 |
I would say that the problem is that you are trying to link a .cmx directly, while it had been generated for packing. I think the compiler should complain not about the double link, but about linking instead of packing. |
|
(0008063) doligez (manager) 2012-09-11 14:10 |
I agree with Fabrice: the problem appears only because you are linking a -for-pack'd module. |
|
(0008066) frisch (developer) 2012-09-11 14:49 |
Is it forbidden to link directly a -for-pack'd module ? I agree this is bad style in general, but I was not aware it was forbidden (yet). It could be useful to allow it, e.g. for compiling compiler modules for -for-pack, so as to allow to include them in a third-party project without risking name collisions. But I wouldn't object to disallow it explicitly (probably in byte-code as well). |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2005-12-13 18:39 | frisch | New Issue | |
| 2005-12-13 18:59 | frisch | File Added: patch | |
| 2005-12-13 18:59 | frisch | Note Added: 0003434 | |
| 2005-12-15 13:16 | doligez | Priority | normal => low |
| 2005-12-15 13:16 | doligez | Severity | minor => text |
| 2005-12-15 13:16 | doligez | Status | new => acknowledged |
| 2012-01-19 22:17 | lefessan | Note Added: 0006741 | |
| 2012-09-06 16:44 | doligez | Target Version | => 4.00.1+dev |
| 2012-09-11 14:10 | doligez | Note Added: 0008063 | |
| 2012-09-11 14:10 | doligez | Target Version | 4.00.1+dev => 4.00.2+dev |
| 2012-09-11 14:49 | frisch | Note Added: 0008066 | |
| Copyright © 2000 - 2011 MantisBT Group |