Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005752OCamlOCamlbuild (the tool)public2012-09-02 03:572015-07-15 15:25
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target Version4.03.0+devFixed in Version 
Summary0005752: missing dependencies at byte-code link with mlpack
DescriptionThis problem was reported twice in caml list. I came across such a problem once again.!searchin/fa.caml/byte$20code$20mlpack/fa.caml/c5Q8q6ZdvDw/nIFGpdVuAaUJ [^]

TagsNo tags attached.
Attached Fileszip file icon [^] (1,882 bytes) 2013-01-24 01:14

- Relationships
duplicate of 0004592resolvedmeyer .mlpack dependencies not considered while building? 
related to 0006326resolvedgasche mlpack file not included correctly 

-  Notes
hongboz (developer)
2012-09-02 04:24

this patch also worked for my case
lefessan (developer)
2012-09-02 14:04

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/
--- ocamlbuild/ (revision 10605)
+++ ocamlbuild/ (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 [])
+ let modules =
+ if (modules = []) && (Pathname.exists (ml^"pack")) then
+ (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' = (fun (_, x) -> expand_module include_dirs x
extensions) modules in
hongboz (developer)
2012-09-02 16:42

which revision?
meyer (developer)
2012-09-02 17:30

It's been not committed, as I'm thinking of better way to do this.
hongboz (developer)
2012-11-05 21:09

meyer, do you have a solution now?
nlucaroni (reporter)
2012-12-10 23:29

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.
Matthieu Lemerre (reporter)
2012-12-21 00:51

I also just ran into the issue.
meyer (developer)
2012-12-22 00:26
edited on: 2012-12-22 00:26

hongboz: Looking into this at the moment

meyer (developer)
2012-12-22 02:37

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?
nlucaroni (reporter)
2012-12-24 04:19

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,
nlucaroni (reporter)
2012-12-28 21:41

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.
nlucaroni (reporter)
2012-12-28 21:52

Yes, the example at [^] (with an additional _tags file that was missing), fails even after this patch.
meyer (developer)
2012-12-29 05:41

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.
meyer (developer)
2013-01-17 08:25

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/ for an example.

nlucaroni (reporter)
2013-01-23 23:45

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 : [^]

1 : [^]

2 :!searchin/fa.caml/byte$20code$20mlpack/fa.caml/c5Q8q6ZdvDw/nIFGpdVuAaUJ [^]
meyer (developer)
2013-01-24 00:46

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

nlucaroni (reporter)
2013-01-24 01:25

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.
doligez (administrator)
2015-01-16 17:58

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

- Issue History
Date Modified Username Field Change
2012-09-02 03:57 hongboz New Issue
2012-09-02 04:24 hongboz Note Added: 0007999
2012-09-02 04:43 meyer Assigned To => meyer
2012-09-02 04:43 meyer Status new => assigned
2012-09-02 14:04 lefessan Note Added: 0008004
2012-09-02 16:42 hongboz Note Added: 0008005
2012-09-02 17:30 meyer Note Added: 0008006
2012-09-03 01:16 meyer Relationship added duplicate of 0004592
2012-09-06 16:43 doligez Target Version => 4.00.1+dev
2012-09-27 14:37 doligez Target Version 4.00.1+dev => 4.00.2+dev
2012-11-05 21:09 hongboz Note Added: 0008423
2012-12-10 23:29 nlucaroni Note Added: 0008594
2012-12-21 00:51 Matthieu Lemerre Note Added: 0008638
2012-12-22 00:26 meyer Note Added: 0008639
2012-12-22 00:26 meyer Note Edited: 0008639 View Revisions
2012-12-22 02:37 meyer Note Added: 0008641
2012-12-24 04:19 nlucaroni Note Added: 0008647
2012-12-28 21:41 nlucaroni Note Added: 0008658
2012-12-28 21:52 nlucaroni Note Added: 0008659
2012-12-29 05:41 meyer Note Added: 0008662
2013-01-17 08:25 meyer Note Added: 0008769
2013-01-23 23:45 nlucaroni Note Added: 0008786
2013-01-24 00:46 meyer Note Added: 0008788
2013-01-24 01:14 nlucaroni File Added:
2013-01-24 01:25 nlucaroni Note Added: 0008789
2013-06-16 18:35 gasche Status assigned => feedback
2013-06-16 18:35 gasche Target Version 4.00.2+dev => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev
2014-01-21 11:53 doligez Assigned To meyer =>
2014-02-19 20:32 doligez Relationship added related to 0006326
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-31 11:46 doligez Status feedback => acknowledged
2014-07-31 11:46 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-26 20:38 doligez Target Version undecided => 4.02.2+dev / +rc1
2015-01-16 17:48 doligez File Added: patch-ocamlbuild-link-pack-deps.diff
2015-01-16 17:48 doligez Tag Attached: patch
2015-01-16 17:58 doligez File Deleted: patch-ocamlbuild-link-pack-deps.diff
2015-01-16 17:58 doligez Tag Detached: patch
2015-01-16 17:58 doligez Note Added: 0013122
2015-01-16 17:59 doligez Status acknowledged => feedback
2015-01-16 17:59 doligez Target Version 4.02.2+dev / +rc1 => 4.02.3+dev
2015-07-15 15:25 doligez Target Version 4.02.3+dev => 4.03.0+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker