caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Jerry James <loganjerry@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocamlbuild, -ocamlc, and -use-ocamlfind in ocaml 4.02.0
Date: Fri, 19 Sep 2014 22:28:29 +0200	[thread overview]
Message-ID: <CAPFanBFWUxK4uH9GiuPVMQJ-AP1CuTh+XHiU8aB6Ba38i1EYrA@mail.gmail.com> (raw)
In-Reply-To: <CAHCOHQmP2ZdpdQ74CoH4wMux2mYL_U1cS5Hv2kaskmkrwP-HMA@mail.gmail.com>

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

The solution is simply to remove the -ocamlc and -ocamlopt stuff from the
Makefile. I have no idea why there were there, they seem buggy (they should
stop the build for users that don't have ocp-ocamlc.opt, which is all of
them); the reason why they didn't hurt before is because of the PR#6300
bug, which is that the -ocamlc, -ocamlopt option where ignored when
-use-ocamlfind was also used.

On Fri, Sep 19, 2014 at 9:43 PM, Jerry James <loganjerry@gmail.com> wrote:

> 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/
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

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

  parent reply	other threads:[~2014-09-19 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-19 19:43 Jerry James
2014-09-19 20:23 ` Török Edwin
2014-09-19 20:28 ` Gabriel Scherer [this message]
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=CAPFanBFWUxK4uH9GiuPVMQJ-AP1CuTh+XHiU8aB6Ba38i1EYrA@mail.gmail.com \
    --to=gabriel.scherer@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=loganjerry@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).