caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jeremy Yallop <yallop@gmail.com>
To: Kenneth Adam Miller <kennethadammiller@gmail.com>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] OCamlJava opam packages troubles
Date: Sun, 19 Jul 2015 00:11:03 +0100	[thread overview]
Message-ID: <CAAxsn=EReT0rZ00e5G9K=N0cFdc5G_4d3xfKK1Yi6hHZuNV6Lw@mail.gmail.com> (raw)
In-Reply-To: <CAK7rcp_cQ1NY7O6tQQKJeRak19G0vtNc4bVQy-3gJxkiJ=bcBQ@mail.gmail.com>

On Sat, Jul 18, 2015 at 9:36 PM, Kenneth Adam Miller
<kennethadammiller@gmail.com> wrote:
> There are duplicate ocamlfind specific opam packages:
>
> opam search ocamlfind
> ...
> ocamlfind-ocj             --  A library manager for OCaml
> ocj-ocamlfind             --  A library manager for OCaml

It appears that ocj-ocamlfind is the one to use, since it corresponds
to a much more recent version than ocamlfind-ocj:

   $ opam show ocamlfind-ocj | grep version
                version: 1.4.0
      installed-version:
      available-version: 1.4.0
   $ opam show ocj-ocamlfind | grep version
                version: 1.5.5
      installed-version:
      available-version: 1.5.5

> I can't continue development using ocamljava until I can install that
> package. I don't know how to continue hunting this error. Basically, the
> library that I'm developing uses -package bytes in the command line, so I
> presume that base.bytes is the opam package that it's talking about.

If you have ocj-ocamlfind installed then I don't think you need
base-bytes as well, since ocj-ocamlfind automatically installs the
bytes package.  (There are two notions of "package" here:
ocamlfind/findlib packages, such as "bytes", which are specified with
the "-package" flag to ocamlfind, and OPAM packages, such as
"base-bytes".  There's not always a one-to-one correspondence between
the two.)

You can check whether the bytes findlib package is available by
running the following command:

   ocamlfind query bytes

Here's how you might build and run a simple program using OCaml-Java,
ocj-ocamlfind and the bytes package:

   $ cat test_bytes.ml
   let () =
     let name = Sys.argv.(0) in
     Printf.printf "%s (length %d)\n" name (Bytes.length name)
   $ ocamlfind java -o test_bytes.jar -package bytes test_bytes.ml
   $ java -jar ./test_bytes.jar
   /tmp/test_bytes.jar (length 19)

Kind regards,

Jeremy.

  reply	other threads:[~2015-07-18 23:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-18 19:36 Kenneth Adam Miller
2015-07-18 19:44 ` Gabriel Scherer
2015-07-18 20:01   ` Kenneth Adam Miller
2015-07-18 20:04     ` Kenneth Adam Miller
2015-07-18 21:41       ` Kenneth Adam Miller
2015-07-18 23:11         ` Jeremy Yallop [this message]
2015-07-21  2:16     ` Louis Gesbert
2015-07-23  1:28       ` Kenneth Adam Miller

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='CAAxsn=EReT0rZ00e5G9K=N0cFdc5G_4d3xfKK1Yi6hHZuNV6Lw@mail.gmail.com' \
    --to=yallop@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=kennethadammiller@gmail.com \
    /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).