Re: Conflicting installation advice

"'Mr. Herr' [email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
I like the self contained opam+ocaml install too, because I also noticed unwanted 
interference between packages
installed using the OS package manager, and ocaml/opam packages.

Not even the "ocamlrun" runtime for bytecode compiled files is helpful (thinking "hey 
I only need ocamlrun on my machines"),
because the binary and also the compiled bytecode are both versioned and must match.

So now for the self contained opam+ocaml install - this works fine for me, just did 
it again in a VM:

Get the opam binary: see http://opam.ocaml.org/doc/Install.html "Binary installer". I 
usually copy the link
and download the file with wget.

You'd better do chmod +x on the file, then run it as root: ./opam_installer.sh 
/usr/local/bin

Now look at /usr/local/bin, the newest binary from github should be there, compiled 
to native code, portable.

Go back to normal user, and do "opam init --comp 4.02.3"

This will set up you local ~/.opam directory and install the 4.02.3 compiler in it.
I let the installer change my .profile - of course you can check what has been done.

After a "eval $(opam config env)" you can see the result:

strobel@u144-icinga:~$ opam list
# Installed packages for 4.02.3:
base-bigarray  base  Bigarray library distributed with the OCaml compiler
base-threads   base  Threads library distributed with the OCaml compiler
base-unix      base  Unix library distributed with the OCaml compiler

Not even findlib is there - very basic indeed.

 From now on you should have the aspcud solver on your system, it not you risk to have
unneeded downgrades and recompiles when installing and upgrading packages.

Now happy opamming and ocameling ...

/Str.


On 15.08.2015 15:46, Hendrik Boom [email protected] [ocaml_beginners] wrote:
>
> On https://ocaml.org/docs/install.html it says:
>
> OPAM
>
> OPAM is a package manager for OCaml. It is the recommended method to
> install the OCaml compiler and OCaml packages.
>
> Nice. One specialised installer to install everything ocaml, which
> enables me to keep things more up-to-date than my distro might.
>
> And on https://opam.ocaml.org/doc/Install.html it says the preferred way
> to install opam is from my distro's package repository.
>
> So thats the bootstrap mechanism.
>
> But when I ask aptitude to install opam, it also installs a huge number
> of other packages, such as ocaml. Not surprising, because opam installs
> packages from source.
>
> This would seem to put ocaml, and all those other packages outside the
> scope of opam. Too late to install ocaml using opam.
>
> If I persist in using opam to install ocamland other libraries, how do
> I distinguish the two installations -- the one by opam and the one
> from aptitude?
>
> -- hendrik
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.