试图安装valgrind但坚持制造valgrind,怎么样?

时间:2015-05-12 08:48:32

标签: c makefile valgrind gnu-make

这可能是一个愚蠢的问题,实际上我刚刚开始使用它。 我正在关注LCTHW

的教程

我正在尝试安装valgrind,作者指定了步骤:

1)下载(如果你没有卷曲,请使用wget)

curl -O http://valgrind.org/downloads/valgrind-3.6.1.tar.bz2

使用md5sum确保它与网站上的匹配

md5sum valgrind-3.6.1.tar.bz2

2)打开包装。

tar -xjvf valgrind-3.6.1.tar.bz2

cd进入新创建的目录

cd valgrind-3.6.1

3)配置它

./配置

4)制作

5)安装它(需要root)

sudo make install

我被困在第4步,在这里做什么?该命令应该是什么样的?我以前制作了c程序但是我需要指定哪个特定文件?

这是我运行make时得到的:

Blackbeard@PC-DEV-A179:~/valgrind-3.6.1$ make
make: *** No targets specified and no makefile found.  Stop.

编辑:

由于user43250937已将其导出,./configure无法正常工作,我会收到以下信息:

$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for ranlib... ranlib
checking for a sed that does not truncate output... /bin/sed
checking for ar... /usr/bin/ar
checking for perl... /usr/bin/perl
checking for gdb... /usr/bin/gdb
checking dependency style of gcc... gcc3
checking for diff -u... yes
checking for a supported version of gcc... ok (4.8.2)
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... no
checking for a 32-bit only build... no
checking for a supported OS... ok (linux-gnu)
checking for the kernel version... unsupported (3.13.0-49-generic)
configure: error: Valgrind works on kernels 2.4, 2.6

我正在运行Ubuntu 14.04 LTS

2 个答案:

答案 0 :(得分:1)

步骤3(配置),由于缺少依赖/库,可能无法正确完成,请检查该命令的输出。

编辑:您需要一个支持内核3.x的较新版本的Valgrind,现在它们位于valgrind-3.10.1,这将起作用。

答案 1 :(得分:1)

从你的输出:

configure: error: Valgrind works on kernels 2.4, 2.6

你下载了一本荒谬的旧版valgrind吗?另外,在Ubuntu上,你可以

sudo apt-get install valgrind