AIX 5.3 安装valgrind 3.4.1

AIX 5.3 安装valgrind 3.4.1

valgrind --tool=memcheck a.out
==3350574== Memcheck, a memory error detector.
==3350574== Copyright (C) 2002-2008, and GNU GPL'd, by Julian Seward et al.
==3350574== Using LibVEX rev 1884, a library for dynamic binary translation.
==3350574== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==3350574== Using valgrind-3.4.1, a dynamic binary instrumentation framework.
==3350574== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==3350574== For more details, rerun with: -v
==3350574== 
34
==3350574== 
==3350574== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 244 from 6)
==3350574== malloc/free: in use at exit: 36,253 bytes in 91 blocks.
==3350574== malloc/free: 107 allocs, 16 frees, 41,537 bytes allocated.
==3350574== For counts of detected errors, rerun with: -v
==3350574== searching for pointers to 91 not-freed blocks.
==3350574== checked 8,905,416 bytes.
==3350574== 
==3350574== LEAK SUMMARY:
==3350574==    definitely lost: 52 bytes in 2 blocks.
==3350574==      possibly lost: 0 bytes in 0 blocks.
==3350574==    still reachable: 36,201 bytes in 89 blocks.
==3350574==         suppressed: 0 bytes in 0 blocks.
==3350574== Rerun with --leak-check=full to see details of leaked memory.
1、依赖M4
gunzip -c m4-1.4.9 .tar.gz | tar -xvf -
./configure --prefix=m4-1.4.9 CC=gcc#prefix指定安装目录(全路径)


confiugre --prefix=./ 
2、依赖autoconfig
gunzip -c  autoconf.tar.gz | tar -xvf -
./configure --prefix=autoconf-2.69
make 
make install
3、依赖automake
./configure --prefix= automake-1.14

4、gnu sed 安装
gunzip -c   sed-4.2.2.tar.gz | tar -xvf -
./configure --prefix= sed-4.2.2
系统可能存在sed 可以通过sed --version来检查 ,是否是gnu 
否则需要修改环境变量,将sed 设置到 安装的 4.2.2的bin目录(在usr/bin之前)
我之后仍然报错,只能手动修改configure把sed的检测去掉

4、安装valgrind
gunzip -c   valgrind-3.4.1 .tar.gz | tar -xvf -
bzip2 -d    valgrind-3.4.1 .tar.bz2 
./configure --prefix= valgrind-3.4.1
./autogen.sh
gmake -j32
gmake install
按转过程中可能遇到ld 连接静态库错误,找不到/lib/ syscalls.exp
解决方法:手动把gcc中的-static 去掉 ,不采用静态编译。
最后gmake,gmake install
valgrind --tool=memcheck ./a.out


遇到的问题:
1、缺少各种依赖,比如automake,autoconfig
解决方法:去google上下载,安装 
2、配置的时候发现sed不是 gnu的
解决方法:修改环境变量,把你安装的放在系统的前面(/use/bin之前)
3、gmake时候,报找不到syscalls.exp
解决方法:手动修改gcc编译参数,将静态的-static去掉。不采用静态编译。
其他:
编译工具使用gcc ,------xlC_r会报错,
make 使用gmake ,其他不行。
ATX 5.3只能使用valgrind的3.4.1版本,其他的不行(3.3.0,3.8.0)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值