caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jordan W <jordojw@gmail.com>
To: "caml-list@inria.fr" <caml-list@inria.fr>
Subject: [Caml-list] Problem with native compilation of mlpacks in ocamlbuild.
Date: Sun, 2 Aug 2015 22:38:29 -0700	[thread overview]
Message-ID: <CAPOA5_6NonZsx_p8zD-7YNMwcPgowkxfYLW2ZTZVzF_1Dbwwyw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

It is well known that there are unresolved issues with native compilation
of mlpacks.

Consider an mlpack that successfully byte code compiles:

path/to/depOne.mlpack consisting of:

depOne/A
depOne/B

Where depOne/a.ml contains
    let foo = "hi"
Where depOne/b.ml contains
    let foo = A.foo

While this byte code compiles without issue, modules inside of mlpacks will
not be *native* compiled with their respective -for-pack X. To correct
this, it has been suggested that a _tags file be created with the following:

<path/to/depOne/**/*.cmx>: for-pack(DepOne)


With this, both native and byte compilation succeed for the previous
example.
However, *because* B references A, then if B is located in another
directory within the depOne root, native compilation will once again fail,
even though byte compilation succeeds - even with all of the special hacks
that have been suggested (_tags etc).

For example:
Consider if path/to/depOne.mlpack consisted of the following items,
pointing to the new respective locations of A, B where B still refers to A
as it did before.

depOne/A
depOne/deeper/B

In this case, native compilation fails, and byte compilation succeeds.

The errors that I see are:

File "path/to/depOne.cmx", line 1:
Error: Files path/to/depOne/deeperDir/b.cmx
       and path/to/depOne/a.cmx
       make inconsistent assumptions over implementation A
Command exited with code 1.


Can anyone suggest a fix for this?

Thank you,
Jordan

[-- Attachment #2: Type: text/html, Size: 2075 bytes --]

             reply	other threads:[~2015-08-03  5:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03  5:38 Jordan W [this message]
2015-08-03 12:57 ` Ashish Agarwal
2015-08-04 20:39   ` Jordan W
2015-08-04 21:19     ` Ashish Agarwal
2015-08-05  5:00 ` Gabriel Scherer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPOA5_6NonZsx_p8zD-7YNMwcPgowkxfYLW2ZTZVzF_1Dbwwyw@mail.gmail.com \
    --to=jordojw@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).