Ashish Agarwal | 7 Nov 20:12
Picon

circular dependency error only with native library

I'm getting a circular dependency error when compiling a native library, but
the byte code library compiles fine. How is this possible? I'm using
ocamlbuild, and as far as I can tell, there is no circular dependency. I
would appreciate any suggestions on how to investigate this.

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity
Visit Your Group
Yahoo! Finance

It's Now Personal

Guides, news,

advice & more.

Search Ads

Get new customers.

List your web site

in Yahoo! Search.

Check out the

Y! Groups blog

Stay up to speed

on all things Groups!

.

__,_._,___
ygrek | 8 Nov 09:16
Picon

Re: circular dependency error only with native library

On Fri, 7 Nov 2008 14:15:20 -0500
"Ashish Agarwal" <agarwal1975 <at> gmail.com> wrote:

> I'm getting a circular dependency error when compiling a native library, but
> the byte code library compiles fine. How is this possible? I'm using
> ocamlbuild, and as far as I can tell, there is no circular dependency. I
> would appreciate any suggestions on how to investigate this.

Maybe http://brion.inria.fr/gallium/index.php/New_kinds_of_build_errors#Circular_build_instead_of_unbound_symbol

--
ygrek

__._,_.___
Recent Activity
    Visit Your Group
    Yahoo! Finance

    It's Now Personal

    Guides, news,

    advice & more.

    Need traffic?

    Drive customers

    With search ads

    on Yahoo!

    Special K Group

    on Yahoo! Groups

    Learn how others

    are losing pounds.

    .

    __,_._,___
    Ashish Agarwal | 8 Nov 20:32
    Picon

    Re: circular dependency error only with native library

    I figured out the problem. My set up was
    a.ml
    b.ml (* uses module C *)
    c.ml (* uses module A *)
    mylib.mlpack (* packs modules A and B *)

    If you ignore mylib, then we have the topological order B --> C --> A.
    However, actually there is no module A and B, only Mylib.A and Mylib.B.
    Thus, C actually requires Mylib.A, which means Mylib must be first compiled.
    However, Mylib requires B, which requires C, and there's the recursion.

    What's odd is that the compilation behavior is different for byte code and
    native code. I guess the byte code compiler does packing later than the
    native code compiler. The correct behavior should be that compilation of
    c.ml fails with an "unidentified module A" error because in c.ml, I am
    referring to A directly, not Mylib.A. Is this a bug?

    On Sat, Nov 8, 2008 at 3:16 AM, ygrek <ygrekheretix <at> gmail.com> wrote:

    > On Fri, 7 Nov 2008 14:15:20 -0500
    > "Ashish Agarwal" <agarwal1975 <at> gmail.com <agarwal1975%40gmail.com>> wrote:
    >
    > > I'm getting a circular dependency error when compiling a native library,
    > but
    > > the byte code library compiles fine. How is this possible? I'm using
    > > ocamlbuild, and as far as I can tell, there is no circular dependency. I
    > > would appreciate any suggestions on how to investigate this.
    >
    > Maybe
    > http://brion.inria.fr/gallium/index.php/New_kinds_of_build_errors#Circular_build_instead_of_unbound_symbol
    >
    > --
    > ygrek
    >
    >
    >

    [Non-text portions of this message have been removed]

    __._,_.___
    Recent Activity
      Visit Your Group
      Yahoo! Finance

      It's Now Personal

      Guides, news,

      advice & more.

      New business?

      Get new customers.

      List your web site

      in Yahoo! Search.

      Everyday Wellness

      on Yahoo! Groups

      Find groups that will

      help you stay fit.

      .

      __,_._,___

      Gmane