caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Ocamlbuild, -ocamlc, and -use-ocamlfind in ocaml 4.02.0
@ 2014-09-19 19:43 Jerry James
  2014-09-19 20:23 ` Török Edwin
  2014-09-19 20:28 ` Gabriel Scherer
  0 siblings, 2 replies; 4+ messages in thread
From: Jerry James @ 2014-09-19 19:43 UTC (permalink / raw)
  To: Caml List

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/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-09-19 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-19 19:43 [Caml-list] Ocamlbuild, -ocamlc, and -use-ocamlfind in ocaml 4.02.0 Jerry James
2014-09-19 20:23 ` Török Edwin
2014-09-19 20:28 ` Gabriel Scherer
2014-09-19 21:18   ` Jerry James

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).