Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

Fatal error: exception Failure("php checker needs a graph file") - Mac Sierra #151

Open
ScottAtGithub opened this issue Dec 7, 2016 · 8 comments

Comments

@ScottAtGithub
Copy link

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!

@istana
Copy link

istana commented Dec 7, 2016

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

@ScottAtGithub
Copy link
Author

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!

@istana
Copy link

istana commented Dec 8, 2016

that's interesting, I used install_macos.txt guide

@sarcastron
Copy link

I am also having issues compiling on OS X Sierra.

ml_glib.c:165:3: error: use of undeclared identifier 'caml__frame'

@maxbeutel
Copy link

maxbeutel commented Jan 24, 2017

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?

@winnerineast
Copy link

@maxbeutel I encountered the same error in macOS Sierra.

@istana
Copy link

istana commented Feb 2, 2017

me too, but I'm not sure how to fix it

@petitchevalroux
Copy link
Contributor

It's seems to be related to ocaml 4.04. The same issue (facebook/hhvm#7560) exists in hhvm.

Workarounds :

  1. Downgrade ocaml 3.15.3 Source version fails to build on OSX 10.12.2 facebook/hhvm#7560 (comment)
  2. Use this commit (at your own risks xD) petitchevalroux@10a3991 based from
    facebook/hhvm@28eefc4

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants