Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to install Valgrind on Catalina?

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).

like image 626
John Park Avatar asked Oct 13 '19 00:10

John Park


3 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.

like image 85
sweenish Avatar answered Oct 02 '22 00:10

sweenish


Ok. I've found a way to use Valgrind on Catalina. Here's a link to my guide for how https://github.com/john-yohan-park/Valgrind_Catalina

like image 4
John Park Avatar answered Oct 02 '22 02:10

John Park


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!

like image 1
linfeng chen Avatar answered Oct 02 '22 02:10

linfeng chen