Re: About this ocaml versioning stuff
On Wed, Jul 16, 2003 at 11:05:46PM +0200, Sven Luther wrote:
[...]
> > As I am pretty inexperienced with ocaml, I dare asking this question:
> > when multiple ocaml versions are installed, could ocamlrun be a wrapper
> > and call the right version? E.g. if the program was compiled against
> > ocaml 3.07, it calls ocamlrun-3.07.
> > This way bytecodes have a #!/usr/bin/ocamlrun shebang line like other
> > distros, and they are not broken when ocaml is upgraded.
> > Of course I have no idea whether this is doable.
>
> No, this does not work. When you upgrade the ocaml compiler suite, you
> have to recompile all the programs so that they will run with the new
> ocamlrun. the ocamlc compiler embeds the #!/usr/bin/ocamlrun line
> corresponding on where its actual compiler is. Thus in the suffix
> version, ocamlc-3.07 will embedd ocqamlrun-3.07, even if it was called
> trough a ocamlc symlink.
Sven, you misunderstood my point, I will try to explain it better.
Given that ocamlc-3.06 ships ocamlrun-3.06 and ocamlc-3.07 ships
ocamlrun-3.07, imagine now that /usr/bin/ocamlrun is a shell
script (for instance) which detects the ocaml version needed to run
the bytecode and calls the right version.
This is somewhat similar to the autoconf wrapper.
Denis
Reply to: