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