caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Amir Chaudhry <amc79@cam.ac.uk>
To: "caml-list@inria.fr List" <caml-list@inria.fr>
Subject: Re: [Caml-list] How to properly do "opam switch"?
Date: Mon, 17 Nov 2014 10:07:14 +0000	[thread overview]
Message-ID: <C1665955-1931-4A58-991B-981FCC3F15DA@cam.ac.uk> (raw)
In-Reply-To: <5465C842.6000103@inria.fr>


On 14 Nov 2014, at 09:15, Francois Berenger <francois.berenger@inria.fr> wrote:

> On 11/14/2014 12:40 AM, Ian Zimmerman wrote:
>> After I do "opam switch 4.02.1" and perform the environment
>> incantations,
> 
> # I guess you mean:
> opam switch 4.02.1
> eval `opam config env`
> 
>> I have a new subtree ~/.opam/4.02.1 with its own bin, man
>> etc. subdirs, and my environment variables now point to it:
>> 
>> [26+0]~$ env | fgrep -i opam
>> CAML_LD_LIBRARY_PATH=/home/itz/.opam/4.02.1/lib/stublibs
>> MANPATH=:/home/itz/.opam/4.02.1/man:/opt/posix/man
>> PERL5LIB=/home/itz/.opam/4.02.1/lib/perl5
>> OCAML_TOPLEVEL_PATH=/home/itz/.opam/4.02.1/lib/toplevel
>> PATH=/home/itz/HOL/bin:/home/itz/.cabal/bin:/home/itz/.opam/4.02.1/bin:/home/itz/eclipse:/home/itz/src/makefiles:/home/itz/.share/bin:/home/itz/bin:/usr/lib/ccache:/opt/ghc/7.8.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/games
>> OPAMKEEPBUILDDIR=y
>> OPAMCOLOR=never
>> 
>> Unfortunately, this subtree contains _only_ the compiler, and no other
>> packages from the earlier (4.01.0) subtree.  In particular, not opam
>> itself!  That means I cannot
> 
> opam is not installed by opam.
> 
> If you mean you want all of your previously installed packages,
> you can do that (using the previous switch you were using):
> 
> opam switch export file.export
> opam switch 4.02.1
> eval `opam config env`
> opam switch import file.export

There's some more information about opam switch on the website, which people might find useful.

opam switch: https://opam.ocaml.org/doc/Usage.html#opamswitch
FAQ: https://opam.ocaml.org/doc/FAQ.html#Whatisaquotswitchquot (and the two questions immediately after it)

Amir

      reply	other threads:[~2014-11-17 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 23:40 Ian Zimmerman
2014-11-14  9:15 ` Francois Berenger
2014-11-17 10:07   ` Amir Chaudhry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C1665955-1931-4A58-991B-981FCC3F15DA@cam.ac.uk \
    --to=amc79@cam.ac.uk \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).