[Omake] building omake

Sam Steingold sds at gnu.org
Thu Jul 2 12:29:37 PDT 2009


Aleksey,

> the next error:
> 
> *** omake error:
>     File OMakeroot: line 203, characters 28-51
>     arity mismatch: expected 1 args, got 2
> 
> 
> for this:
> 
> InstantiateEnvs(env_name) =
>    envs = $(getvar $(env_name))
>    tgts[] = $(set $(envs.map $(fun env, $(env.tgts))))
>    ...
> 
> "line 203, characters 28-51" is "$(fun env, $(env.tgts))"

replacing $(fun env, $(env.tgts)) with $(fun env => $(env.tgts))
got me through this, but now I get:

*** omake: reading OMakefiles
--- Checking for ocamlfind... (found /janelibs/ocaml-3.11.1+jane1_64/bin/ocamlfind)
--- Checking for ocamlc.opt... (found
/janelibs/ocaml-3.11.1+jane1_64/bin/ocamlc.opt)
--- Checking for ocamlopt.opt... (found
/janelibs/ocaml-3.11.1+jane1_64/bin/ocamlopt.opt)
--- Checking whether ocamlc understands the "z" warnings... (yes)
ocamlopt.opt version 3.11.1+jane1
--- Checking for latex... (found /usr/bin/latex)
--- Checking LaTeX capabilities... (tetex2 mode enabled)
Fatal error: exception Stack_overflow

I added "BYTE_ENABLED = true" to the top-level omake/OMakefile, did "./omake
omake.run" in 0.9.8.x/src/main, and tried it instead of the "opt" version:


Called from file "list.ml", line 57, characters 20-23
Called from file "omake_eval.ml", line 1312, characters 23-74
Called from file "omake_eval.ml", line 2165, characters 17-43
Called from file "omake_eval.ml", line 2184, characters 28-50
Called from file "omake_eval.ml", line 1812, characters 34-65
Called from file "omake_eval.ml", line 1314, characters 19-70
Called from file "list.ml", line 57, characters 20-23
Called from file "omake_eval.ml", line 1312, characters 23-74
Called from file "omake_eval.ml", line 2165, characters 17-43
Called from file "omake_eval.ml", line 2184, characters 28-50
Called from file "omake_eval.ml", line 1812, characters 34-65
Called from file "omake_eval.ml", line 1314, characters 19-70


&c

the culprit it List.map, which is not tail-recursive.
when I replace it (by adding src/util/omake_list.ml with
===============
include List
let map f l = rev (rev_map f l)
===============
and putting "module List = Omake_list" and removing omake_util.mli (since most
files appear to "open Omake_util", they will now use the tail-recursive version
of List.map).
however, I still get Stack_overflow:

Called from file "list.ml", line 62, characters 22-25
Called from file "omake_list.ml", line 6, characters 18-31
Called from file "omake_eval.ml", line 1312, characters 23-74
Called from file "omake_eval.ml", line 2165, characters 17-43
Called from file "omake_eval.ml", line 2184, characters 28-50
Called from file "omake_eval.ml", line 1812, characters 34-65
Called from file "omake_eval.ml", line 1314, characters 19-70
Called from file "list.ml", line 62, characters 22-25
Called from file "omake_list.ml", line 6, characters 18-31
Called from file "omake_eval.ml", line 1312, characters 23-74
Called from file "omake_eval.ml", line 2165, characters 17-43
Called from file "omake_eval.ml", line 2184, characters 28-50
Called from file "omake_eval.ml", line 1812, characters 34-65
Called from file "omake_eval.ml", line 1314, characters 19-70
Called from file "list.ml", line 62, characters 22-25
Called from file "omake_list.ml", line 6, characters 18-31
Called from file "omake_eval.ml", line 1312, characters 23-74
Called from file "omake_eval.ml", line 2165, characters 17-43
Called from file "omake_eval.ml", line 2184, characters 28-50
Called from file "omake_eval.ml", line 1812, characters 34-65
Called from file "omake_eval.ml", line 1314, characters 19-70




More information about the Omake mailing list