Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] building OCaml under MinGW

0 views
Skip to first unread message

dmitry grebeniuk

unread,
Oct 11, 2002, 6:23:19 AM10/11/02
to caml...@inria.fr
hi

Have anyone succeded at building OCaml (with native-code
compilers and threads) under MinGW?
Can you say which packages (with its versions) have you installed
to do this, what was the order of directories in your PATH if you
have installed both cygwin and mingw, and which makefiles have you
used to build OCaml?

bye

-------------------
To unsubscribe, mail caml-lis...@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

Kontra, Gergely

unread,
Oct 11, 2002, 7:19:45 AM10/11/02
to dmitry grebeniuk, caml...@inria.fr
> Have anyone succeded at building OCaml (with native-code
>compilers and threads) under MinGW?
> Can you say which packages (with its versions) have you installed
>to do this, what was the order of directories in your PATH if you
>have installed both cygwin and mingw, and which makefiles have you
>used to build OCaml?

As far as I remember my last attempt was to compile ocaml with mingw. I
installed mingw and msys. This way you don't need cygwin.
(but this was a couple weeks ago, so don't trust me :)

Gergo

+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
| Email: kger...@mcl.hu, kger...@turul.eet.bme.hu |
| URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

Hallvard Ystad

unread,
Oct 11, 2002, 7:45:27 AM10/11/02
to caml...@inria.fr
I tried this week with mingw, but didn't manage. After solving a few=
problems discussed on this list, I didn't succeed in finding out why the=
file ocamlrun.a wasn't present. I used the CVS source files in my last=
attempt, but that didn't help. So I'm hopelessly stranded, and on the point=
of giving up.

I have a new version of mingw (downloaded this monday). I needed to change a=
few variables (e.g. BYTECC in config/Makefile) so that my WebObjects=
installation would not hijack the %PATH% and force through an older version=
of gcc.

Oh, and by the way: If I should be so lucky as to manage to compile it, and=
then to build Windows native executables, will client machines still need=
mingw to run these files? I.e. will these Windows native executables really=
be Windows native executables, and not rely on any third party software?

~H

Dixit Kontra, Gergely (13.10 11.10.2002):


>> Have anyone succeded at building OCaml (with native-code
>>compilers and threads) under MinGW?
>> Can you say which packages (with its versions) have you installed
>>to do this, what was the order of directories in your PATH if you
>>have installed both cygwin and mingw, and which makefiles have you
>>used to build OCaml?
>

>As far as I remember my last attempt was to compile ocaml with mingw. I
>installed mingw and msys. This way you don't need cygwin.
>(but this was a couple weeks ago, so don't trust me :)
>
>Gergo
>
>+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
>| Email: kger...@mcl.hu, kger...@turul.eet.bme.hu |
>| URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
>+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
>.
>Magyar php mirror es magyar php dokumentacio: http://hu.php.net
>

>-------------------
>To unsubscribe, mail caml-lis...@inria.fr Archives:=
http://caml.inria.fr
>Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:=

Prætera censeo Carthaginem esse delendam

Xavier Leroy

unread,
Oct 11, 2002, 7:54:53 AM10/11/02
to Hallvard Ystad, caml...@inria.fr
> I tried this week with mingw, but didn't manage. After solving a few
> problems discussed on this list, I didn't succeed in finding out why
> the file ocamlrun.a wasn't present. I used the CVS source files in
> my last attempt, but that didn't help. So I'm hopelessly stranded,
> and on the point of giving up.

I'm afraid I can't diagnose your problem offline. There is one known
bug that was discussed on this list (you have to do
make -f Makefile.nt jumptbl.h
manually in byterun/), but apart from this it should work if you
follow the instructions in README.win32. In particular, I'd advise to
compile under Cygwin (but with the -mno-cygwin option to gcc)
rather than under Mingw + Msys.

> Oh, and by the way: If I should be so lucky as to manage to compile

> it, and then to build Windows native executables, will client
> machines still need mingw to run these files? I.e. will these
> Windows native executables really be Windows native executables, and


> not rely on any third party software?

No to the first question. Yes to the second. (Unless your program
explicitly requires third-party libraries, e.g. TCL/TK if you use
Labltk.)

- Xavier Leroy

Hallvard Ystad

unread,
Oct 11, 2002, 8:13:53 AM10/11/02
to owner-c...@pauillac.inria.fr, caml...@inria.fr
Hi

Lists like caml...@inria.fr are a wonderful place to get help, but I would=
like to comment on the way that list is set up. There is no Reply-to: field=
in the headers, so when I click "reply" in my e-mail-reader,=
caml...@inria.fr is not addressed, but only the sender of the message. I=
have to manually change it each time. I dislike that (and I hate bugging=
people with e-mails that should go directly to the list). Is this really=
ment to be so?

Second, the prefix [Caml-list] does not always appear first in the subject=
line, but could be anywhere. This makes filtering less obvious. Is this=
also ment to be so?

Regards,
~HY

Dixit Xavier Leroy (13.46 11.10.2002):


>> I tried this week with mingw, but didn't manage. After solving a few

>> problems discussed on this list, I didn't succeed in finding out why

>> the file ocamlrun.a wasn't present. I used the CVS source files in
>> my last attempt, but that didn't help. So I'm hopelessly stranded,
>> and on the point of giving up.
>
>I'm afraid I can't diagnose your problem offline. There is one known
>bug that was discussed on this list (you have to do
> make -f Makefile.nt jumptbl.h
>manually in byterun/), but apart from this it should work if you
>follow the instructions in README.win32. In particular, I'd advise to
>compile under Cygwin (but with the -mno-cygwin option to gcc)
>rather than under Mingw + Msys.
>

>> Oh, and by the way: If I should be so lucky as to manage to compile

>> it, and then to build Windows native executables, will client
>> machines still need mingw to run these files? I.e. will these
>> Windows native executables really be Windows native executables, and


>> not rely on any third party software?
>

>No to the first question. Yes to the second. (Unless your program
>explicitly requires third-party libraries, e.g. TCL/TK if you use
>Labltk.)
>
>- Xavier Leroy

Hallvard Ystad

unread,
Oct 11, 2002, 8:27:57 AM10/11/02
to Dave Mason, caml...@inria.fr
I know, but then I have to remove other recipients... When people answer my=
e-mails to the list, I get a double reply, both to my private e-mail and to=
the list... So, well.. If it's meant to be that way, I won't make any=
further fuss about it...

Regards,
~H
Dixit Dave Mason (14.13 11.10.2002):
>Hi,
>
>Use reply-all instead of reply and you'll get the mailing list.
>
>../Dave

Christophe Raffalli

unread,
Oct 11, 2002, 9:18:37 AM10/11/02
to dmitry grebeniuk, caml...@inria.fr
dmitry grebeniuk wrote:
> hi
>
> Have anyone succeded at building OCaml (with native-code
> compilers and threads) under MinGW?
> Can you say which packages (with its versions) have you installed
> to do this, what was the order of directories in your PATH if you
> have installed both cygwin and mingw, and which makefiles have you
> used to build OCaml?
>
> bye

I installed cygwin and the mingw package of cygwin and had no problem (I
did not compile labltk) ... and was under XP.

> -------------------
> To unsubscribe, mail caml-lis...@inria.fr Archives: http://caml.i=
nria.fr
> Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.=

--
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christoph...@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
-------------------
To unsubscribe, mail caml-lis...@inria.fr Archives: http://caml.inr=
ia.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr=

Remi VANICAT

unread,
Oct 11, 2002, 10:04:51 AM10/11/02
to caml...@inria.fr
Hallvard Ystad <hallvar...@helpinhand.com> writes:

> Hi
>
> Lists like caml...@inria.fr are a wonderful place to get help, but I

> would like to comment on the way that list is set up. There is no
> Reply-to: field in the headers, so when I click "reply" in my
> e-mail-reader, caml...@inria.fr is not addressed, but only the
> sender of the message. I have to manually change it each time. I
> dislike that (and I hate bugging people with e-mails that should go
> directly to the list). Is this really ment to be so?

Yes. (At least I believe it) See
http://www.unicom.com/pw/reply-to-harmful.html

--
Rémi Vanicat
van...@labri.u-bordeaux.fr
http://dept-info.labri.u-bordeaux.fr/~vanicat
-------------------
To unsubscribe, mail caml-lis...@inria.fr Archives: http://caml.inr=
ia.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr=

Kontra, Gergely

unread,
Oct 11, 2002, 12:36:22 PM10/11/02
to Xavier Leroy, Hallvard Ystad, caml...@inria.fr
>> I tried this week with mingw, but didn't manage. After solving a few
>> problems discussed on this list, I didn't succeed in finding out why
>> the file ocamlrun.a wasn't present. I used the CVS source files in
>> my last attempt, but that didn't help. So I'm hopelessly stranded,
>> and on the point of giving up.

Hey, wait a minute. again, a far afterimage, but...:
I remember hacking some files, because the compiler builded eg. varcc
instead of varcc.exe, shouldn't be the above ocamlrun.dll?

I mean, your compiler produced a dll, but the makefile requires .a
This could be a VERY annoying problem...

(If anybody can compile gtk and opengl with mingw, please let me know!)

Gergo
+-[Kontra, Gergely @ Budapest University of Technology and Economics]-+
| Email: kger...@mcl.hu, kger...@turul.eet.bme.hu |
| URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 |
+-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+
.
Magyar php mirror es magyar php dokumentacio: http://hu.php.net

-------------------

William Lovas

unread,
Oct 11, 2002, 4:51:22 PM10/11/02
to caml...@inria.fr
On Fri, Oct 11, 2002 at 02:26:32PM +0200, Hallvard Ystad wrote:
> I know, but then I have to remove other recipients... When people answer
> my e-mails to the list, I get a double reply, both to my private e-mail
> and to the list... So, well.. If it's meant to be that way, I won't make
> any further fuss about it...

The idea here is that people who aren't subscribed to the list can ask
questions and receive answers without *having* to subscribe. It's a minor
inconvenience for people who *are* subscribed to the list, but it would be
an extraordinary inconvenience to people who *aren't* subscribed to the
list if they couldn't get their questions answered :)

For what it's worth, if you use an email client like `mutt', you can set it
up to recognize mailing lists you are subscribed to, and then use a
reply-to-list command (`L' in mutt) as long as you know that everyone
involved in the correspondence is a list subscriber. I don't know if other
clients support features like this, but it might be something to look into.

cheers,
William

Hallvard Ystad

unread,
Oct 12, 2002, 8:06:18 AM10/12/02
to caml...@inria.fr
Dixit Christophe Raffalli (15.00 11.10.2002):
>I installed cygwin and the mingw package of cygwin and had no problem (I=

did not compile labltk) ... and was under XP.

Interesting. I uninstalled my mingw installation and installed cygwin=
(containing mingw) instead. This time, my installation went much further=
before messing up. But in the end, I still got errors, and the installation=
failed. Here's where it fails:
C:/cygwin/bin/gcc -mno-cygwin -O -Wall -Wno-unused -D_DLL -I../../../byterun=
-I../../win32unix -Ic:/tcl/include -c cltkImg.c
cltkImg.c: In function `camltk_setimgdata_native':
cltkImg.c:102: too few arguments to function `Tk_PhotoPutBlock'
make[2]: *** [cltkImg.d.o] Error 1
make[2]: Leaving directory `/cygdrive/C/ocaml/otherlibs/labltk/support'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cygdrive/C/ocaml/otherlibs/labltk'
make: *** [otherlibraries] Error 2

This is on win2k.

~H

Prætera censeo Carthaginem esse delendam

-------------------

Xavier Leroy

unread,
Oct 13, 2002, 5:57:30 AM10/13/02
to Hallvard Ystad, caml...@inria.fr
> Interesting. I uninstalled my mingw installation and installed
> cygwin (containing mingw) instead. This time, my installation went
> much further before messing up. But in the end, I still got errors,
> and the installation failed. Here's where it fails:

> cltkImg.c: In function `camltk_setimgdata_native':
> cltkImg.c:102: too few arguments to function `Tk_PhotoPutBlock'

Are you sure you have the recommended version of Tcl/TK? (8.3)

I don't want to sound condescending or anything, but make sure that
you follow every single compilation instruction given in file README.win32.

- Xavier Leroy

Hallvard Ystad

unread,
Oct 14, 2002, 1:55:36 PM10/14/02
to caml...@inria.fr
OK, I give up. People on this list have been helpful, but there are too many=
problems with the distributed source files for me to cope with. And they=
seem not to be too up-to-date, if it really is so that I can't use Tk/Tcl=
8.4.0.1. So I give up. I give up. I'll go back where I came from, i.e. the=
rebol programming language, which is installed in a second or less.

Thanks again, even though it didn't help.

~H

Dixit Xavier Leroy (11.55 13.10.2002):


>> Interesting. I uninstalled my mingw installation and installed

>> cygwin (containing mingw) instead. This time, my installation went
>> much further before messing up. But in the end, I still got errors,
>> and the installation failed. Here's where it fails:


>> cltkImg.c: In function `camltk_setimgdata_native':
>> cltkImg.c:102: too few arguments to function `Tk_PhotoPutBlock'
>

>Are you sure you have the recommended version of Tcl/TK? (8.3)
>
>I don't want to sound condescending or anything, but make sure that
>you follow every single compilation instruction given in file README.win32.
>
>- Xavier Leroy

Prætera censeo Carthaginem esse delendam

Jacques Garrigue

unread,
Oct 23, 2002, 11:36:21 PM10/23/02
to hallvar...@helpinhand.com, caml...@inria.fr
From: Xavier Leroy <xavier...@inria.fr>

> > Interesting. I uninstalled my mingw installation and installed
> > cygwin (containing mingw) instead. This time, my installation went
> > much further before messing up. But in the end, I still got errors,
> > and the installation failed. Here's where it fails:
> > cltkImg.c: In function `camltk_setimgdata_native':
> > cltkImg.c:102: too few arguments to function `Tk_PhotoPutBlock'
>
> Are you sure you have the recommended version of Tcl/TK? (8.3)

Indeed, this error is caused by Tcl/Tk 8.4.

Here is an easy patch (useful also for users of recent Linux
distributions)

Jacques Garrigue

Index: otherlibs/labltk/support/cltkImg.c
===================================================================
RCS file: /net/pauillac/caml/repository/csl/otherlibs/labltk/support/cltkImg.c,v
retrieving revision 1.3
diff -c -r1.3 cltkImg.c
*** cltkImg.c 2002/07/23 14:11:59 1.3
--- cltkImg.c 2002/10/24 03:19:38
***************
*** 99,105 ****
pib.offset[0] = 0;
pib.offset[1] = 1;
pib.offset[2] = 2;
! Tk_PhotoPutBlock(ph,&pib,Int_val(x),Int_val(y),Int_val(w),Int_val(h));
}

CAMLprim void camltk_setimgdata_bytecode(argv,argn)
--- 99,109 ----
pib.offset[0] = 0;
pib.offset[1] = 1;
pib.offset[2] = 2;
! Tk_PhotoPutBlock(ph,&pib,Int_val(x),Int_val(y),Int_val(w),Int_val(h)
! #if (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4 || TK_MAJOR_VERSION > 8)
! , TK_PHOTO_COMPOSITE_SET
! #endif
! );
}

CAMLprim void camltk_setimgdata_bytecode(argv,argn)
Index: otherlibs/labltk/tkanim/tkAnimGIF.c
===================================================================
RCS file: /net/pauillac/caml/repository/csl/otherlibs/labltk/tkanim/tkAnimGIF.c,v
retrieving revision 1.4
diff -c -r1.4 tkAnimGIF.c
*** tkAnimGIF.c 2002/07/23 14:12:00 1.4
--- tkAnimGIF.c 2002/10/24 03:19:38
***************
*** 335,342 ****
goto error;
}
}
! Tk_PhotoPutBlock(photoHandle, &block, 0, 0,
! imageWidth, imageHeight);
#ifdef TKANIM_DEBUG
fprintf(stderr, " Retrieving result\n");
#endif
--- 335,345 ----
goto error;
}
}
! Tk_PhotoPutBlock(photoHandle, &block, 0, 0, imageWidth, imageHeight
! #if (TK_MAJOR_VERSION == 8 && TK_MINOR_VERSION >= 4 || TK_MAJOR_VERSION > 8)
! , TK_PHOTO_COMPOSITE_SET
! #endif
! );
#ifdef TKANIM_DEBUG
fprintf(stderr, " Retrieving result\n");
#endif

0 new messages