caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000)
@ 2003-10-18 17:29 Tom Hawkins
  2003-10-19 14:41 ` Alan Schmitt
  2003-10-20 13:07 ` Xavier Leroy
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Hawkins @ 2003-10-18 17:29 UTC (permalink / raw)
  To: caml-list

I'm having difficulty getting 3.07 working on a Win 2000 box with the 
MinGW tool chain.  When I try ocamlc.opt from either a Cygwin shell 
or a windows shell I get:

  Fatal error: can not open pervasives.cmi

I've tried playing with the OCAMLLIB environment variable, but no 
luck.  From what I gather from the docs, OCAMLLIB is only needed for 
ME or 98, but I thought it was worth a shot.

BTW, the interactive OCaml works just fine.

This is my first time trying to compile native Win32 executables.  
Till now I've only used the pure Cygwin-based port.

Any suggestions?

-Tom


-- 
Tom Hawkins
Launchbird Design Systems, Inc.
952-200-3790
http://www.launchbird.com/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000)
  2003-10-18 17:29 [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000) Tom Hawkins
@ 2003-10-19 14:41 ` Alan Schmitt
  2003-10-19 15:39   ` Tom Hawkins
  2003-10-20 13:07 ` Xavier Leroy
  1 sibling, 1 reply; 7+ messages in thread
From: Alan Schmitt @ 2003-10-19 14:41 UTC (permalink / raw)
  To: Tom Hawkins; +Cc: caml-list

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

* Tom Hawkins (tom@launchbird.com) wrote:
> I'm having difficulty getting 3.07 working on a Win 2000 box with the 
> MinGW tool chain.  When I try ocamlc.opt from either a Cygwin shell 
> or a windows shell I get:
> 
>   Fatal error: can not open pervasives.cmi
> 
> I've tried playing with the OCAMLLIB environment variable, but no 
> luck.  From what I gather from the docs, OCAMLLIB is only needed for 
> ME or 98, but I thought it was worth a shot.
> 
> BTW, the interactive OCaml works just fine.
> 
> This is my first time trying to compile native Win32 executables.  
> Till now I've only used the pure Cygwin-based port.
> 
> Any suggestions?

I've had similar problems, and it seems that a solution is to root your
install directory (where the bin and lib are going to go) outside of
the cygwin directory (like to c:\ocaml, for instance).

It seems that the path that is put in the ocaml executable does not make
sense from a non-cygwin point of view (but this is just a guess).

HTH,

Alan Schmitt

-- 
The hacker: someone who figured things out and made something cool happen.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000)
  2003-10-19 14:41 ` Alan Schmitt
@ 2003-10-19 15:39   ` Tom Hawkins
  2003-10-19 23:04     ` Alan Schmitt
  2003-10-19 23:54     ` Jason Hickey
  0 siblings, 2 replies; 7+ messages in thread
From: Tom Hawkins @ 2003-10-19 15:39 UTC (permalink / raw)
  To: Alan Schmitt; +Cc: caml-list

On Sunday 19 October 2003 09:41 am, Alan Schmitt wrote:
> * Tom Hawkins (tom@launchbird.com) wrote:
> > I'm having difficulty getting 3.07 working on a Win 2000 box with
> > the MinGW tool chain.  When I try ocamlc.opt from either a Cygwin
> > shell or a windows shell I get:
> >
> >   Fatal error: can not open pervasives.cmi
> >
> > I've tried playing with the OCAMLLIB environment variable, but no
> > luck.  From what I gather from the docs, OCAMLLIB is only needed
> > for ME or 98, but I thought it was worth a shot.
> >
> > BTW, the interactive OCaml works just fine.
> >
> > This is my first time trying to compile native Win32 executables.
> > Till now I've only used the pure Cygwin-based port.
> >
> > Any suggestions?
>
> I've had similar problems, and it seems that a solution is to root
> your install directory (where the bin and lib are going to go)
> outside of the cygwin directory (like to c:\ocaml, for instance).
>
> It seems that the path that is put in the ocaml executable does not
> make sense from a non-cygwin point of view (but this is just a
> guess).

I let it pick the default directory, "C:\Program Files\Objective 
Caml\", and then I set OCAMLLIB to values such as:
/cygdrive/c/Program\ Files/Objective\ Caml/

Again, I'm unclear if OCAMLLIB is needed with win2000.

I don't think it's a Cygwin directory path problem, because I get the 
same error when I run ocamlc from a windows command prompt. 

-Tom

>
> HTH,
>
> Alan Schmitt

-- 
Tom Hawkins
Launchbird Design Systems, Inc.
952-200-3790
http://www.launchbird.com/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000)
  2003-10-19 15:39   ` Tom Hawkins
@ 2003-10-19 23:04     ` Alan Schmitt
  2003-10-19 23:54     ` Jason Hickey
  1 sibling, 0 replies; 7+ messages in thread
From: Alan Schmitt @ 2003-10-19 23:04 UTC (permalink / raw)
  To: Tom Hawkins; +Cc: caml-list

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

* Tom Hawkins (tom@launchbird.com) wrote:
> I let it pick the default directory, "C:\Program Files\Objective
> Caml\", and then I set OCAMLLIB to values such as:
> /cygdrive/c/Program\ Files/Objective\ Caml/
> 
> Again, I'm unclear if OCAMLLIB is needed with win2000.
> 
> I don't think it's a Cygwin directory path problem, because I get the 
> same error when I run ocamlc from a windows command prompt. 

Have you tried a path without spaces in it ? I've read that it can cause
problems (imagine escaping spaces with backslashes under windows ...).

Alan

-- 
The hacker: someone who figured things out and made something cool happen.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000)
  2003-10-19 15:39   ` Tom Hawkins
  2003-10-19 23:04     ` Alan Schmitt
@ 2003-10-19 23:54     ` Jason Hickey
  1 sibling, 0 replies; 7+ messages in thread
From: Jason Hickey @ 2003-10-19 23:54 UTC (permalink / raw)
  To: Tom Hawkins; +Cc: caml-list

Tom Hawkins wrote:
>>>I'm having difficulty getting 3.07 working on a Win 2000 box with
>>>the MinGW tool chain.  When I try ocamlc.opt from either a Cygwin
>>>shell or a windows shell I get:
>>>
>>>  Fatal error: can not open pervasives.cmi
> 
> I let it pick the default directory, "C:\Program Files\Objective 
> Caml\", and then I set OCAMLLIB to values such as:
> /cygdrive/c/Program\ Files/Objective\ Caml/

Isn't this because MinGW binaries are native Win32?  I believe ocamlc 
compiled with MinGW does not understand Cygwin-style paths like 
/cygdrive/c.  You would need the Windows-style path:

dos>set OCAMLLIB=c:\Program Files\Objective Caml

Jason

-- 
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000)
  2003-10-18 17:29 [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000) Tom Hawkins
  2003-10-19 14:41 ` Alan Schmitt
@ 2003-10-20 13:07 ` Xavier Leroy
  2003-10-20 14:03   ` Tom Hawkins
  1 sibling, 1 reply; 7+ messages in thread
From: Xavier Leroy @ 2003-10-20 13:07 UTC (permalink / raw)
  To: Tom Hawkins; +Cc: caml-list

> I'm having difficulty getting 3.07 working on a Win 2000 box with the 
> MinGW tool chain.  When I try ocamlc.opt from either a Cygwin shell 
> or a windows shell I get:
> 
>   Fatal error: can not open pervasives.cmi

One suggestion: "ocamlc -v" will print the path to the standard library
where ocamlc looks for pervasives.cmi and other interfaces, so you can
use this for troubleshooting.

> I've tried playing with the OCAMLLIB environment variable, but no 
> luck.  From what I gather from the docs, OCAMLLIB is only needed for 
> ME or 98, but I thought it was worth a shot.

The OCAMLLIB environment variable is always honored.  However, the
installer knows how to set it to the correct value under Win NT, 2K
and XP.  Under 98 and ME, the installer does nothing to set the
variable and this must be done manually, e.g. via autoexec.bat.

Hope this helps,

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000)
  2003-10-20 13:07 ` Xavier Leroy
@ 2003-10-20 14:03   ` Tom Hawkins
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Hawkins @ 2003-10-20 14:03 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: caml-list

On Monday 20 October 2003 08:07 am, Xavier Leroy wrote:
> > I'm having difficulty getting 3.07 working on a Win 2000 box with
> > the MinGW tool chain.  When I try ocamlc.opt from either a Cygwin
> > shell or a windows shell I get:
> >
> >   Fatal error: can not open pervasives.cmi
>
> One suggestion: "ocamlc -v" will print the path to the standard
> library where ocamlc looks for pervasives.cmi and other interfaces,
> so you can use this for troubleshooting.

Suspecting a problem with spaces in path names, I reinstalled the 
distribution to C:\ocaml and tried setting OCAMLLIB to "C:\ocaml\lib" 
and "/cygdrive/c/ocaml/lib" -- both verified with ocamlc -v, but 
still no luck.  I also tried the -nostdlib option while using -I to 
include the lib directory:

$ ocamlc -nostdlib -I /cygdrive/c/ocaml/lib ...

$ ocamlc -nostdlib -I C:\ocaml\lib ...

Neither worked.  I then tried a symbolic link to the lib directory:

$ ln -s /cygdrive/c/ocaml/lib lib
$ ocamlc -nostdlib -I lib ...

Nope.  What finally worked was copying the lib directory into the 
Cygwin environment:

$ cp -r /cygdrive/c/ocaml/lib lib
$ ocamlc -nostdlib -I lib ...

I have no idea why this worked, but the symbolic link didn't.  I guess 
that's windows for you.

Thanks for your help.

-Tom

>
> > I've tried playing with the OCAMLLIB environment variable, but no
> > luck.  From what I gather from the docs, OCAMLLIB is only needed
> > for ME or 98, but I thought it was worth a shot.
>
> The OCAMLLIB environment variable is always honored.  However, the
> installer knows how to set it to the correct value under Win NT, 2K
> and XP.  Under 98 and ME, the installer does nothing to set the
> variable and this must be done manually, e.g. via autoexec.bat.
>
> Hope this helps,
>
> - Xavier Leroy

-- 
Tom Hawkins
Launchbird Design Systems, Inc.
952-200-3790
http://www.launchbird.com/

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2003-10-20 13:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-18 17:29 [Caml-list] Can't find Pervasives.cmi (3.07, MinGW, Win2000) Tom Hawkins
2003-10-19 14:41 ` Alan Schmitt
2003-10-19 15:39   ` Tom Hawkins
2003-10-19 23:04     ` Alan Schmitt
2003-10-19 23:54     ` Jason Hickey
2003-10-20 13:07 ` Xavier Leroy
2003-10-20 14:03   ` Tom Hawkins

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