Skip to content
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

missing dependencies at byte-code link with mlpack #5752

Closed
vicuna opened this issue Sep 2, 2012 · 20 comments

Comments

@vicuna
Copy link

commented Sep 2, 2012

Original bug ID: 5752
Reporter: @bobzhang
Status: resolved (set by @damiendoligez on 2017-02-27T12:47:35Z)
Resolution: suspended
Priority: normal
Severity: minor
Target version: later
Category: -for ocamlbuild use https://github.com/ocaml/ocamlbuild/issues
Duplicate of: #4592
Related to: #6326
Monitored by: @hcarty

Bug description

This problem was reported twice in caml list. I came across such a problem once again.
https://groups.google.com/forum/?fromgroups=#!searchin/fa.caml/byte$20code$20mlpack/fa.caml/c5Q8q6ZdvDw/nIFGpdVuAaUJ

Thanks

File attachments

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 2, 2012

Comment author: @bobzhang

this patch also worked for my case

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 2, 2012

Comment author: @lefessan

I just add the patch that was proposed on the caml-list, I don't know if it correctly solves the problem (I don't use ocamlbuild...).

Index: ocamlbuild/ocaml_compiler.ml

--- ocamlbuild/ocaml_compiler.ml (revision 10605)
+++ ocamlbuild/ocaml_compiler.ml (working copy)
@@ -144,6 +144,12 @@
(if Pathname.exists (ml-.-"depends") then path_dependencies_of ml else
[])
(if Pathname.exists (mli-.-"depends") then path_dependencies_of mli
else [])
in

  • let modules =
  • if (modules = []) && (Pathname.exists (ml^"pack")) then
  •  List.map (fun s -> (`mandatory, s)) (string_list_of_file (ml^"pack"))
    
  • else
  •  modules
    
  • in
    if modules <> [] && not (Hashtbl.mem cache_prepare_link key) then
    let () = Hashtbl.add cache_prepare_link key true in
    let modules' = List.map (fun (_, x) -> expand_module include_dirs x
    extensions) modules in
@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 2, 2012

Comment author: @bobzhang

which revision?

@vicuna

This comment has been minimized.

Copy link
Author

commented Sep 2, 2012

Comment author: meyer

It's been not committed, as I'm thinking of better way to do this.

@vicuna

This comment has been minimized.

Copy link
Author

commented Nov 5, 2012

Comment author: @bobzhang

meyer, do you have a solution now?

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 10, 2012

Comment author: nlucaroni

My group ran into this issue as well.

Another work around is to mention the missing module in the mli file that defines the mlpack. We narrowed down the root module that was causing the issue in the mlpack through the depends files. Then added an unused function in the mli file containing a type from the missing module.

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 20, 2012

Comment author: Matthieu Lemerre

I also just ran into the issue.

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 21, 2012

Comment author: meyer

hongboz: Looking into this at the moment

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 22, 2012

Comment author: meyer

Eventually I applied the community patch in commit 13154 on trunk - because I didn't find better way.

Could anybody confirm the problem is fixed?

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 24, 2012

Comment author: nlucaroni

Meyer, I'll try the patch at the end of the week. Thanks, I can understand why this solution may not be optimal --As I recall from looking at the patch, it applies to both native and byte code dependency resolution, even though the issue is only in bytecode.

I had a compilation issue with .d.byte as well, but true:debug in the _tags file with byte compilation worked perfectly fine, so I'll follow up on that as well and open a new issue if it warrants it. Thanks,

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 28, 2012

Comment author: nlucaroni

I'm sorry Meyer, the patch may have fixed the issue in the case provided in the forum, but it doesn't fix the issue I've experienced. Maybe the expression of two different issues.

I compiled OCaml with svn commit revision 13167. I get the same error about a missing dependency. I first compiled the .native (worked), then the .byte (failed), then .d.byte (failed, but differently).

Let me know if there is anything I can do to help out further. I'll work on compiling the example on groups, and if that works, trying to define a small example from my source code.

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 28, 2012

Comment author: nlucaroni

Yes, the example at #4592 (with an additional _tags file that was missing), fails even after this patch.

@vicuna

This comment has been minimized.

Copy link
Author

commented Dec 29, 2012

Comment author: meyer

Nlucaroni, sorry to keep you waiting, ocamlbuild didn't have a proper testing infrastructure, now it has. Will have a second tour with this bug over this weekend.

Thanks for the report.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 17, 2013

Comment author: meyer

nlucaroni: Could you submit a testcase or an example that exposes the problem?

Preferably in the form of patch for testsuite, please look at ocamlbuild/testsuite/level0.ml for an example.

Thanks.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 23, 2013

Comment author: nlucaroni

I mentioned the files linked in the duplicate report [0] also fails for me. Otherwise, it's the same thing as mentioned by Ashish [1], and Grégoire Sutre [2]. I only have a large example, and busy getting a release out shortly.

0 : #4592

1 : http://caml.inria.fr/pub/ml-archives/caml-list/2008/06/784c154d0f7b53995c0167ac63fc5bb9.en.html

2 : https://groups.google.com/forum/?fromgroups=#!searchin/fa.caml/byte$20code$20mlpack/fa.caml/c5Q8q6ZdvDw/nIFGpdVuAaUJ

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 23, 2013

Comment author: meyer

0/ Is a user problem, please see the comments
1/ Is fixed
2/ The attachement is broken

Commit 13272 implements testing of both cases and the other one from mailing list.

Nlucaroni, I'd appreciate if you could double check your use case, and see if the trunk version still fails, if not, please update us. I can't reproduce the bug in any of the use cases you have pointed out, so if it still fails, then when you have a little bit of time, please try to reduce it to a small test case (preferably as a patch to level0.ml)

Thanks.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 24, 2013

Comment author: nlucaroni

Thanks meyer. I double checked the comment in [0] and you are right, the issues are different.

So I modified it with something along the issue we are having and I was able to recreate the issue, see attachment to this issue. It looks like ocaml 4.01.0+dev10-2012-10-16 builds the test case I uploaded properly. This must be the patch you submitted above? but not my larger project. I'll try to minimize it some other time.

@vicuna

This comment has been minimized.

Copy link
Author

commented Jan 16, 2015

Comment author: @damiendoligez

I confirm the test case "ex.zip" builds correctly on 4.02.1, so we're now waiting for a new repro case.

@vicuna

This comment has been minimized.

Copy link
Author

commented Nov 23, 2015

Comment author: @xavierleroy

In the absence of new information, can we consider this issue fixed in 4.02.1?

@vicuna

This comment has been minimized.

Copy link
Author

commented Feb 27, 2017

Comment author: @damiendoligez

ocamlbuild is now a separate project that lives on GitHub.
PR transferred to ocaml/ocamlbuild#163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.