compilation fails with Env.Error(_) #6565
Original bug ID: 6565
I am sorry, here is another one. (Jacques, I'm not sure if this is in your neck of the woods or not.)
The compiler fails with "Env.Error(_)" and as far as I could tell in gdb, the actual exception was [Inconsistent_import] (env.ml:58) where both the module name and one of the other remaining two arguments to the exception constructor were the unit name of the source file. I presume what was happening is that the compiler was trying to report an error and failed. I'm not sure we know what the actual error was at this stage.
#0 camlCamlinternalLazy__force_lazy_block_1010 () at camlinternalLazy.ml:32
init=, fini=, rtld_fini=,
stack_end=0x7fffffffd2a8) at libc-start.c:226
#31 0x0000000000445929 in _start ()
Comment author: @mshinwell
This isn't completely fixed. Today I have a compilation that fails with the same error; the backtrace is:
Breakpoint 3, 0x000000000063449c in caml_reraise_exn ()
rtld_fini=, stack_end=0x7fffffffd3b8) at libc-start.c:226
#19 0x0000000000445979 in _start ()
I confirmed that removing -short-paths makes the error go away. The type error it was trying to report was of the form:
Error: This pattern matches values of type X.t = X.T.t
Comment author: @garrigue
I'm not sure I understand the error handling code in location.ml (Alain could help here).
My first fix did not wrap the call to error_of_exn, so I've tried putting inside the try ... with too.