You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4826 Reporter: Dmitry Grebeniuk Status: resolved (set by @damiendoligez on 2012-09-17T13:00:29Z) Resolution: suspended Priority: normal Severity: minor Version: 3.11.1+rc1 Target version: 4.00.1+dev Category: ~DO NOT USE (was: OCaml general)
Bug description
I'm trying to compile ocaml under mingw from sources tarball "ocaml-3.11.1.tar.bz2" using the old procedure described in README.win32.
else if pos.pos_fname = "" && !input_name <> "none" then
Linenum.for_position !input_name pos.pos_cnum
else
(pos.pos_fname, pos.pos_lnum, pos.pos_bol)
===============================
The actual error is:
Error: The interface ocamlbuild/ocamlbuild_where.cmi
declares values, not just types. An implementation must be provided.
I think that user should see such errors without patching compiler.
Then, I've searched for a code that create file "ocamlbuild/ocamlbuild_where.ml" and found that the file is created by "ocamlbuild/start.sh". I don't know why "ocamlbuild/start.sh" was not run, but the following patch creates "ocamlbuild/ocamlbuild_where.ml" from "Makefile.nt":
I don't know whether this patch is correct (maybe "ocamlbuild/ocamlbuild_where.ml" should be created by some of "build/*.sh" scripts), but it works: ocamlbuild gets compiled and ocamlbuild compiles test projects.
The text was updated successfully, but these errors were encountered:
Sorry, this patch is wrong too: error appears when project has ocamlbuild plugin. File "ocamlbuild/ocamlbuild_where.ml", that was created at the build stage, sets the ocamlbuild's "bindir" + "libdir" to initial value "" even for installed ocamlbuild binaries, and ocamlbuild can't find file "/ocamlbuildlib.cmxa" when it compiles "myocamlbuild.ml". I have no good solution, so I've temporary fixed this issue by patching "Makefile.nt" locally, hardcoding the paths in "echo ..." command. Plugins do work, but this solution is ugly.
Original bug ID: 4826
Reporter: Dmitry Grebeniuk
Status: resolved (set by @damiendoligez on 2012-09-17T13:00:29Z)
Resolution: suspended
Priority: normal
Severity: minor
Version: 3.11.1+rc1
Target version: 4.00.1+dev
Category: ~DO NOT USE (was: OCaml general)
Bug description
I'm trying to compile ocaml under mingw from sources tarball "ocaml-3.11.1.tar.bz2" using the old procedure described in README.win32.
$ make -f Makefile.nt world
[...]
../ocamlcomp.sh -pack -g ocamlbuild/discard_printf.cmo ocamlbuild/std_signatures.cmi ocamlbuild/signatures.cmi ocamlbuild/my_std.cmo ocamlbuild/my_unix.cmo ocamlbuild/tags.cmo ocamlbuild/display.cmo ocamlbuild/log.cmo ocamlbuild/shell.cmo ocamlbuild/bool.cmo ocamlbuild/glob_ast.cmo ocamlbuild/glob_lexer.cmo ocamlbuild/glob.cmo ocamlbuild/lexers.cmo ocamlbuild/command.cmo ocamlbuild/flags.cmo ocamlbuild/slurp.cmo ocamlbuild/options.cmo ocamlbuild/pathname.cmo ocamlbuild/configuration.cmo ocamlbuild/hygiene.cmo ocamlbuild/digest_cache.cmo ocamlbuild/resource.cmo ocamlbuild/rule.cmo ocamlbuild/solver.cmo ocamlbuild/report.cmo ocamlbuild/tools.cmo ocamlbuild/fda.cmo ocamlbuild/ocaml_arch.cmo ocamlbuild/ocaml_utils.cmo ocamlbuild/ocaml_dependencies.cmo ocamlbuild/ocaml_compiler.cmo ocamlbuild/ocaml_tools.cmo ocamlbuild/ocaml_specific.cmo ocamlbuild/ocamlbuild_where.cmi ocamlbuild/ocamlbuild_Myocamlbuild_config.cmo ocamlbuild/plugin.cmo ocamlbuild/exit_codes.cmo ocamlbuild/hooks.cmo ocamlbuild/main.cmo -o ocamlbuild/ocamlbuild_pack.cmo
Fatal error: exception Sys_error("none: No such file or directory")
Exit code 2 while executing this command:
../ocamlcomp.sh -pack -g ocamlbuild/discard_printf.cmo ocamlbuild/std_signatures.cmi ocamlbuild/signatures.cmi ocamlbuild/my_std.cmo ocamlbuild/my_unix.cmo ocamlbuild/tags.cmo ocamlbuild/display.cmo ocamlbuild/log.cmo ocamlbuild/shell.cmo ocamlbuild/bool.cmo ocamlbuild/glob_ast.cmo ocamlbuild/glob_lexer.cmo ocamlbuild/glob.cmo ocamlbuild/lexers.cmo ocamlbuild/command.cmo ocamlbuild/flags.cmo ocamlbuild/slurp.cmo ocamlbuild/options.cmo ocamlbuild/pathname.cmo ocamlbuild/configuration.cmo ocamlbuild/hygiene.cmo ocamlbuild/digest_cache.cmo ocamlbuild/resource.cmo ocamlbuild/rule.cmo ocamlbuild/solver.cmo ocamlbuild/report.cmo ocamlbuild/tools.cmo ocamlbuild/fda.cmo ocamlbuild/ocaml_arch.cmo ocamlbuild/ocaml_utils.cmo ocamlbuild/ocaml_dependencies.cmo ocamlbuild/ocaml_compiler.cmo ocamlbuild/ocaml_tools.cmo ocamlbuild/ocaml_specific.cmo ocamlbuild/ocamlbuild_where.cmi ocamlbuild/ocamlbuild_Myocamlbuild_config.cmo ocamlbuild/plugin.cmo ocamlbuild/exit_codes.cmo ocamlbuild/hooks.cmo ocamlbuild/main.cmo -o ocamlbuild/ocamlbuild_pack.cmo
make[2]: *** [ocamlbuild.byte] Error 2
[...]
So, ocamlbuild was not built. I've added "-g" to Makefile.nt:
CAMLC=boot/ocamlrun boot/ocamlc -g -I boot
CAMLOPT=boot/ocamlrun ./ocamlopt -g -I stdlib -I otherlibs/dynlink
and run:
$ OCAMLRUNPARAM=b make -f Makefile.nt world
[...]
../ocamlcomp.sh -pack -g ocamlbuild/discard_printf.cmo ocamlbuild/std_signatures.cmi ocamlbuild/signatures.cmi ocamlbuild/my_std.cmo ocamlbuild/my_unix.cmo ocamlbuild/tags.cmo ocamlbuild/display.cmo ocamlbuild/log.cmo ocamlbuild/shell.cmo ocamlbuild/bool.cmo ocamlbuild/glob_ast.cmo ocamlbuild/glob_lexer.cmo ocamlbuild/glob.cmo ocamlbuild/lexers.cmo ocamlbuild/command.cmo ocamlbuild/flags.cmo ocamlbuild/slurp.cmo ocamlbuild/options.cmo ocamlbuild/pathname.cmo ocamlbuild/configuration.cmo ocamlbuild/hygiene.cmo ocamlbuild/digest_cache.cmo ocamlbuild/resource.cmo ocamlbuild/rule.cmo ocamlbuild/solver.cmo ocamlbuild/report.cmo ocamlbuild/tools.cmo ocamlbuild/fda.cmo ocamlbuild/ocaml_arch.cmo ocamlbuild/ocaml_utils.cmo ocamlbuild/ocaml_dependencies.cmo ocamlbuild/ocaml_compiler.cmo ocamlbuild/ocaml_tools.cmo ocamlbuild/ocaml_specific.cmo ocamlbuild/ocamlbuild_where.cmi ocamlbuild/ocamlbuild_Myocamlbuild_config.cmo ocamlbuild/plugin.cmo ocamlbuild/exit_codes.cmo ocamlbuild/hooks.cmo ocamlbuild/main.cmo -o ocamlbuild/ocamlbuild_pack.cmo
Fatal error: exception Sys_error("none: No such file or directory")
Raised by primitive operation at file "pervasives.ml", line 280, characters 20-46
Called from file "parsing/linenum.mll", line 62, characters 11-27
Called from file "parsing/location.ml", line 211, characters 6-51
Called from file "parsing/location.ml", line 219, characters 32-58
Called from file "parsing/location.ml", line 236, characters 2-15
Called from file "driver/errors.ml", line 54, characters 6-34
Called from file "format.ml", line 1155, characters 8-17
Called from file "driver/main.ml", line 197, characters 4-46
Called from file "driver/main.ml", line 200, characters 8-15
Exit code 2 while executing this command:
../ocamlcomp.sh -pack -g ocamlbuild/discard_printf.cmo ocamlbuild/std_signatures.cmi ocamlbuild/signatures.cmi ocamlbuild/my_std.cmo ocamlbuild/my_unix.cmo ocamlbuild/tags.cmo ocamlbuild/display.cmo ocamlbuild/log.cmo ocamlbuild/shell.cmo ocamlbuild/bool.cmo ocamlbuild/glob_ast.cmo ocamlbuild/glob_lexer.cmo ocamlbuild/glob.cmo ocamlbuild/lexers.cmo ocamlbuild/command.cmo ocamlbuild/flags.cmo ocamlbuild/slurp.cmo ocamlbuild/options.cmo ocamlbuild/pathname.cmo ocamlbuild/configuration.cmo ocamlbuild/hygiene.cmo ocamlbuild/digest_cache.cmo ocamlbuild/resource.cmo ocamlbuild/rule.cmo ocamlbuild/solver.cmo ocamlbuild/report.cmo ocamlbuild/tools.cmo ocamlbuild/fda.cmo ocamlbuild/ocaml_arch.cmo ocamlbuild/ocaml_utils.cmo ocamlbuild/ocaml_dependencies.cmo ocamlbuild/ocaml_compiler.cmo ocamlbuild/ocaml_tools.cmo ocamlbuild/ocaml_specific.cmo ocamlbuild/ocamlbuild_where.cmi ocamlbuild/ocamlbuild_Myocamlbuild_config.cmo ocamlbuild/plugin.cmo ocamlbuild/exit_codes.cmo ocamlbuild/hooks.cmo ocamlbuild/main.cmo -o ocamlbuild/ocamlbuild_pack.cmo
make[2]: *** [ocamlbuild.byte] Error 2
[...]
I've added a patch to see the actual error message (of course, this patch does the wrong thing):
===============================
--- parsing/location.ml 2009-06-17 06:28:31 +0000
+++ parsing/location.ml 2009-06-17 07:19:57 +0000
@@ -207,7 +207,7 @@
let (filename, linenum, linebeg) =
if pos.pos_fname = "" && !input_name = "" then
("", -1, 0)
Linenum.for_position !input_name pos.pos_cnum
else
(pos.pos_fname, pos.pos_lnum, pos.pos_bol)
===============================
The actual error is:
Error: The interface ocamlbuild/ocamlbuild_where.cmi
declares values, not just types. An implementation must be provided.
I think that user should see such errors without patching compiler.
Then, I've searched for a code that create file "ocamlbuild/ocamlbuild_where.ml" and found that the file is created by "ocamlbuild/start.sh". I don't know why "ocamlbuild/start.sh" was not run, but the following patch creates "ocamlbuild/ocamlbuild_where.ml" from "Makefile.nt":
===============================
--- ocaml-3.11.1/Makefile.nt 2008-11-10 16:13:20 +0000
+++ fix/Makefile.nt 2009-06-17 12:55:00 +0000
@@ -611,6 +611,7 @@
.PHONY: ocamlbuild-mixed-boot
ocamlbuild-mixed-boot:
./build/mixed-boot.sh
partialclean::
rm -rf _build
===============================
I don't know whether this patch is correct (maybe "ocamlbuild/ocamlbuild_where.ml" should be created by some of "build/*.sh" scripts), but it works: ocamlbuild gets compiled and ocamlbuild compiles test projects.
The text was updated successfully, but these errors were encountered: