New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linking bug with new pack-semantics for native code in OCaml 3.09 #3825
Comments
Comment author: administrator Je crois observer la même chose que Markus dans son rapport de bug cd ~frisch/ocaml-cduce309 échoue sur: No implementations provided for the following modules: Or typing/env.ml fait seulement référence à Cduce_types.Compunit -- Alain |
Comment author: administrator Voici un patch pour le bug 3825. Il s'agit de faire la traduction des Avec le patch, le problème que j'avais est résolu. diff -aur work/ocaml/asmcomp/clambda.ml /data/ocaml_patched/asmcomp/clambda.ml
and ulambda_switch =
and ulambda_switch =
@@ -172,6 +175,7 @@
(* Simplify primitive operations on integers *)
(* Perform an inline expansion *) @@ -529,7 +534,8 @@
|
Comment author: administrator see also #3833 is this bug fixed? |
Comment author: @alainfrisch As far as I can tell, the bug is still in the current CVS. -- Alain |
Comment author: ogunden Should this really be marked 'minor'? It's basically a blocker for 3.09 if you use -pack. |
Comment author: @damiendoligez fixed by applying Alain's patch |
Comment author: @xavierleroy Did some cosmetic changes in the implementation of Alain's patch, but |
Original bug ID: 3825
Reporter: administrator
Status: closed (set by @damiendoligez on 2005-12-02T10:19:15Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.09.0
Category: ~DO NOT USE (was: OCaml general)
Monitored by: cfloyd pzimmer ogunden @alainfrisch
Bug description
Hi,
I haven't yet managed to come up with a small example for the
following problem, but maybe the description can give you a hint of
what's going wrong.
I have built a module "Dfs_lib" using "-pack dfs_lib". The numerous
contained sub-modules (= files) have, of course, been compiled with
"-for-pack Dfs_lib", as required by the new packing semantics. The
creation of this library package went without problems.
Then I tried linking an application with this library. The compiler
complained that it could not find a particular one of the contained
modules ("No implementation provided for the following modules:
File_utils referenced from cli.cmx"). Interestingly, even though a
lot of modules are part of this library, all of which are used, it
only complained about this one.
Even stranger, I found out that it was only refusing to link if I made
use of a particular function contained in this module. Calling some
other functions (haven't tried all - too many) contained in the same
library module did not cause any linking errors. Even calling library
functions that again call the function in the same module did not
cause problems. The linking problem only pops up when the function is
called from the application rather than the library.
Here is a simplified scheme of the structures involved:
module (= packed library) Dfs_lib = struct
module File_utils = struct
val my_open_out : ... -> causes linking errors when used directly
val canonical_path : ... -> does not cause linking problems when called
val sync_my_open_out : ... -> calls "my_open_out" internally; no
problems when called
end
module Dfs_impl = struct
... -> no problems with anything
end
... -> lots of other modules; no problems
end
None of the observed problems occurred with byte-code, i.e. the
application would always link.
Platform: Linux (Fedora 3), i686.
Best regards,
Markus
P.S.:
Btw., thanks a lot for the new warning features in OCaml-3.09! They
have already been very helpful in finding bugs in my code.
--
Markus Mottl http://www.ocaml.info markus.mottl@gmail.com
The text was updated successfully, but these errors were encountered: