caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Compiling OCaml w/MS VC++ Toolkit 2003
@ 2004-11-27  6:14 Sachin Shah
  2004-11-27  8:59 ` [Caml-list] " Nicolas Cannasse
  0 siblings, 1 reply; 3+ messages in thread
From: Sachin Shah @ 2004-11-27  6:14 UTC (permalink / raw)
  To: caml-list

Hello all,

Just joined this list, and it's looking pretty good! In order to use
the latest OCaml, I'm trying to compile it from source using:

(1) MS Visual C++ Toolkit 2003
(2) MS Visual Studio .NET SDK
(3) MS Platform SDK for Windows XP SP2

After a lot of work, I have all the files I need to do the install. 
However, I am stuck on one part and don't know what to do. When
running the command 'make -f Makefile.nt opt', make descends into the
stdlib source directory. There, using ocamlopt, it constructs the file
'stdlib.cmxa'. Directly after that, I get an error message that
prevents the computer from creating the 'stdlib.lib' file. Here is
that message:

================================ (extra lines added for clarity)
../boot/ocamlrun ../ocamlopt -a -o stdlib.cmxa pervasives.cmx
array.cmx list.cmx char.cmx string.cmx sys.cmx hashtbl.cmx sort.cmx
marshal.cmx obj.cmx int32.cmxint64.cmx nativeint.cmx lexing.cmx
parsing.cmx set.cmx map.cmx stack.cmx queue.cmx stream.cmx buffer.cmx
printf.cmx format.cmx scanf.cmx arg.cmx printexc.cmx gc.cmx digest.cmx
random.cmx callback.cmx camlinternalOO.cmx oo.cmx genlex.cmx weak.cmx
lazy.cmx filename.cmx complex.cmx arrayLabels.cmx listLabels.cmx
stringLabels.cmx moreLabels.cmx stdLabels.cmx

LINK : fatal error LNK1104: cannot open file
'@c:\DOCUME~1\sachin\LOCALS~1\Temp\camlrespfba3be'

../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib `./Compflags
std_exit.cmx` -c std_exit.ml
================================

As you can see, it ignores the error and continues with creating the
'std_exit.cmx' file. Searching through the archives here produced
nothing. Searching google came up with a similar error in a project
called MetaPRL. However, the folks there could present no solution.
Hopefully, someone here can :).  From what they were saying, ocamlopt
supposedly calls the library creation program (which, in my case, is
actually the command 'link /lib').  However, it seems that either (1)
ocamlopt is never creating the file, causing the linker to fail, (2)
ocamlopt deletes the file before the linker can get to it (however, I
was monitoring the directory and did not see a file being created), or
(3) there is simply something wrong with ocamlopt and MS VC++ Toolkit
2003 interaction.

My background is mostly in Linux C/C++ development and Java
development. I am familiar with makefiles, but not with the MSVC++.

Thanks for your help,

Sachin.


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

* Re: [Caml-list] Compiling OCaml w/MS VC++ Toolkit 2003
  2004-11-27  6:14 Compiling OCaml w/MS VC++ Toolkit 2003 Sachin Shah
@ 2004-11-27  8:59 ` Nicolas Cannasse
       [not found]   ` <388f6fcd04112707287b784e21@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Cannasse @ 2004-11-27  8:59 UTC (permalink / raw)
  To: caml-list

> Hello all,
>
> Just joined this list, and it's looking pretty good! In order to use
> the latest OCaml, I'm trying to compile it from source using:
>
> (1) MS Visual C++ Toolkit 2003
> (2) MS Visual Studio .NET SDK
> (3) MS Platform SDK for Windows XP SP2

In order to compile native code you need ml.exe (MS asm linker) which I am
not sure is included in the above packages. Please check the report from
Alain Frisch there :
http://caml.inria.fr/archives/200404/msg00823.html
(please note that he didn't try to compile ocaml compiler sources as you're
doing).

Nicolas Cannasse


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

* [Caml-list] Compiling OCaml w/MS VC++ Toolkit 2003
       [not found]   ` <388f6fcd04112707287b784e21@mail.gmail.com>
@ 2004-11-27 23:52     ` Sachin Shah
  0 siblings, 0 replies; 3+ messages in thread
From: Sachin Shah @ 2004-11-27 23:52 UTC (permalink / raw)
  To: caml-list

From: Sachin Shah <zakaluka@gmail.com>
Date: Sat, 27 Nov 2004 07:28:07 -0800
Subject: Re: [Caml-list] Compiling OCaml w/MS VC++ Toolkit 2003
To: Nicolas Cannasse <warplayer@free.fr>


Hello,

> In order to compile native code you need ml.exe (MS asm linker) which I am
> not sure is included in the above packages. Please check the report from
> Alain Frisch there :
> http://caml.inria.fr/archives/200404/msg00823.html
> (please note that he didn't try to compile ocaml compiler sources as you're
> doing).

I have, in fact, seen that.  And, ml.exe is part of the processor pack
listed in Alain's report.  The way to extract it is:

(1) Download vcpp5.exe
(2) vcpp5.exe is only a cab file.  You can extract the contents with
any decent program (I used WinRAR).  From the resulting folder, it is
easy to pick out 'ml.exe' and 'ml.err'.

So, all that is stopping me now is this problem with creating the
stdlib.lib library.  Does anyone know of a command I can manually run
from within the 'stdlib' folder to create the library?

Thanks for the quick reply,

Sachin.


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

end of thread, other threads:[~2004-11-27 23:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-27  6:14 Compiling OCaml w/MS VC++ Toolkit 2003 Sachin Shah
2004-11-27  8:59 ` [Caml-list] " Nicolas Cannasse
     [not found]   ` <388f6fcd04112707287b784e21@mail.gmail.com>
2004-11-27 23:52     ` Sachin Shah

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