Closed jhjourdan closed 5 months ago
That's a bit odd, no error is reported here.
Is this a switch with ocamlnat enabled ? There was some kind of changes upstream I think to minimize the differences between the toplevel, not sure if it affected down in some way.
This switch supports native compilation (i.e., it does have ocamlopt
), but does not have an ocamlnat
executable. How should I activate it via opam?
No. But for some reason it seems that it tries to build the ocamlnat
support which is the reason why it fails. The support is discovered via this. Are you sure you don't have ocamlnat
in your PATH ?
Are you sure you don't have ocamlnat in your PATH ?
I do have another ocamlnat
in my path. It comes from the OCaml installation of my system. You are right that if I hide it, then down
installs correctly.
So, as far as I'm concerned, my problem is solved. But I'm leaving this issue open because the way ocamlnat
is detected is not robust enough.
So, as far as I'm concerned, my problem is solved. But I'm leaving this issue open because the way
ocamlnat
is detected is not robust enough.
If you have something else to suggest why not. But if you ask me, in general having a mix of tools of the same toolchain from different installs in your PATH is definitively asking for trouble.
Well, I never had a problem up to now. Also, with opam, this is a rather standard situation, I think.
An alternative detection mechanism could be to use which
to search for the path of ocamlc
, and then search for ocamlnat
in the same path.
Anyway, feel free to close the issue if you consider you won't fix it.
Well, I never had a problem up to now. Also, with opam, this is a rather standard situation, I think.
It is definitively standard problems.
E.g. your system ocamlfind
is being used with your switch compiler because your switch has no ocamlfind
installed. On macos people constantly run into problems because they install alternate C compilers or even another uname
with brew
or macports
which makes their OCaml install explode.
And the day we will have a combination of cross-compilation and byte-code or native-code only switches, everything will simply melt-down :-)
The problem is a bit more general here and I'm not sure it's necessarily the best idea to try to solve the problem at the package level.
It seems I have missed the sanitization of the ocamlnat
toploop API upstream made in https://github.com/ocaml/ocaml/pull/10061.
Not only does it drastically simplify down
's build and implementation. It also means we no longer have to probe for ocamlnat
.
So… problem solved! And thanks @AltGr for the upstream work.
It seems like Down does not support OCaml 5. When I try to install it via opam, I get the following error message:
(You can ignore the name of the switch "4.14.0": I'm recycling this switch but actually use OCaml 5.1.1 in it.