Redhat Crash下载和编译

源码下载

官网:
http://people.redhat.com/anderson/
官网新地址:
https://crash-utility.github.io/
不同版本下载地址:
https://github.com/crash-utility/crash/releases
截止到目前,最新版本是crash-7.2.4,crash-7.2.4.tar.gz大概37.4MB
之所以这么大,主要是因为其中包含了gdb-7.6.tar.gz的源码。

编译

我要编译ARM64的crash,具体操作如下:
$ tar -xf crash-7.2.4.tar.gz
$ cd crash-7.2.4/
$ make target=arm64

首次编译时总是报同一个错误,具体信息如下:
我的PC系统是ubuntu16.04
编译输出的关键日志:
TARGET: ARM64
CRASH: 7.2.4
GDB: 7.6

Makefile:1174: recipe for target ‘gdb’ failed
Makefile:8264: recipe for target ‘all-gdb’ failed
Makefile:834: recipe for target ‘all’ failed

crash build failed

Makefile:229: recipe for target ‘gdb_merge’ failed
Makefile:224: recipe for target ‘all’ failed

后来安装了一些工具后解决
sudo apt-get install libaio-dev libncurses5-dev zlib1g-dev liblzma-dev flex bison byacc
参考这个博客:
https://blog.csdn.net/paul_liao/article/details/40581869
编译成功后会生成crash文件

$ ./crash

crash 7.2.4
Copyright © 2002-2017 Red Hat, Inc.
Copyright © 2004, 2005, 2006, 2010 IBM Corporation
Copyright © 1999-2006 Hewlett-Packard Co
Copyright © 2005, 2006, 2011, 2012 Fujitsu Limited
Copyright © 2006, 2007 VA Linux Systems Japan K.K.
Copyright © 2005, 2011 NEC Corporation
Copyright © 1999, 2002, 2007 Silicon Graphics, Inc.
Copyright © 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter “help copying” to see the conditions.
This program has absolutely no warranty. Enter “help warranty” for details.

crash: compiled for the ARM64 architecture

$ ./crash --buildinfo
build_command: crash
build_data: 2018年 12月 30日 星期日 21:26:41 CST by uid=1000(yutao) on yutao
build_target: ARM64
build_version: 7.2.4
compiler version: gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值