0

I'm trying to build flow so that I can make modifications to their code and build my own version to use and test. But when I'm trying to build it, it dies. The following steps were used:

  1. Install OCaml (followed steps from https://ocaml.org/docs/install.html)
  2. Install Opam
  3. Run:

    opam update
    opam pin add flowtype . -n
    opam install --deps-only flowtype
    
  4. Then, I tried to make it:

    make
    

At the very first seconds, it dies with:

ocamlbuild \
        -use-ocamlfind -pkgs compiler-libs.common,unix \
        -I scripts \
        scripts/ppx_gen_flowlibs.native
+ ocamlfind ocamldep -package wtf8 -package dtoa -package unix -package compiler-libs.common -modules scripts/ppx_gen_flowlibs.ml > scripts/ppx_gen_flowlibs.ml.depends
ocamlfind: Package `wtf8' not found
Command exited with code 2.
Compilation unsuccessful after building 1 target (0 cached) in 00:00:01.
Makefile:300: recipe for target '_build/scripts/ppx_gen_flowlibs.native' failed
make: *** [_build/scripts/ppx_gen_flowlibs.native] Error 10

It is possible that only I missed something, but I'm not really into OCaml and Opam at the moment.

Janekx
  • 631
  • 6
  • 21
  • Provided an answer to this specific question, but can I ask why you want to modify Flow in the first place? Perhaps you have a question about Flow that could be answered via `.flowconfig`? – Spain Train Feb 14 '18 at 21:36
  • I've checked the docs and sadly I have to modify the flow a little bit. I'd like to save the call graph/control flow graph it creates, and this is not in their api. – Janekx Feb 20 '18 at 13:55

1 Answers1

0

The pertinent error info appears to be ocamlfind: Package 'wtf8' not found.

Have you inited opam? If not you need to run opam init --comp 4.03.0 and restart your shell before running the other opam commands. (For more detail, see https://opam.ocaml.org/doc/Usage.html).

If you have, run opam list and see if wtf8 is in the list of installed packages. If it is not in the list, try running opam install wtf8. If it is in the list, try following the solutions to this same issue here ocamlfind cannot see installed package.

Spain Train
  • 5,890
  • 2
  • 23
  • 29
  • Great, thanks for the links. I checked the issue you mentioned and did a totally fresh install and configure, it solved the problem – Janekx Feb 20 '18 at 13:57