Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005077OCaml~DO NOT USE (was: OCaml general)public2010-06-16 21:062015-12-11 19:07
ReporterDmitry Grebeniuk 
Assigned To 
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version3.12.0+beta1 or 3.12.0+rc1 
Target Version4.01.0+devFixed in Version 
Summary0005077: ocaml 3.12.0+beta1, mingw: trying to compile ocamlbuild/ without -rectypes
DescriptionI'm trying to build ocaml 3.12.0+beta1 under win32/mingw:

$ make -f Makefile.nt world


make[1]: Leaving directory `/c/overbld/o312/work/ocamldoc'
OCAMLBUILD_FIND=/usr/bin/find ./build/
++ dirname ./build/
+ cd ./build/..
+ touch build/ocamlbuild_mixed_mode
+ mkdir -p _build
+ cp -rf boot _build/
+ ./build/
+ ./build/
+ ./build/
+ TAGLINE='true: -use_stdlib'
+ ./boot/ocamlrun boot/myocamlbuild.boot -tag-line '' boot/stdlib.cma boot/std_exit.cmo
+ boot/ocamlrun boot/myocamlbuild.boot -tag-line '' -log _boot_log1 ocamlbuild/ocamlbuildlightlib.cma ocamlbuild/ocamlbuildlight.byte
mkdir ocamlbuild
boot/ocamlrun boot/ocamldep -modules ocamlbuild/log.mli > ocamlbuild/log.mli.depends
mkdir stdlib
boot/ocamlrun boot/ocamldep -modules ocamlbuild/signatures.mli > ocamlbuild/signatures.mli.depends
boot/ocamlrun boot/ocamldep -modules ocamlbuild/std_signatures.mli > ocamlbuild/std_signatures.mli.depends
../ -c -I ocamlbuild -I stdlib -o ocamlbuild/std_signatures.cmi ocamlbuild/std_signatures.mli


../ -c -I ocamlbuild -I stdlib -o ocamlbuild/discard_printf.cmo ocamlbuild/
File "ocamlbuild/", line 14, characters 19-25:
Error: This expression has type 'a -> 'b
       but an expression was expected of type 'b
Exit code 2 while executing this command:
  ../ -c -I ocamlbuild -I stdlib -o ocamlbuild/discard_printf.cmo ocamlbuild/
make: *** [ocamlbuild-mixed-boot] Error 2


I've uploaded full build log.
TagsNo tags attached.
Attached Filesbz2 file icon make-world-3.12.0-beta1.log.bz2 [^] (12,830 bytes) 2010-06-16 21:06

- Relationships

-  Notes
Dmitry Grebeniuk (reporter)
2010-06-17 10:22

If I add
"boot/ocamlrun boot/myocamlbuild.boot -show-tags ocamlbuild/"
"boot/ocamlrun boot/myocamlbuild.boot [...] ocamlbuild/ocamlbuildlightlib.cma ocamlbuild/ocamlbuildlight.byte"

in file build/, I get different results on linux (ubuntu) and on win32/mingw.
On linux:

+ boot/ocamlrun boot/myocamlbuild.boot -show-tags ocamlbuild/
Tags for "ocamlbuild/":
  {. annot, debug, extension:ml, file:ocamlbuild/,
     include_unix, ocaml, quiet, rectypes, traverse, use_stdlib, warn_L,
     warn_R, warn_Z, warn_error_A .}

On mingw:
+ boot/ocamlrun boot/myocamlbuild.boot -show-tags ocamlbuild/
Tags for "ocamlbuild/":
  {. extension:ml, file:ocamlbuild/, ocaml, quiet, traverse,
     windows .}

It seems that ocamlbuild on mingw doesn't read _tags files (in root and in ocamlbuild/ subdirectory).
Dmitry Grebeniuk (reporter)
2010-07-02 13:28

I have workaround for this bug. Replace all "OCAMLBUILD_FIND=/usr/bin/find" with "OCAMLBUILD_FIND=find" in Makefile.nt (of course, mingw/msys bin directories should appear before windows' directories in PATH).

I don't know the exact reason and I don't want to dig for it, because the code (ocamlbuild/ reads the output of "find" utility to get list of files and directories, instead of using Unix library functions, and I've got lost in all these magical quotings (Printf.sprintf "%s > '%s'" in ocamlbuild/, "bash -c " + arcane String.subst in ocamlbuild/
doligez (administrator)
2012-07-10 20:17

Is this problem still present in 4.00 ?
protz (manager)
2012-07-11 11:45

Strange. I built 3.12.1 some time ago on Win32/MinGW/MSys and it worked fine for me.
doligez (administrator)
2012-07-18 16:39

Dmitry, are you using msys? We do not support that configuration directly. At any rate, the OCAMLBUILD_FIND variable should point to the Unix version of find, not to the Microsoft one (which is bundled with the MS compilers, AFAIR).
Dmitry Grebeniuk (reporter)
2012-07-18 17:25

First, sorry for delay. I could not find mingw environment to compile OCaml and had no time to make it. (it seems that OCaml 4 (or recent 3.12) needs new flexdll, so old environment is unusable here.)
Yes, I'm using mingw+msys without cygwin, and with some patches it works perfectly, so if it's easier for you not to support "without cygwin" option, let's leave everything as it is now, I'll make necessary patches and/or will use OCAMLBUILD_FIND variable when I'll have tasks that require OCaml/win.
So, if my configuration is not supported, this bug report is not a bug report at all, so let's close it.
doligez (administrator)
2012-07-19 15:05

OK, thanks for the reply.

- Issue History
Date Modified Username Field Change
2010-06-16 21:06 Dmitry Grebeniuk New Issue
2010-06-16 21:06 Dmitry Grebeniuk File Added: make-world-3.12.0-beta1.log.bz2
2010-06-17 10:22 Dmitry Grebeniuk Note Added: 0005563
2010-07-02 13:28 Dmitry Grebeniuk Note Added: 0005574
2010-07-06 13:11 doligez Status new => assigned
2010-07-06 13:11 doligez Assigned To => doligez
2012-07-10 20:17 doligez Note Added: 0007700
2012-07-10 20:17 doligez Target Version => 4.00.0+dev
2012-07-11 11:45 protz Note Added: 0007704
2012-07-18 16:39 doligez Note Added: 0007777
2012-07-18 16:39 doligez Assigned To doligez =>
2012-07-18 16:39 doligez Status assigned => feedback
2012-07-18 16:39 doligez Target Version 4.00.0+dev => 4.01.0+dev
2012-07-18 17:25 Dmitry Grebeniuk Note Added: 0007779
2012-07-18 17:25 Dmitry Grebeniuk Status feedback => new
2012-07-19 15:05 doligez Note Added: 0007780
2012-07-19 15:05 doligez Status new => resolved
2012-07-19 15:05 doligez Resolution open => no change required
2015-12-11 19:07 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker