Loading ...
Sorry, an error occurred while loading the content.

Circular Build detected

Expand Messages
  • Romeyke, Andreas
    Hello, There exists a technique to resolve circular build problems? Our workaround was to move all types into a type.ml-Module and link to it from other
    Message 1 of 4 , Aug 24, 2010
    • 0 Attachment
      Hello,

      There exists a technique to resolve circular build problems?

      Our workaround was to move all types into a type.ml-Module and link to
      it from other modules. But this smells wrong.

      I have also tried to do things like:

      bbox.ml:
      type bbox_t = { x0 : int; y0 : int; x1 : int; y1 : int; }

      types.ml:
      type bbox_t = Bbox.bbox_t with sexp

      But the circular build problem will still exists (message from
      ocamlfind):

      Circular build detected
      (helper/helper.cmx already seen in [ layout_analysis/bbox.cmx;
      helper/types.cmx; helper/helper.cmx;
      io/fileio.cmx; io/daemon.cmx;
      daemon_preclassifier.cmx;
      daemon_preclassifier.native ])


      Do you have any hints how to solve such a problem in generally?

      Bye Andreas
      --
      Andreas Romeyke
      - Abteilung Blindenschrift -
      Deutsche Zentralbücherei für Blinde zu Leipzig (DZB)
      Gustav-Adolf-Straße 7, 04105 Leipzig
      Tel: +49 341 7113-..., Fax: +49 341 7113-125
      Internet: www.dzb.de
      E-Mail: andreas.romeyke@...

      --
      --
      Diese e-mail wurde auf Spam und Viren mit Astaro Security Gateway geprueft.


      [Non-text portions of this message have been removed]
    • Romeyke, Andreas
      Hello, ... It would be help, if I could see the derivation of the circular build in detail. Instead of saying foo already seen in [bar; baz] a message like
      Message 2 of 4 , Aug 24, 2010
      • 0 Attachment
        Hello,

        Am Dienstag, den 24.08.2010, 10:12 +0200 schrieb Romeyke, Andreas:

        > But the circular build problem will still exists (message from
        > ocamlfind):
        >
        > Circular build detected
        > (helper/helper.cmx already seen in [ layout_analysis/bbox.cmx;
        > helper/types.cmx; helper/helper.cmx;
        > io/fileio.cmx; io/daemon.cmx;
        > daemon_preclassifier.cmx;
        > daemon_preclassifier.native ])

        It would be help, if I could see the derivation of the circular build in
        detail. Instead of saying "foo already seen in [bar; baz]" a message
        like "in foo the type foo_type already seen in signature of function
        bar_function in bar and in signature baz_type in baz" would be more
        helpful.

        I have taken a deeper look in the code of specified modules, but I am
        unable to find the error yet. :(

        Any hints?

        Bye Andreas

        --
        Andreas Romeyke
        - Abteilung Blindenschrift -
        Deutsche Zentralbücherei für Blinde zu Leipzig (DZB)
        Gustav-Adolf-Straße 7, 04105 Leipzig
        Tel: +49 341 7113-..., Fax: +49 341 7113-125
        Internet: www.dzb.de
        E-Mail: andreas.romeyke@...


        [Non-text portions of this message have been removed]
      • Philippe Veber
        2010/8/24 Romeyke, Andreas ... Not that I know of, and I ve also met this one from time to time. But you can still take a pencil, draw
        Message 3 of 4 , Aug 24, 2010
        • 0 Attachment
          2010/8/24 Romeyke, Andreas <andreas.romeyke@...>

          >
          >
          > Hello,
          >
          > There exists a technique to resolve circular build problems?
          >

          Not that I know of, and I've also met this one from time to time. But you
          can still take a pencil, draw the "logical" dependency graph between your
          modules (I mean, the one you have in mind), and start removing modules from
          your build. In your case, (maybe wrongly) assuming the dependencies are

          helper/helper.cmx -> helper/types.cmx
          layout_analysis/bbox.cmx -> helper/types.cmx
          io/daemon.cmx -> helper/types.cmx
          io/daemon.cmx -> io/fileio.cmx
          io/daemon.cmx -> helper/helper.cmx
          daemon_preclassifier.cmx -> io/daemon.cmx
          daemon_preclassifier.cmx -> layout_analysis/bbox.cmx
          daemon_preclassifier.cmx -> helper/helper.cmx
          daemon_preclassifier.native -> daemon_preclassifier.cmx

          i'd successively remove daemon_preclassifier, io/daemon, io/fileio,
          helper/helper, layout_analysis/bbox, helper/types, each time trying to
          compile the rest. At some point, you should have an unbound module error for
          some already deleted module, instead of the circular build error.

          hope this helps,
          ph.


          > Our workaround was to move all types into a type.ml-Module and link to
          > it from other modules. But this smells wrong.
          >
          > I have also tried to do things like:
          >
          > bbox.ml:
          > type bbox_t = { x0 : int; y0 : int; x1 : int; y1 : int; }
          >
          > types.ml:
          > type bbox_t = Bbox.bbox_t with sexp
          >
          > But the circular build problem will still exists (message from
          > ocamlfind):
          >
          > Circular build detected
          > (helper/helper.cmx already seen in [ layout_analysis/bbox.cmx;
          > helper/types.cmx; helper/helper.cmx;
          > io/fileio.cmx; io/daemon.cmx;
          > daemon_preclassifier.cmx;
          > daemon_preclassifier.native ])
          >
          > Do you have any hints how to solve such a problem in generally?
          >
          > Bye Andreas
          > --
          > Andreas Romeyke
          > - Abteilung Blindenschrift -
          > Deutsche Zentralb�cherei f�r Blinde zu Leipzig (DZB)
          > Gustav-Adolf-Stra�e 7, 04105 Leipzig
          > Tel: +49 341 7113-..., Fax: +49 341 7113-125
          > Internet: www.dzb.de
          > E-Mail: andreas.romeyke@... <andreas.romeyke%40dzb.de>
          >
          > --
          > --
          > Diese e-mail wurde auf Spam und Viren mit Astaro Security Gateway geprueft.
          >
          > [Non-text portions of this message have been removed]
          >
          >
          >


          [Non-text portions of this message have been removed]
        • Adrien
          You can also try ocamldep -modules foo.ml , it will output the dependencies as seen by ocamlbuild. Also, check your open lines: I ve had often had such
          Message 4 of 4 , Aug 24, 2010
          • 0 Attachment
            You can also try 'ocamldep -modules foo.ml', it will output the
            dependencies as seen by ocamlbuild.

            Also, check your "open" lines: I've had often had such errors because
            I moved some code around and forgot to stop opening a module.

            --
            Adrien Nader
          Your message has been successfully submitted and would be delivered to recipients shortly.