I would just like to share with you my experience of compiling OCaml 3.11 with MinGW and Minimal SYStem (MSYS).
I had to set the FLEXLINKFLAGS environment variable to have OCaml compile successfully:
export FLEXLINKFLAGS="-nocygpath -L C:\MinGW\lib"
(note that I installed MinGW in the default folder C:\MinGW)
Indeed, the documentation states that flexdll will call cygpath to solve paths, and cygpath is not available under MSYS.
The -L was needed so that flexdll could find libraries.
Apart from that, the usual (1) copy configuration files (2) make world, opt, opt.opt, install
went smoothly.
I now have a functional OCaml, with a MSYS twice as small as the equivalent Cygwin installation, and compilation goes at least twice as fast with MSYS.
So... my questions are the following:
- what is the "official" status of OCaml on MinGW/MSYS? The README.win32 still says that only Cygwin may be used, but that appears not to be the case anymore.
- did I miss something with flexdll? Are those extra flags always necessary with MinGW/MSYS, or is there a different way?
Cheers,
Matthieu
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
I believe the -nocygpath is not necessary. If cygpath is not available,
flexdll will simply not use it.
-- Alain
I tryed to follow your guidelines, but I the step make world stopped
with an error. Here is what I did:
1 -- I edited d:/msys/1.0/etc/profile adding: export FLEXLINKFLAGS="-
nocygpath -L /d/msys/MinGW/lib"
Since I am like Skinner's doves, I also tried all combinations of path
and / \
2 -- The configure step ended without much ado. However, there was a
message saying that labltk would not be support. I have tk inside
MinGW, but it was not able to find it. Maybe you can tell me why.
3 -- make world ended with an error:
libcamlrun.a(main.o):main.c:(.text+0x26): undefined reference to
`caml_expand_command_line'
libcamlrun.a(sys.o):sys.c:(.text+0x4ea): undefined reference to
`caml_win32_random_seed'
libcamlrun.a(startup.o):startup.c:(.text+0x936): undefined reference
to `caml_signal_thread'
libcamlrun.a(signals_byt.o):signals_byt.c:(.text+0x46): undefined
reference to `caml_win32_signal'
libcamlrun.a(signals_byt.o):signals_byt.c:(.text+0xab): undefined
reference to `caml_win32_signal'
collect2: ld returned 1 exit status
make[2]: *** [ocamlrun] Error 1
make[2]: Leaving directory `/home/ocaml-3.11.0/byterun'
make[1]: *** [coldstart] Error 2
make[1]: Leaving directory `/home/ocaml-3.11.0'
make: *** [world] Error 2
Any hints?