Valgrind on macOS Ventura 13.0
Asked Answered
S

2

13

I'm having troubles installing Valgrind on the macOS Ventura (13.0) through the Homebrew. In the terminal I have tried following.

$ brew install valgrind

After Homebrew's autoupdate, I got the following message:

valgrind: Linux is required for this software.
Error: An unsatisfied requirement failed this build.

Is there a way I can install Valgrind?

I wanted to run Valgrind for debugging c

Silo answered 28/10, 2022 at 20:37 Comment(0)
M
15

Valgrind is not supported on macOS 13.0.

The last officially supported version is 10.13. There is no support at all for Apple silicon.

Some support for macOS versions after 10.13 is available here https://github.com/LouisBrunner/valgrind-macos

None of the Valgrind developers is actively working on Valgrind macOS. Apple makes zero contributions. I do occasionally make some changes, but that's just at the level of checking that the old code still builds.

Your best bet, if your software is portable to other OSes, is to test it on FreeBSD or Linux.

Mile answered 29/10, 2022 at 6:50 Comment(2)
thanks! this is helpful. Maybe I will explore creating a docker with a compatible Linux image.Silo
Thank you! Saves me time to search if Valgrind supports macOS Sonoma 14.5Hominy
M
9

You can use the built in MacOS command leaks:

$ leaks <your program>

For usage details see:

$ man leaks

Michelinamicheline answered 7/2, 2023 at 11:49 Comment(1)
You can use this guide(computerscience.chemeketa.edu/guides/valgrind/leaks) to understand this toolFillister

© 2022 - 2024 — McMap. All rights reserved.