caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jerry James <loganjerry@gmail.com>
To: Caml List <caml-list@inria.fr>
Subject: [Caml-list] Ocamlbuild, -ocamlc, and -use-ocamlfind in ocaml 4.02.0
Date: Fri, 19 Sep 2014 13:43:46 -0600	[thread overview]
Message-ID: <CAHCOHQmP2ZdpdQ74CoH4wMux2mYL_U1cS5Hv2kaskmkrwP-HMA@mail.gmail.com> (raw)

Greetings,

I maintain a few ocaml packages for the Fedora Linux distribution,
including tplib (https://gforge.inria.fr/projects/tplib).  Fedora
Rawhide recently updated to ocaml 4.02.0.  Now tplib does not build
successfully anymore.  It uses this command:

ocamlbuild -cflag -g -lflag -g -ocamlc ocp-ocamlc.opt -ocamlopt
ocp-ocamlopt.opt -classic-display -no-links -build-dir _build
-use-ocamlfind src/tplib.mllib src/numeric.cmi src/semiring.cmi
src/vector.cmi src/halfspace.cmi src/hypergraph.cmi src/tplib_core.cmi
src/tplib_abstract.cmi src/numeric_plugins/zarith_plugin.cmxs
src/bindings/tplib_double_callback.obj.o
src/bindings/tplib_rational_callback.obj.o src/compute_ext_rays.native
src/compute_ext_rays_polar.native src/compute_halfspaces.native
src/compute_tangent_hypergraph.native
src/compute_minimal_external_representations.native
src/compute_tropical_complex.native

which prompts ocamlbuild to issue this command:

ocamlfind ocp-ocamlopt.opt unix.cmxa -I /usr/lib64/ocaml/ocamlbuild
/usr/lib64/ocaml/ocamlbuild/ocamlbuildlib.cmxa -g -linkpkg
myocamlbuild.ml /usr/lib64/ocaml/ocamlbuild/ocamlbuild.cmx -o
myocamlbuild

but ocamlfind doesn't know anything about an ocp-ocamlopt.opt command:

Usage: ocamlfind query        [-help | other options] <package_name> ...
   or: ocamlfind ocamlc       [-help | other options] <file> ...
   or: ocamlfind ocamlcp      [-help | other options] <file> ...
   or: ocamlfind ocamlmklib   [-help | other options] <file> ...
   or: ocamlfind ocamlmktop   [-help | other options] <file> ...
   or: ocamlfind ocamlopt     [-help | other options] <file> ...
   or: ocamlfind ocamloptp    [-help | other options] <file> ...
   or: ocamlfind ocamldep     [-help | other options] <file> ...
   or: ocamlfind ocamlbrowser [-help | other options]
   or: ocamlfind ocamldoc     [-help | other options] <file> ...
   or: ocamlfind install      [-help | other options] <package_name> <file> ...
   or: ocamlfind remove       [-help | other options] <package_name>
   or: ocamlfind printconf    [-help] [variable]
   or: ocamlfind list
   or: ocamlfind pkg/cmd arg ...
Select toolchain with:
  ocamlfind -toolchain <t> <command>
Abbreviations:
  e.g. ocamlfind opt instead of ocamlfind ocamlopt
Command exited with code 2.

If I build with for Fedora 21 (ocaml 4.01.0) instead, that same
ocambuild invocation results in this command being issued:

ocamlfind ocamlopt unix.cmxa -I /usr/lib64/ocaml/ocamlbuild
/usr/lib64/ocaml/ocamlbuild/ocamlbuildlib.cmxa -g -linkpkg
myocamlbuild.ml /usr/lib64/ocaml/ocamlbuild/ocamlbuild.cmx -o
myocamlbuild

which works.  I found PR#6300, which deals with this issue, but don't
understand what I need to do.  I tried moving the -use-ocamlfind flag
to the first position on the command line, but that didn't help.  How
does the ocamlbuild invocation need to be changed to avoid this
problem?

Thank you and regards,
-- 
Jerry James
http://www.jamezone.org/

             reply	other threads:[~2014-09-19 19:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 19:43 Jerry James [this message]
2014-09-19 20:23 ` Török Edwin
2014-09-19 20:28 ` Gabriel Scherer
2014-09-19 21:18   ` Jerry James

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=CAHCOHQmP2ZdpdQ74CoH4wMux2mYL_U1cS5Hv2kaskmkrwP-HMA@mail.gmail.com \
    --to=loganjerry@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).