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

* Re: [Caml-list] Ocamlbuild, -ocamlc, and -use-ocamlfind in ocaml 4.02.0
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Török Edwin @ 2014-09-19 20:23 UTC (permalink / raw)
  To: caml-list

On 09/19/2014 10:43 PM, Jerry James wrote:
> 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
> [...]
> 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?

Perhaps this will help:
https://github.com/ocaml/opam-repository/blob/master/packages/tplib/tplib.1.3/files/fix-makefile.diff

Best regards,
--Edwin

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

* Re: [Caml-list] Ocamlbuild, -ocamlc, and -use-ocamlfind in ocaml 4.02.0
  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
  1 sibling, 1 reply; 4+ messages in thread
From: Gabriel Scherer @ 2014-09-19 20:28 UTC (permalink / raw)
  To: Jerry James; +Cc: Caml List

[-- 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 --]

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

* Re: [Caml-list] Ocamlbuild, -ocamlc, and -use-ocamlfind in ocaml 4.02.0
  2014-09-19 20:28 ` Gabriel Scherer
@ 2014-09-19 21:18   ` Jerry James
  0 siblings, 0 replies; 4+ messages in thread
From: Jerry James @ 2014-09-19 21:18 UTC (permalink / raw)
  To: Caml List

On Fri, Sep 19, 2014 at 2:28 PM, Gabriel Scherer
<gabriel.scherer@gmail.com> wrote:
> 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.

Thank you very much, Edwin and Gabriel, for the quick replies.  I
appreciate the responses.  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).