The recommended installation method is FreeBSD Ports & Packages.
Note: There may be some differences or delays between binary package versions and port versions, depending on whether you use Quarterly or Latest package branch.
The devel/valgrind port 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.
Install using either:
cd /usr/ports/devel/valgrind && make install ORpkg install valgrind
The devel/valgrind-devel port will install a version of Valgrind that is tracking the upstream git repository, and is updated if/when there are sufficient fixes between official Valgrind releases.
Install using either:
cd /usr/ports/devel/valgrind-devel && make install ORpkg install valgrind-develBuilding valgrind requires the following ports to be installed:
Starting with Valgrind 3.18.1 FreeBSD support has been integrated into the main Valgrind codebase. Prior to 3.18.1 (though still maintained) the source was hosted on on GitHub
To check out pre-3.18.1 versions of the source:
git clone https://github.com/paulfloyd/freebsd_valgrind.git
The mercurial bitbucket repo that was the basis of the FreeBSD Valgrind port up to 3.17 is no longer accessible.
sh autogen.sh ./configure gmake gmake install
__sync builtins (also available with clang). And a couple of syscalls for futex. Shouldn't be too hard to port to use _umtx_op.