ERROR when install infer from source on Mac OS X
infer (master) make -C infer
make -C src clang
sed -e 's/@MAJOR@/0/g'
-e 's/@MINOR@/1/g'
-e 's/@PATCH@/0/g'
-e 's/@GIT_COMMIT@/2bce7c6c3dbb22646e2d67a2c6ade77f060b4bca/g'
-e 's/@GIT_BRANCH@/master/g'
-e 's/@GIT_TAG@//g'
backend/version.ml.in > backend/version.ml
atdgen -t backend/jsonbug.atd -o backend/jsonbug
make[1]: atdgen: No such file or directory
make[1]: *** [backend/jsonbug_t.ml] Error 1
make: *** [clang] Error 2
Seems like you haven't installed some of the dependencies required to compile Infer.
Please look at the instructions provided for your OS: https://github.com/facebook/infer/blob/master/INSTALL.md#install-infer-from-source
and in particular to the point where you run:
opam install sawja.1.5 atdgen.1.5.0 javalib.2.3 extlib.1.5.4
I encountered this same issue. Below is the series of commands run, as per the installation instructions for OSX. Are you sure it's not something else?
$opam init --comp=4.01.0
$opam install sawja.1.5 atdgen.1.5.0 javalib.2.3 extlib.1.5.4
$./update-fcp.sh && ../facebook-clang-plugin/clang/setup.sh && ./compile-fcp.sh
$make -C infer
make -C src clang
sed -e 's/@MAJOR@/0/g'
-e 's/@MINOR@/1/g'
-e 's/@PATCH@/0/g'
-e 's/@GIT_COMMIT@/ee3f88a6c13f954aff8796c5536aa022b5c4bc20/g'
-e 's/@GIT_BRANCH@/master/g'
-e 's/@GIT_TAG@//g'
backend/version.ml.in > backend/version.ml
atdgen -t backend/jsonbug.atd -o backend/jsonbug
make[1]: atdgen: No such file or directory
make[1]: *** [backend/jsonbug_t.ml] Error 1
make: *** [clang] Error 2
me too,I want to analyse only Java/Android code,so I don't install clang and facebook-clang-plugin dependencies,but error below in Mac OS X 10.2.2.
58deMacBook-Pro:infer wuxian$ make -C infer java
make -C src java
/bin/sh: line 0: cd: /Users/wuxian/Documents/sourcecode/self/infer/../facebook-clang-plugin: No such file or directory
/bin/sh: line 0: cd: /Users/wuxian/Documents/sourcecode/self/infer/../facebook-clang-plugin: No such file or directory
/bin/sh: line 0: cd: /Users/wuxian/Documents/sourcecode/self/infer/../facebook-clang-plugin: No such file or directory
sed -e 's/@MAJOR@/0/g' \
-e 's/@MINOR@/1/g' \
-e 's/@PATCH@/0/g' \
-e 's/@GIT_COMMIT@/2bce7c6c3dbb22646e2d67a2c6ade77f060b4bca/g' \
-e 's/@GIT_BRANCH@/master/g' \
-e 's/@GIT_TAG@//g' \
backend/version.ml.in > backend/version.ml
atdgen -t backend/jsonbug.atd -o backend/jsonbug
make[1]: atdgen: No such file or directory
make[1]: *** [backend/jsonbug_t.ml] Error 1
make: *** [java] Error 2
@chris-wood: try running which atdgen and if you don't see the path to atdgen it's a sign that you missed some steps while installing the dependencies through OPAM (there is an eval command that OPAM tells you to run, to make sure your shell finds the installed dependencies; try installing them again to see these instructions again).
@DoctorQ: The No such file or directory error lines are not the cause of your compilation failure (they need to be removed though, because may be confusing, thanks for reporting!), follow the same suggestion above, install again the OPAM dependencies and follow all the instructions it shows on the console before running make -C infer java again.
@martinoluca: good call -- atdgen is indeed missing. Though, according to opam, it's not.
[cwood@corncake:~/Projects/infer]$ opam install atdgen.1.5.0 [NOTE] Package atdgen is already installed (current version is 1.5.0).
@chris-wood: did you run eval $(opam config env)?
Nope -- that wasn't part of the instructions. Trying now...
@martinoluca thanks,my opam has a error,how to solve it.
[ERROR] At
~/.opam/repo/default/packages/lwt-parallel/lwt-parallel.0.1.0/opam:2:19:
Unexpected name lwt_parallel
[WARNING] conflict is an unknown field in
/Users/wuxian/.opam/repo/default/packages/mirage/mirage.2.4.0/opam.
@jvillard: That did it. It's compiling now. Many thanks!
@martinoluca: You should consider adding that step to the OSX instructions.
@DoctorQ start from a clean installation of OPAM if you can.
When you install software with OPAM, it places it under the ~/.opam/ prefix. To make binaries available into your path, you must run:
$ eval `opam config env`
An alternative is to run the shell command using opam exec <command> which will run it in a subshell with the right PATH variable. The instructions should be updated to include one of these steps.
closed by 17f0b5c
After running the following command its working for me. $ eval 'opam config env'
Thank you guys...