Infer of facebook使用简介 Mac篇II

前一篇Infer of facebook使用简介 Mac篇 有点问题, 在查找的过程中, 发现Infer的Install Help 已经做了更新。

重新安装一次看下是否还有问题。

1. 安装相关的依赖

1)install autoconf >= 2.63 and automake >= 1.11.1

brew install autoconf automake

2) install opam

brew install opam, 需要点时间。

opam init

eval $(opam config env) 

2) python 2.7 已有

3) Java (only needed for the Java analysis) 已有

4) clang in Xcode command line tools. You can install them with the command xcode-select --install (only needed for the C/Objective-C analysis)

5) Xcode >= 6.1 (only needed for the C/Objective-C analysis) 

通过app store安装了Xcode 7.2

2. 下载release infer from https://github.com/facebook/infer/releases/tag/v0.4.0 for mac

当前是v0.4.0

3. 编译安装infer

tar xf infer-*-v0.4.0.tar.xz 

cd infer-*-v0.4.0 make -C infer 

export PATH=`pwd`/infer/bin:$PATH

4. 用example下的Hello.java测试

infer -- javac Hello.java
Starting analysis (Infer version v0.4.0)
Analysis done
Hello.java:4: error: NULL_DEREFERENCE
  object s last assigned on line 3 could be null and is dereferenced at line 4
Analyzed 2 procedures in 1 file

终于可用了。。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值