caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Installing 4.02
@ 2016-03-06 10:22 Mick Sulley
  2016-03-06 11:20 ` Leo White
  2016-03-06 11:23 ` Hendrik Boom
  0 siblings, 2 replies; 5+ messages in thread
From: Mick Sulley @ 2016-03-06 10:22 UTC (permalink / raw)
  To: caml-list

Hi,

Totally new to OCaml.  I am trying to install OCaml version 4.02 or 
higher on a Raspberry Pi running Raspbian.  I have OPAM and OCaml 4.01 
installed but if I enter
opam switch 4.02.1
I get
pi@raspberrypi:~/geneweb $ opam switch 4.02.1
# To setup the new switch in the current shell, you need to run:
eval `opam config env`

I then try -
pi@raspberrypi:~/geneweb $ eval 'opam config env'
CAML_LD_LIBRARY_PATH="/home/pi/.opam/4.02.1/lib/stublibs"; export 
CAML_LD_LIBRARY_PATH;
MANPATH=":/home/pi/.opam/4.02.1/man"; export MANPATH;
PERL5LIB="/home/pi/.opam/4.02.1/lib/perl5"; export PERL5LIB;
OCAML_TOPLEVEL_PATH="/home/pi/.opam/4.02.1/lib/toplevel"; export 
OCAML_TOPLEVEL_PATH;
PATH="/home/pi/.opam/4.02.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games"; 
export PATH;

pi@raspberrypi:~/geneweb $ opam switch 4.02.1
# To setup the new switch in the current shell, you need to run:
eval `opam config env`

How do I get to 4.02?

Thanks
Mick


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

* Re: [Caml-list] Installing 4.02
  2016-03-06 10:22 [Caml-list] Installing 4.02 Mick Sulley
@ 2016-03-06 11:20 ` Leo White
  2016-03-06 11:23 ` Hendrik Boom
  1 sibling, 0 replies; 5+ messages in thread
From: Leo White @ 2016-03-06 11:20 UTC (permalink / raw)
  To: Mick Sulley, caml-list

[-- Attachment #1: Type: text/plain, Size: 100 bytes --]

> eval 'opam config env'

Those should be ` (backtick) rather than ' (single quote).

Regards, 

Leo

[-- Attachment #2: Type: text/html, Size: 139 bytes --]

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

* Re: [Caml-list] Installing 4.02
  2016-03-06 10:22 [Caml-list] Installing 4.02 Mick Sulley
  2016-03-06 11:20 ` Leo White
@ 2016-03-06 11:23 ` Hendrik Boom
  2016-03-06 14:15   ` Gabriel Scherer
  1 sibling, 1 reply; 5+ messages in thread
From: Hendrik Boom @ 2016-03-06 11:23 UTC (permalink / raw)
  To: caml-list

On Sun, Mar 06, 2016 at 10:22:21AM +0000, Mick Sulley wrote:
> Hi,
> 
> Totally new to OCaml.  I am trying to install OCaml version 4.02 or
> higher on a Raspberry Pi running Raspbian.  I have OPAM and OCaml
> 4.01 installed but if I enter
> opam switch 4.02.1
> I get
> pi@raspberrypi:~/geneweb $ opam switch 4.02.1
> # To setup the new switch in the current shell, you need to run:
> eval `opam config env`
> 

I've just struggled with this stuff on a 32-bit x86 Linux.
The opam switch command alters the dotfiles (things like .bashrd)
so that the next time you log in or start a shell, the environment 
variables are set to the new switch.

opam config env

generates the list of command you saw below:

> I then try -
> pi@raspberrypi:~/geneweb $ eval 'opam config env'
> CAML_LD_LIBRARY_PATH="/home/pi/.opam/4.02.1/lib/stublibs"; export
> CAML_LD_LIBRARY_PATH;
> MANPATH=":/home/pi/.opam/4.02.1/man"; export MANPATH;
> PERL5LIB="/home/pi/.opam/4.02.1/lib/perl5"; export PERL5LIB;
> OCAML_TOPLEVEL_PATH="/home/pi/.opam/4.02.1/lib/toplevel"; export
> OCAML_TOPLEVEL_PATH;
> PATH="/home/pi/.opam/4.02.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games";
> export PATH;

The eval command

> eval `opam config env`

is *supposed* to get them executed in the present shell.
If it doesn't work, your eval isn't the same as mine, and I suggest you
log in again, or start a new shell.

-- hendrik

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

* Re: [Caml-list] Installing 4.02
  2016-03-06 11:23 ` Hendrik Boom
@ 2016-03-06 14:15   ` Gabriel Scherer
  2016-03-07  2:30     ` Goswin von Brederlow
  0 siblings, 1 reply; 5+ messages in thread
From: Gabriel Scherer @ 2016-03-06 14:15 UTC (permalink / raw)
  To: Hendrik Boom; +Cc: caml users

[-- Attachment #1: Type: text/plain, Size: 1964 bytes --]

I've been using
  eval $(opam config env)
myself. Maybe this would be less error-prone to document?
(Is it less portable to other shells?)

On Sun, Mar 6, 2016 at 6:23 AM, Hendrik Boom <hendrik@topoi.pooq.com> wrote:

> On Sun, Mar 06, 2016 at 10:22:21AM +0000, Mick Sulley wrote:
> > Hi,
> >
> > Totally new to OCaml.  I am trying to install OCaml version 4.02 or
> > higher on a Raspberry Pi running Raspbian.  I have OPAM and OCaml
> > 4.01 installed but if I enter
> > opam switch 4.02.1
> > I get
> > pi@raspberrypi:~/geneweb $ opam switch 4.02.1
> > # To setup the new switch in the current shell, you need to run:
> > eval `opam config env`
> >
>
> I've just struggled with this stuff on a 32-bit x86 Linux.
> The opam switch command alters the dotfiles (things like .bashrd)
> so that the next time you log in or start a shell, the environment
> variables are set to the new switch.
>
> opam config env
>
> generates the list of command you saw below:
>
> > I then try -
> > pi@raspberrypi:~/geneweb $ eval 'opam config env'
> > CAML_LD_LIBRARY_PATH="/home/pi/.opam/4.02.1/lib/stublibs"; export
> > CAML_LD_LIBRARY_PATH;
> > MANPATH=":/home/pi/.opam/4.02.1/man"; export MANPATH;
> > PERL5LIB="/home/pi/.opam/4.02.1/lib/perl5"; export PERL5LIB;
> > OCAML_TOPLEVEL_PATH="/home/pi/.opam/4.02.1/lib/toplevel"; export
> > OCAML_TOPLEVEL_PATH;
> >
> PATH="/home/pi/.opam/4.02.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games";
> > export PATH;
>
> The eval command
>
> > eval `opam config env`
>
> is *supposed* to get them executed in the present shell.
> If it doesn't work, your eval isn't the same as mine, and I suggest you
> log in again, or start a new shell.
>
> -- hendrik
>
> --
> 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: 3007 bytes --]

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

* Re: [Caml-list] Installing 4.02
  2016-03-06 14:15   ` Gabriel Scherer
@ 2016-03-07  2:30     ` Goswin von Brederlow
  0 siblings, 0 replies; 5+ messages in thread
From: Goswin von Brederlow @ 2016-03-07  2:30 UTC (permalink / raw)
  To: Gabriel Scherer; +Cc: Hendrik Boom, caml users

On Sun, Mar 06, 2016 at 09:15:26AM -0500, Gabriel Scherer wrote:
> I've been using
>   eval $(opam config env)
> myself. Maybe this would be less error-prone to document?
> (Is it less portable to other shells?)

$(...) is POSIX and also, unlike ``, has no problem with nesting.

MfG
	Goswin

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

end of thread, other threads:[~2016-03-07  2:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-06 10:22 [Caml-list] Installing 4.02 Mick Sulley
2016-03-06 11:20 ` Leo White
2016-03-06 11:23 ` Hendrik Boom
2016-03-06 14:15   ` Gabriel Scherer
2016-03-07  2:30     ` Goswin von Brederlow

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).