jfeser/L2

Warning encountered during building

MrVPlusOne opened this issue · 1 comments

Hi,
I followed the instructions on how to build L2 and encountered the following 2 warnings during building stage:

$ make
ocaml setup.ml -build 
W: Cannot find source file matching module 'l2' in library l2.
W: Use InterfacePatterns or ImplementationPatterns to define this file with feature "source_patterns".
Finished, 1 target (0 cached) in 00:00:00.
......
File "src/l2-lib/fast_example_deduction.ml", line 389, characters 29-34:
Warning 40: Omega was selected from type Abstract_int.value.
It is not visible in the current scope, and will not 
be selected if the type becomes unknown.
File "src/l2-lib/fast_example_deduction.ml", line 390, characters 40-45:
Warning 40: Omega was selected from type Abstract_int.value.
It is not visible in the current scope, and will not 
be selected if the type becomes unknown.
File "src/l2-lib/fast_example_deduction.ml", line 395, characters 29-34:
Warning 40: Omega was selected from type Abstract_int.value.
It is not visible in the current scope, and will not 
be selected if the type becomes unknown.
File "src/l2-lib/fast_example_deduction.ml", line 396, characters 40-45:
Warning 40: Omega was selected from type Abstract_int.value.
It is not visible in the current scope, and will not 
be selected if the type becomes unknown.
File "src/l2-lib/fast_example_deduction.ml", line 401, characters 29-34:
Warning 40: Omega was selected from type Abstract_int.value.
It is not visible in the current scope, and will not 
be selected if the type becomes unknown.

...... (Many other similar warnings)

Now the compiled program seems not working and all 55 tests failed. Do you have any idea what might cause this?

$ ./tests.native 
........................E..........................E.EE
==============================================================================
Error: all-tests:7:fold_constants:8:(lambda (x) (+ 1 (* 1 5))) => 6.

File "/Users/weijiayi/Programming/OCaml/L2/_build/oUnit-all-tests-meowbook.local#01.log", line 106, characters 1-1:
Error: all-tests:7:fold_constants:8:(lambda (x) (+ 1 (* 1 5))) => 6 (in the log).

Raised by primitive operation at file "lexing.ml", line 65, characters 15-37
Called from file "src/l2-lib/lexer.ml", line 1955, characters 8-65
Called from file "src/l2-lib/parser.ml", line 4729, characters 15-27
Called from file "src/l2-lib/parser.ml", line 3499, characters 22-49
Called from file "src/l2-lib/expr.ml", line 191, characters 6-32
Called from file "src/l2-tests/tests.ml", line 173, characters 31-56
Called from file "src/l2-tests/tests.ml", line 32, characters 40-52
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(Failure "lexing: empty token")
------------------------------------------------------------------------------
==============================================================================
Error: all-tests:7:fold_constants:7:(lambda (x) (+ x (* 1 5))) => (lambda (x) (+ x 5)).

File "/Users/weijiayi/Programming/OCaml/L2/_build/oUnit-all-tests-meowbook.local#02.log", line 116, characters 1-1:
Error: all-tests:7:fold_constants:7:(lambda (x) (+ x (* 1 5))) => (lambda (x) (+ x 5)) (in the log).

Raised by primitive operation at file "lexing.ml", line 65, characters 15-37
Called from file "src/l2-lib/lexer.ml", line 1955, characters 8-65
Called from file "src/l2-lib/parser.ml", line 4729, characters 15-27
Called from file "src/l2-lib/parser.ml", line 3684, characters 22-49
Called from file "src/l2-lib/expr.ml", line 191, characters 6-32
Called from file "src/l2-tests/tests.ml", line 173, characters 31-56
Called from file "src/l2-tests/tests.ml", line 32, characters 40-52
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(Failure "lexing: empty token")

..... (Many similar failure)

Error: all-tests:3:v2-engine:0:cost-model:0.

File "/Users/weijiayi/Programming/OCaml/L2/_build/oUnit-all-tests-meowbook.local#01.log", line 43, characters 1-1:
Error: all-tests:3:v2-engine:0:cost-model:0 (in the log).

Raised at file "pervasives.ml", line 32, characters 17-33
Called from file "src/l2-lib/hypothesis.ml" (inlined), line 218, characters 20-44
Called from file "src/l2-tests/v2_engine_tests.ml", line 36, characters 10-54
Called from file "src/oUnitRunner.ml", line 46, characters 13-26

(Failure "Implement me!")
------------------------------------------------------------------------------
Ran: 55 tests in: 0.12 seconds.
FAILED: Cases: 55 Tried: 55 Errors: 4 Failures: 0 Skip:  0 Todo: 0 Timeouts: 0.

And here is my system information:

$ ./configure 

Configuration:
ocamlfind: ........................................... /Users/weijiayi/.opam/system/bin/ocamlfind
ocamlc: .............................................. /usr/local/bin/ocamlc.opt
ocamlopt: ............................................ /usr/local/bin/ocamlopt.opt
ocamlbuild: .......................................... /Users/weijiayi/.opam/system/bin/ocamlbuild
Package name: ........................................ L2
Package version: ..................................... 0.2.0
os_type: ............................................. Unix
system: .............................................. macosx
architecture: ........................................ amd64
ccomp_type: .......................................... cc
ocaml_version: ....................................... 4.04.0
standard_library_default: ............................ /usr/local/lib/ocaml
standard_library: .................................... /usr/local/lib/ocaml
standard_runtime: .................................... /usr/local/bin/ocamlrun
bytecomp_c_compiler: ................................. gcc -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT 
native_c_compiler: ................................... gcc -O2 -fno-strict-aliasing -fwrapv -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
model: ............................................... default
ext_obj: ............................................. .o
ext_asm: ............................................. .s
ext_lib: ............................................. .a
ext_dll: ............................................. .so
default_executable_name: ............................. a.out
systhread_supported: ................................. true
Install architecture-independent files dir: .......... /usr/local
Install architecture-dependent files in dir: ......... $prefix
User executables: .................................... $exec_prefix/bin
System admin executables: ............................ $exec_prefix/sbin
Program executables: ................................. $exec_prefix/libexec
Read-only single-machine data: ....................... $prefix/etc
Modifiable architecture-independent data: ............ $prefix/com
Modifiable single-machine data: ...................... $prefix/var
Object code libraries: ............................... $exec_prefix/lib
Read-only arch-independent data root: ................ $prefix/share
Read-only architecture-independent data: ............. $datarootdir
Info documentation: .................................. $datarootdir/info
Locale-dependent data: ............................... $datarootdir/locale
Man documentation: ................................... $datarootdir/man
Documentation root: .................................. $datarootdir/doc/$pkg_name
HTML documentation: .................................. $docdir
DVI documentation: ................................... $docdir
PDF documentation: ................................... $docdir
PS documentation: .................................... $docdir
findlib_version: ..................................... 1.7.1
is_native: ........................................... true
suffix_program: ......................................
Remove a file.: ...................................... rm -f
Remove a directory.: ................................. rm -rf
Turn ocaml debug flag on: ............................ true
Turn ocaml profile flag on: .......................... false
Compiler support generation of .cmxs.: ............... true
OCamlbuild additional flags: .........................
Create documentations: ............................... true
Compile tests executable and library and run them: ... false
menhir: .............................................. /Users/weijiayi/.opam/system/bin/menhir
ocamllex: ............................................ /usr/local/bin/ocamllex
pkg_core: ............................................ /Users/weijiayi/.opam/system/lib/core
pkg_core_extended: ................................... /Users/weijiayi/.opam/system/lib/core_extended
pkg_yojson: .......................................... /Users/weijiayi/.opam/system/lib/yojson
pkg_hashcons: ........................................ /Users/weijiayi/.opam/system/lib/hashcons
pkg_ounit: ........................................... /Users/weijiayi/.opam/system/lib/oUnit

The warnings and test failures are now fixed.