caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OCaml-4.02.1 on windows XP
@ 2014-12-01 10:27 Alain Coste
  2014-12-01 10:57 ` David Allsopp
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Alain Coste @ 2014-12-01 10:27 UTC (permalink / raw)
  To: caml-list

Hello
My OS is windows XP SP3.
Two years ago, I installed OCaml.4.00.1 from the source code distribution, 
using MinGW Cygwin. Everything worked fine.
Yesterday I tried to install OCaml.4.02.1 in the same conditions (source
code,MinGW Cygwin).
The process seems to be exactly the same, following README.win32 (except for
the variable TK_ROOT in Makefile, no longer pertinent).
The system build with no fatal error. I got some (many!) warnings, but as I
remember, it was the same with version 4.00.1.
But, when I tried to launch ocaml.exe I got the message:

D:\OCaml-4.02.1-mgw-perso\bin>ocaml.exe
        OCaml version 4.02.1

Fatal error: exception Cmi_format.Error(_)

The exception Error is not listed (at least for the module Cmi_format) in
the index of exceptions of the manual. Perhaps a problem of Dynamic link,
but I don't know what to do.
And there is no description associated with the exception!
A search on the Web didn't give me informations I could understand.

Thanks in advance for your answers.

Alain Coste


---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com


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

* RE: [Caml-list] OCaml-4.02.1 on windows XP
  2014-12-01 10:27 [Caml-list] OCaml-4.02.1 on windows XP Alain Coste
@ 2014-12-01 10:57 ` David Allsopp
  2014-12-01 15:46   ` Alain Coste
  2014-12-01 10:59 ` Fabrice Le Fessant
  2014-12-05 18:49 ` Damien Doligez
  2 siblings, 1 reply; 8+ messages in thread
From: David Allsopp @ 2014-12-01 10:57 UTC (permalink / raw)
  To: caml-list

Alain Coste wrote:
> Hello
> My OS is windows XP SP3.

<not-relevant>Then upgrade!</not-relevant>

> Two years ago, I installed OCaml.4.00.1 from the source code distribution,
> using MinGW Cygwin. Everything worked fine.
> Yesterday I tried to install OCaml.4.02.1 in the same conditions (source
> code,MinGW Cygwin).
> The process seems to be exactly the same, following README.win32 (except
> for the variable TK_ROOT in Makefile, no longer pertinent).
> The system build with no fatal error. I got some (many!) warnings, but as
> I remember, it was the same with version 4.00.1.
> But, when I tried to launch ocaml.exe I got the message:
> 
> D:\OCaml-4.02.1-mgw-perso\bin>ocaml.exe
>         OCaml version 4.02.1
> 
> Fatal error: exception Cmi_format.Error(_)

Have you got the OCAMLLIB environment set and pointing to your old 4.00.1 installation lib directory? Looks like its picking up the wrong pervasives.cmi. It's probably trying to show Cmi_format.Error(Cmi_format.Wrong_version_interface("%OCAMLIB%\pervasives.cmi", "an older")) but you can't install an exception printer if you can't start ocaml!


David

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

* Re: [Caml-list] OCaml-4.02.1 on windows XP
  2014-12-01 10:27 [Caml-list] OCaml-4.02.1 on windows XP Alain Coste
  2014-12-01 10:57 ` David Allsopp
@ 2014-12-01 10:59 ` Fabrice Le Fessant
  2014-12-01 12:00   ` Daniel Bünzli
  2014-12-05 18:49 ` Damien Doligez
  2 siblings, 1 reply; 8+ messages in thread
From: Fabrice Le Fessant @ 2014-12-01 10:59 UTC (permalink / raw)
  To: Alain Coste; +Cc: Ocaml Mailing List

Hi Alain,

  Do you need specific features of 4.02 ? Otherwise, you can try
OcpWin 4.01.0, which is a binary version of OCaml 4.01.0 with an
installer, that you can install wherever you want on your disk, and
working with both mingw and msvc.

http://typerex.ocamlpro.com/ocpwin.html

Best regards,
--Fabrice

On Mon, Dec 1, 2014 at 11:27 AM, Alain Coste <coste@irit.fr> wrote:
> Hello
> My OS is windows XP SP3.
> Two years ago, I installed OCaml.4.00.1 from the source code distribution,
> using MinGW Cygwin. Everything worked fine.
> Yesterday I tried to install OCaml.4.02.1 in the same conditions (source
> code,MinGW Cygwin).
> The process seems to be exactly the same, following README.win32 (except for
> the variable TK_ROOT in Makefile, no longer pertinent).
> The system build with no fatal error. I got some (many!) warnings, but as I
> remember, it was the same with version 4.00.1.
> But, when I tried to launch ocaml.exe I got the message:
>
> D:\OCaml-4.02.1-mgw-perso\bin>ocaml.exe
>        OCaml version 4.02.1
>
> Fatal error: exception Cmi_format.Error(_)
>
> The exception Error is not listed (at least for the module Cmi_format) in
> the index of exceptions of the manual. Perhaps a problem of Dynamic link,
> but I don't know what to do.
> And there is no description associated with the exception!
> A search on the Web didn't give me informations I could understand.
>
> Thanks in advance for your answers.
>
> Alain Coste
>
>
> ---
> Ce courrier électronique ne contient aucun virus ou logiciel malveillant
> parce que la protection avast! Antivirus est active.
> http://www.avast.com
>
>
> --
> 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



-- 
Fabrice LE FESSANT
Chercheur en Informatique
INRIA Paris Rocquencourt -- OCamlPro
Programming Languages and Distributed Systems

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

* Re: [Caml-list] OCaml-4.02.1 on windows XP
  2014-12-01 10:59 ` Fabrice Le Fessant
@ 2014-12-01 12:00   ` Daniel Bünzli
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Bünzli @ 2014-12-01 12:00 UTC (permalink / raw)
  To: Fabrice Le Fessant; +Cc: Alain Coste, Ocaml Mailing List



Le lundi, 1 décembre 2014 à 11:59, Fabrice Le Fessant a écrit :

> Hi Alain,
>  
> Do you need specific features of 4.02 ? Otherwise, you can try
> OcpWin 4.01.0, which is a binary version of OCaml 4.01.0 with an
> installer, that you can install wherever you want on your disk, and
> working with both mingw and msvc.
>  
> http://typerex.ocamlpro.com/ocpwin.html
Btw. having used that for testing things in vms is very useful, but somehow its usefulness is greatly reduced by not having ocamlbuild support built-in. Are there any plans to do so ?  

Best,

Daniel



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

* Re: [Caml-list] OCaml-4.02.1 on windows XP
  2014-12-01 10:57 ` David Allsopp
@ 2014-12-01 15:46   ` Alain Coste
  2014-12-01 15:52     ` Fabrice Le Fessant
  0 siblings, 1 reply; 8+ messages in thread
From: Alain Coste @ 2014-12-01 15:46 UTC (permalink / raw)
  To: caml-list

Thank you for your answers.

David
You are right. I had completely forgotten the CAMLLIB environment
variable... After making it point to the 4.02 installation lib (and also
corrected the Path variable) everything works fine.

Fabrice
I saw this binary version 4.01, but as I am using a modified version of the
Graphics library (to have access to the three mouse buttons, the wheel and 
some other stuff), I need to recompile the distribution from sources (at
least for Graphics). And some features of the 4.02 are also very tempting
("unification" between try and match...).

Alain Coste



----- Original Message -----
From: "David Allsopp" <dra-news@metastack.com>
To: <caml-list@inria.fr>
Sent: Monday, December 01, 2014 11:57 AM
Subject: RE: [Caml-list] OCaml-4.02.1 on windows XP


Alain Coste wrote:
> Hello
> My OS is windows XP SP3.

<not-relevant>Then upgrade!</not-relevant>

> Two years ago, I installed OCaml.4.00.1 from the source code distribution,
> using MinGW Cygwin. Everything worked fine.
> Yesterday I tried to install OCaml.4.02.1 in the same conditions (source
> code,MinGW Cygwin).
> The process seems to be exactly the same, following README.win32 (except
> for the variable TK_ROOT in Makefile, no longer pertinent).
> The system build with no fatal error. I got some (many!) warnings, but as
> I remember, it was the same with version 4.00.1.
> But, when I tried to launch ocaml.exe I got the message:
>
> D:\OCaml-4.02.1-mgw-perso\bin>ocaml.exe
>         OCaml version 4.02.1
>
> Fatal error: exception Cmi_format.Error(_)

Have you got the OCAMLLIB environment set and pointing to your old 4.00.1
installation lib directory? Looks like its picking up the wrong
pervasives.cmi. It's probably trying to show
Cmi_format.Error(Cmi_format.Wrong_version_interface("%OCAMLIB%\pervasives.cmi",
"an older")) but you can't install an exception printer if you can't start 
ocaml!


David

--
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=


---
Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com


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

* Re: [Caml-list] OCaml-4.02.1 on windows XP
  2014-12-01 15:46   ` Alain Coste
@ 2014-12-01 15:52     ` Fabrice Le Fessant
  0 siblings, 0 replies; 8+ messages in thread
From: Fabrice Le Fessant @ 2014-12-01 15:52 UTC (permalink / raw)
  To: Alain Coste; +Cc: Ocaml Mailing List

On Mon, Dec 1, 2014 at 4:46 PM, Alain Coste <coste@irit.fr> wrote:
> Fabrice
> I saw this binary version 4.01, but as I am using a modified version of the
> Graphics library (to have access to the three mouse buttons, the wheel and
> some other stuff), I need to recompile the distribution from sources (at
> least for Graphics).

You could just recompile that part using OcpWin.

> And some features of the 4.02 are also very tempting
> ("unification" between try and match...).

I should probably not say it, but actually, this particular
"unification" had been backported from 4.02 to OcpWin 4.01, so it is
already available there (it was convenient to compile some libraries
that were already using this notation).

--Fabrice

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

* Re: [Caml-list] OCaml-4.02.1 on windows XP
  2014-12-01 10:27 [Caml-list] OCaml-4.02.1 on windows XP Alain Coste
  2014-12-01 10:57 ` David Allsopp
  2014-12-01 10:59 ` Fabrice Le Fessant
@ 2014-12-05 18:49 ` Damien Doligez
  2014-12-05 22:22   ` David Allsopp
  2 siblings, 1 reply; 8+ messages in thread
From: Damien Doligez @ 2014-12-05 18:49 UTC (permalink / raw)
  To: Alain Coste; +Cc: caml-list

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

> Fatal error: exception Cmi_format.Error(_)

I don't know how this exception escaped (it is supposed to be caught by the
compiler) but it looks like you have some old .cmi files lying around that
were compiled by your previous version of OCaml. You should remove them,
and also the .cmo, .cmx, etc. and recompile everything (including any
third-party libraries that you might have installed).

-- Damien

On Mon, Dec 1, 2014 at 5:27 AM, Alain Coste <coste@irit.fr> wrote:

> Hello
> My OS is windows XP SP3.
> Two years ago, I installed OCaml.4.00.1 from the source code distribution,
> using MinGW Cygwin. Everything worked fine.
> Yesterday I tried to install OCaml.4.02.1 in the same conditions (source
> code,MinGW Cygwin).
> The process seems to be exactly the same, following README.win32 (except
> for
> the variable TK_ROOT in Makefile, no longer pertinent).
> The system build with no fatal error. I got some (many!) warnings, but as I
> remember, it was the same with version 4.00.1.
> But, when I tried to launch ocaml.exe I got the message:
>
> D:\OCaml-4.02.1-mgw-perso\bin>ocaml.exe
>        OCaml version 4.02.1
>
> Fatal error: exception Cmi_format.Error(_)
>
> The exception Error is not listed (at least for the module Cmi_format) in
> the index of exceptions of the manual. Perhaps a problem of Dynamic link,
> but I don't know what to do.
> And there is no description associated with the exception!
> A search on the Web didn't give me informations I could understand.
>
> Thanks in advance for your answers.
>
> Alain Coste
>
>
> ---
> Ce courrier électronique ne contient aucun virus ou logiciel malveillant
> parce que la protection avast! Antivirus est active.
> http://www.avast.com
>
>
> --
> 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: 2826 bytes --]

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

* RE: [Caml-list] OCaml-4.02.1 on windows XP
  2014-12-05 18:49 ` Damien Doligez
@ 2014-12-05 22:22   ` David Allsopp
  0 siblings, 0 replies; 8+ messages in thread
From: David Allsopp @ 2014-12-05 22:22 UTC (permalink / raw)
  To: caml-list

Damien Doligez wrote:
> > Fatal error: exception Cmi_format.Error(_)
> 
> I don't know how this exception escaped (it is supposed to be caught by the
> compiler) but it looks like you have some old .cmi files lying around that 
> were compiled by your previous version of OCaml. You should remove them, 
> and also the .cmo, .cmx, etc. and recompile everything (including any 
> third-party libraries that you might have installed).

Amusingly, I wrote out what I thought the trace would be in my original reply and then thought it was too much detail so deleted it :o)

I think that what will be escaping is:

Topmain.main -> Toplevel.loop -> Toplevel.initialize_toplevel_env -> Compmisc.initial_env -> Compmisc.open_implicit_module -> Env.open_pers_signature -> Env.find_pers_struct -> Env.read_pers_struct -> Cmi_format.read_cmi -> *bang*

That whole trace occurs before the main [while true do] loop in Toploop.loop and so before the general exception handler mapping to Errors.report_error is "installed".

AFAICT, an invalid CAMLLIB/OCAMLLIB is the only "sane" (i.e. easy-to-do) way that this can happen. 


David 

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

end of thread, other threads:[~2014-12-05 22:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-01 10:27 [Caml-list] OCaml-4.02.1 on windows XP Alain Coste
2014-12-01 10:57 ` David Allsopp
2014-12-01 15:46   ` Alain Coste
2014-12-01 15:52     ` Fabrice Le Fessant
2014-12-01 10:59 ` Fabrice Le Fessant
2014-12-01 12:00   ` Daniel Bünzli
2014-12-05 18:49 ` Damien Doligez
2014-12-05 22:22   ` David Allsopp

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