Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR when install infer from source on Mac OS X #26

Closed
fengzzyun opened this issue Jun 12, 2015 · 13 comments
Closed

ERROR when install infer from source on Mac OS X #26

fengzzyun opened this issue Jun 12, 2015 · 13 comments
Assignees

Comments

@fengzzyun
Copy link

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

@martinoluca
Copy link
Contributor

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

@chris-wood
Copy link

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

@DoctorQ
Copy link
Contributor

DoctorQ commented Jun 12, 2015

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


@martinoluca
Copy link
Contributor

@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 martinoluca reopened this Jun 12, 2015
@chris-wood
Copy link

@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).

@jvillard
Copy link
Contributor

@chris-wood: did you run eval $(opam config env)?

@chris-wood
Copy link

Nope -- that wasn't part of the instructions. Trying now...

@DoctorQ
Copy link
Contributor

DoctorQ commented Jun 12, 2015

@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.

@chris-wood
Copy link

@jvillard: That did it. It's compiling now. Many thanks!

@martinoluca: You should consider adding that step to the OSX instructions.

@martinoluca
Copy link
Contributor

@DoctorQ start from a clean installation of OPAM if you can.

@avsm
Copy link
Contributor

avsm commented Jun 15, 2015

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.

@jvillard jvillard self-assigned this Jun 15, 2015
jvillard added a commit that referenced this issue Jun 15, 2015
Summary:
@public
The "eval `opam config env`" step was missing from the macos instructions.

See #26

Test Plan: No functional change
@jvillard
Copy link
Contributor

closed by 17f0b5c

@RameshAran
Copy link

After running the following command its working for me.
$ eval 'opam config env'

Thank you guys...

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

No branches or pull requests

7 participants