本文共 7861 字,大约阅读时间需要 26 分钟。
[root@localhost ~]# lltotal 7200-rw-------. 1 root root 2692 Apr 10 13:52 anaconda-ks.cfg-rw-r--r--. 1 root root 39935 Apr 10 13:52 install.log-rw-r--r--. 1 root root 9154 Apr 10 13:51 install.log.syslog-rw-r--r--. 1 root root 303586 Apr 11 22:50 lua-5.3.4.tar.gz-rw-r--r--. 1 root root 6998648 Apr 11 19:34 ntp-4.2.8p10.tar.gzdrwxr-xr-x. 2 root root 4096 Apr 12 18:57 sort[root@localhost ~]# which valgrind/usr/bin/which: no valgrind in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)[root@localhost ~]# cd /usr/local/src/[root@localhost src]# ll /root/total 19692-rw-------. 1 root root 2692 Apr 10 13:52 anaconda-ks.cfg-rw-r--r--. 1 root root 39935 Apr 10 13:52 install.log-rw-r--r--. 1 root root 9154 Apr 10 13:51 install.log.syslog-rw-r--r--. 1 root root 303586 Apr 11 22:50 lua-5.3.4.tar.gz-rw-r--r--. 1 root root 6998648 Apr 11 19:34 ntp-4.2.8p10.tar.gzdrwxr-xr-x. 2 root root 4096 Apr 12 18:57 sort-rw-r--r--. 1 root root 12788556 Apr 14 17:56 valgrind-3.12.0.tar.bz2[root@localhost src]# tar jxf /root/valgrind-3.12.0.tar.bz2 [root@localhost src]# lltotal 12drwxr-xr-x. 4 1026 1000 4096 Apr 11 23:02 lua-5.3.4drwxrwsr-x. 23 427 6011 4096 Mar 21 07:47 ntp-4.2.8p10drwxrwxr-x. 24 1000 1000 4096 Oct 21 04:03 valgrind-3.12.0[root@localhost src]# cd valgrind-3.12.0/[root@localhost valgrind-3.12.0]# lltotal 1996-rw-rw-r--. 1 1000 1000 44566 Oct 21 03:42 aclocal.m4-rw-rw-r--. 1 1000 1000 3267 Oct 21 03:37 AUTHORS-rwxrwxr-x. 1 1000 1000 191 Oct 21 03:37 autogen.shdrwxrwxr-x. 3 1000 1000 4096 Oct 21 04:01 auxprogs将源码解压缩到/usr/local/src下。
Building and installing it
~~~~~~~~~~~~~~~~~~~~~~~~~~ To install from the Subversion repository :0. Check out the code from SVN, following the instructions at
http://www.valgrind.org/downloads/repository.html.1. cd into the source directory.
2. Run ./autogen.sh to setup the environment (you need the standard
autoconf tools to do so).3. Continue with the following instructions...
To install from a tar.bz2 distribution:
4. Run ./configure, with some options if you wish. The only interesting
one is the usual --prefix=/where/you/want/it/installed.5. Run "make".
6. Run "make install", possibly as root if the destination permissions
require that.7. See if it works. Try "valgrind ls -l". Either this works, or it
bombs out with some complaint. In that case, please let us know (see www.valgrind.org).Important! Do not move the valgrind installation into a place
different from that specified by --prefix at build time. This will cause things to break in subtle ways, mostly when Valgrind handles fork/exec calls.[root@localhost valgrind-3.12.0]# ./configure --prefix=/usr/local/valgrind
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 …… config.status: executing depfiles commandsMaximum build arch: x86
Primary build arch: x86 Secondary build arch: Build OS: linux Primary build target: X86_LINUX Secondary build target: Platform variant: vanilla Primary -DVGPV string: -DVGPV_x86_linux_vanilla=1 Default supp files: exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp[root@localhost valgrind-3.12.0]# make
echo "# This is a generated file, composed of the following suppression rules:" > default.supp echo "# " exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp >> default.supp cat exp-sgcheck.supp xfree-3.supp xfree-4.supp glibc-2.X-drd.supp glibc-2.34567-NPTL-helgrind.supp glibc-2.X.supp >> default.supp make all-recursive make[1]: Entering directory `/usr/local/src/valgrind-3.12.0' Making all in include make[2]: Entering directory `/usr/local/src/valgrind-3.12.0/include' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/usr/local/src/valgrind-3.12.0/include' Making all in VEX …… make[1]: Leaving directory `/usr/local/src/valgrind-3.12.0' [root@localhost valgrind-3.12.0]# make install make install-recursive make[1]: Entering directory `/usr/local/src/valgrind-3.12.0' Making install in include make[2]: Entering directory `/usr/local/src/valgrind-3.12.0/include' make[3]: Entering directory `/usr/local/src/valgrind-3.12.0/include' make[3]: Nothing to be done for `install-exec-am'. …… make[1]: Leaving directory `/usr/local/src/valgrind-3.12.0' [root@localhost valgrind-3.12.0]# cd .. [root@localhost src]# cd .. [root@localhost local]# ll total 40 drwxr-xr-x. 2 root root 4096 Sep 23 2011 bin drwxr-xr-x. 2 root root 4096 Sep 23 2011 etc drwxr-xr-x. 2 root root 4096 Sep 23 2011 games drwxr-xr-x. 2 root root 4096 Sep 23 2011 include drwxr-xr-x. 2 root root 4096 Sep 23 2011 lib drwxr-xr-x. 2 root root 4096 Sep 23 2011 libexec drwxr-xr-x. 2 root root 4096 Sep 23 2011 sbin drwxr-xr-x. 5 root root 4096 Apr 10 13:42 share drwxr-xr-x. 5 root root 4096 Apr 14 17:57 src drwxr-xr-x. 6 root root 4096 Apr 14 18:04 valgrind [root@localhost local]# which valgrind /usr/bin/which: no valgrind in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)转载地址:http://gpgs.baihongyu.com/