Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005077OCamlOCaml generalpublic2010-06-16 21:062012-07-19 15:05
ReporterDmitry Grebeniuk 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionno 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/discard_printf.ml 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/mixed-boot.sh
++ dirname ./build/mixed-boot.sh
+ cd ./build/..
+ touch build/ocamlbuild_mixed_mode
+ mkdir -p _build
+ cp -rf boot _build/
+ ./build/mkconfig.sh
+ ./build/mkmyocamlbuild_config.sh
+ ./build/boot.sh
+ 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
../ocamlcomp.sh -c -I ocamlbuild -I stdlib -o ocamlbuild/std_signatures.cmi ocamlbuild/std_signatures.mli

[...]

../ocamlcomp.sh -c -I ocamlbuild -I stdlib -o ocamlbuild/discard_printf.cmo ocamlbuild/discard_printf.ml
File "ocamlbuild/discard_printf.ml", 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:
  ../ocamlcomp.sh -c -I ocamlbuild -I stdlib -o ocamlbuild/discard_printf.cmo ocamlbuild/discard_printf.ml
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
(0005563)
Dmitry Grebeniuk (reporter)
2010-06-17 10:22

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

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

================
+ boot/ocamlrun boot/myocamlbuild.boot -show-tags ocamlbuild/discard_printf.ml
Tags for "ocamlbuild/discard_printf.ml":
  {. annot, debug, extension:ml, file:ocamlbuild/discard_printf.ml,
     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/discard_printf.ml
Tags for "ocamlbuild/discard_printf.ml":
  {. extension:ml, file:ocamlbuild/discard_printf.ml, ocaml, quiet, traverse,
     windows .}
================

It seems that ocamlbuild on mingw doesn't read _tags files (in root and in ocamlbuild/ subdirectory).
(0005574)
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/slurp.ml) 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/slurp.ml, "bash -c " + arcane String.subst in ocamlbuild/my_std.ml).
(0007700)
doligez (administrator)
2012-07-10 20:17

Is this problem still present in 4.00 ?
(0007704)
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.
(0007777)
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).
(0007779)
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.
(0007780)
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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker