This is an old revision of the document!
Installing Valgrind
At present (June 2022) it is recommended that you use devel/valgrind-devel.
devel/valgrind follows the official Valgrind release cycle, which is roughly aligned with the RedHat Fedora release cycle, with bi-annual releases targeted for April and October.
devel/valgrind-devel is updated when there are sufficent fixes between official Valgrind releases.
Installing from ports
pkg install valgrind will install Valgrind 3.19.0
pkg install valgrind-devel will install a version of Valgrind that is tracking the upstream git repository, 3.20.0.GIT.
There may be some delay between package builds and the above versions, particularly if you use the quarterly packages'
Prerequisites
Building valgrind requires the following ports to be installed:
- gmake
- autoconf
- automake
Obtaining the Valgrind source
Starting with Valgrind 3.18.1 FreeBSD support has been integrated into the main Valgrind codebase.
GettingTheLatestValgrindSource
Prior to 3.18.1 (though still maintained) the source was hosted on on github.
To check out this version of the source
git clone https://github.com/paulfloyd/freebsd_valgrind.git
An older version of Valgrind FreeBSD can be cloned from a mercurial repository on bitbucket.org: https://bitbucket.org/stass/valgrind-freebsd
To check out the source:
hg clone https://bitbucket.org/stass/valgrind-freebsd
Building
sh autogen.sh ./configure gmake gmake install
TODO
- A proper implementation of vgdb-invoker. This is present in the sourceware repo but not yet available in ports.
- Add freeres support to libc FreeresBugzillaItem
- Much needs to be done for clang OMP.
- Fix support for FreeBSD TLS TLS does affect Helgrind and possibly DRD.
- http://people.freebsd.org/~marcel/tls.html FreeBSD TLS notes
- http://lwn.net/Articles/5851/ Linux TLS notes
Links
- Valgrind port on freshports