IOS

IOS崩溃命令行工具atosl安装记录

Centos安装

1、安装依赖包libdwarf、binutils-devel、lasso、tbb

yum -y install libdwarf-devel libdwarf-tools binutils-devel lasso libdwarf lasso-python libdwarf-tools libdwarf-static tbb

2、创建libdwarf.h软连接

ln -s /usr/include/libdwarf/libdwarf.h /usr/include/libdwarf.h

ln -s /usr/include/libdwarf/dwarf.h /usr/include/dwarf.h

3、获取atosl源码

cd /usr/local/ && git clone https://github.com/facebook/atosl.git

4、安装atosl

cd atosl  #进入源码目录
echo "LDFLAGS += -L/usr/bin" > ./config.mk.local     #添加objdump环境目录
make   #编译安装

5、测试命令

默认安装完成后,命令是在你源码包路径下
Example:/usr/local/atosl是我源码存储目录,那安装完成后命令路径为/usr/local/atosl/atosl
所以需要做个软连接让环境变量中可以查到:
# ln -s /usr/local/atosl/atosl  /usr/bin/atosl

命令结果如下:
http://openskill.cn/uploads/article/20160108/c579645f9cad08de20fe51a01a754d9d.png

Ubuntu安装

1、安装libdwarf-dev、 dwarfdump、binutils-dev 、libiberty-dev软件包

$ sudo apt-get install libdwarf-dev dwarfdump binutils-dev libiberty-dev

2、从github克隆下载atosl源码

$ git clone https://github.com/facebook/atosl.git

3、进入源码目录安装

$ cd atosl

Create a local config config.mk.local which contains a flag with the location of your binutil apps. (in Ubuntu by default that's /usr/bin). If you're not sure, you can find out by executing cat /var/lib/dpkg/info/binutils.list | less and copy the path of the file objdump. E.g. if the entry is /usr/bin/objdump, your path is /usr/bin.

So in the end, your config.mk.local should look like this:

$ echo "LDFLAGS += -L/usr/bin" > ./config.mk.local
$ make

4、测试命令
http://openskill.cn/uploads/article/20160108/c579645f9cad08de20fe51a01a754d9d.png

参考:

https://github.com/facebook/hhvm/issues/536
https://github.com/facebook/hhvm/wiki/Building-and-installing-HHVM-on-CentOS-6.3
http://stackoverflow.com/questions/15070680/ios-symbolication-server-side

3 个评论

Good Note
$ sudo apt-get install libiberty-dev Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package libiberty-dev 无法安装libiberty-dev解决方案: 1.下载libiberty-dev http://packages.ubuntu.com/trusty/amd64/libiberty-dev/download http://packages.ubuntu.com/trusty/i386/libiberty-dev/download 2.sudo dpkg -i ./libiberty-dev_20131116-1_amd64.deb 至此安装完毕。
ln -s /usr/include/libdwarf/dwarf.h /usr/include/dwarf.h

要回复文章请先登录注册