Git Product home page Git Product logo

Comments (13)

martinoluca avatar martinoluca commented on May 18, 2024

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

from infer.

chris-wood avatar chris-wood commented on May 18, 2024

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

from infer.

DoctorQ avatar DoctorQ commented on May 18, 2024

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


from infer.

martinoluca avatar martinoluca commented on May 18, 2024

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

from infer.

chris-wood avatar chris-wood commented on May 18, 2024

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

from infer.

jvillard avatar jvillard commented on May 18, 2024

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

from infer.

chris-wood avatar chris-wood commented on May 18, 2024

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

from infer.

DoctorQ avatar DoctorQ commented on May 18, 2024

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

from infer.

chris-wood avatar chris-wood commented on May 18, 2024

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

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

from infer.

martinoluca avatar martinoluca commented on May 18, 2024

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

from infer.

avsm avatar avsm commented on May 18, 2024

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.

from infer.

jvillard avatar jvillard commented on May 18, 2024

closed by 17f0b5c

from infer.

RameshAran avatar RameshAran commented on May 18, 2024

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

Thank you guys...

from infer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.