Is there a way to install Valgrind on Catalina?

Viewed 8601

Is there a way to install Valgrind on Catalina and have it run properly? If so, I would very much appreciate a step-by-step process.

I tried installing Valgrind with https://github.com/sowson/valgrind but when I tested out helloWorld.cpp on the terminal, the console returned errors I should not have gotten.

I'm not sure if I committed an error on my part in the installation process of this version of Valgrind or if Valgrind itself is simply incompatible with Catalina OS.

I have also tried installing Valgrind via Homebrew, but I've had issues with that as well (github.com/Homebrew/homebrew-core/issues/36683).

4 Answers

Currently, no. The repo you link has an issue raised about Catalina compatibility. As you also show, the brew package has its own problems as well. Official valgrind only supports 10.12.

You'll just have to wait, or containerize it. Although if you containerize valgrind, you would likely need a compatible build container as well.

Works amazingly!! see https://github.com/LouisBrunner/valgrind-macos/issues/5.

Not Homebrew, you need to compile it from source, but it's not so difficult.

1. git clone https://github.com/LouisBrunner/valgrind-macos.git
2. cd valgrind
3. sudo ./autogen.sh
4. sudo ./configure --prefix=/where/you/want/it/installed --enable-only64bit
5. copy the [contents][1] to ./coregrind/m_mach/mach_basics.c
6. sudo make 
7. sudo make install

enjoy!

This is how I just did it on Catalina 10.15.5:

brew remove valgrind # remove previous attempts at installing it (if any)
brew tap LouisBrunner/valgrind
brew install --HEAD LouisBrunner/valgrind/valgrind

Source: https://github.com/LouisBrunner/valgrind-macos

Related