Closed copy closed 7 years ago
Actually the issue happens also if you don't run make
first, I misinterpreted some behaviour.
I'm unsure if this is a solvuu-build issue. If you rename test.ml to something else like a.ml, then it works fine. Note your error is an assertion from the compiler. I get a different error but also from the compiler:
ocamlbuild -use-ocamlfind -no-links -plugin-tag "package(solvuu-build)" ./test.cmxa
Finished, 0 targets (0 cached) in 00:00:00.
+ ocamlfind ocamlopt -o ./test.cmx -pack lib/test.cmx
Fatal error: exception Stack overflow
Raised at file "asmcomp/asmgen.ml", line 152, characters 12-15
Re-raised at file "asmcomp/asmgen.ml", line 163, characters 10-13
Called from file "asmcomp/asmgen.ml", line 248, characters 2-110
Called from file "asmcomp/asmpackager.ml", line 233, characters 2-72
Called from file "asmcomp/asmpackager.ml", line 257, characters 4-89
Re-raised at file "asmcomp/asmpackager.ml", line 261, characters 10-11
Called from file "driver/optmain.ml", line 292, characters 6-103
Re-raised at file "parsing/location.ml", line 442, characters 20-23
Re-raised at file "parsing/location.ml", line 442, characters 20-23
Re-raised at file "parsing/location.ml", line 442, characters 20-23
Re-raised at file "parsing/location.ml", line 442, characters 20-23
Re-raised at file "parsing/location.ml", line 442, characters 20-23
Re-raised at file "parsing/location.ml", line 442, characters 20-23
Called from file "driver/optmain.ml", line 323, characters 6-37
Called from file "utils/timings.ml", line 69, characters 10-13
Command exited with code 2.
Compilation unsuccessful after building 2 targets (0 cached) in 00:00:00.
make: *** [_build/./test.cmxa] Error 10
I get a different error
Which might be simply because I wasn't on an flambda enabled compiler.
Indeed, it isn't a problem with solvuu-build. The problem appears when using ~style:(`Pack pack_name)
and there's a file with the pack name in the library directory. It's this issue: https://caml.inria.fr/mantis/view.php?id=6537
Here's a minimal reproducing test case:
lib/test.ml
is an empty file.Here's log output with increased verbosity: