Open ScottAtGithub opened 7 years ago
I was just able to run it. You need to build graph data first. For some reason scheck requires working directory to be the source code of the target. This should work:
mkdir ~/pfff_output
cd ~/phpsource
~/pfff/codegraph -lang php -derived_data -o ~/pfff_output/ -build ~/phpsource
~/pfff/scheck -lang php -with_graph_code ~/pfff_output/graph_code.marshall ~/phpsource
I was able to build pfff yesterday but codegraph was not there, so I downloaded and installed softwares/plugins like gtk but was failed in building pfff (ml_glib.c:165:3: error: use of undeclared identifier 'caml__frame').
Let me try to see if I can fix it. Thank you very much anyway!
that's interesting, I used install_macos.txt guide
I am also having issues compiling on OS X Sierra.
ml_glib.c:165:3: error: use of undeclared identifier 'caml__frame'
Same for me, but on OS X El Capitan.
I followed the build instructions in install_macos.txt, make then dies with
ml_glib.c:165:3: error: use of undeclared identifier 'caml__frame'
CAMLlocal2(b, msg);
^
/usr/local/lib/ocaml/caml/memory.h:309:3: note: expanded from macro 'CAMLlocal2'
CAMLxparam2 (x, y)
^
/usr/local/lib/ocaml/caml/memory.h:236:12: note: expanded from macro 'CAMLxparam2'
(void) caml__frame, \
^
ml_glib.c:348:11: warning: 'g_io_channel_read' is deprecated [-Wdeprecated-declarations]
switch (g_io_channel_read(GIOChannel_val(io),
^
/usr/local/Cellar/glib/2.50.2/include/glib-2.0/glib/giochannel.h:166:13: note: 'g_io_channel_read' has been explicitly marked deprecated here
GIOError g_io_channel_read (GIOChannel *channel,
^
1 warning and 1 error generated.
make[3]: *** [ml_glib.o] Error 2
make[2]: *** [all] Error 2
make[1]: *** [rec] Error 2
make: *** [all] Error 2```
Edit: This should probably be reported as a separate issue I suppose?
@maxbeutel I encountered the same error in macOS Sierra.
me too, but I'm not sure how to fix it
It's seems to be related to ocaml 4.04. The same issue (https://github.com/facebook/hhvm/issues/7560) exists in hhvm.
Workarounds :
I downloaded the latest version from github today, but I always got the following error message when I tried scheck on a few php files on my Mac. This is what I tried:
./scheck ./tests/php/coverage/t1_a.php Fatal error: exception Failure("php checker needs a graph file")
Please help. Thx!