Valgrind on macOS Sierra

拟墨画扇 提交于 2019-11-28 19:09:16
Musen

You can download Valgrind's latest version from their website. Then, you can just ./autogen.sh to install Valgrind. I personally did not encounter anything needed to make.

However, the sad news is, even the most recent version of Valgrind is not very usable on Mac OS Sierra. The reason is that Apple has not released the part of the source code that makes Valgrind crash, without which, the Valgrind maintainers can hardly do anything. You can read more about the discussion around the issue here .

Because Mac OS kernel is under Apple Public Source License, it has to be open-sourced someday. Thus, a Sierra-complitable version of Valgrind is only a matter of time.

Currently, I use Valgrind under Linux. This is all I can suggest now.

Latest Valgrind (git version 3.13.0) now works on MacOS Sierra but needs Xcode command line tools installed (installs needed headers).

Run this before building Valgrind:

xcode-select --install

Thanks goes to this post.

If you get an error similar to

valgrind: This formula either does not compile or function as expected on macOS versions newer than Sierra due to an upstream incompatibility.

you can try the workaround brew install --HEAD valgrind I found this information here https://www.gungorbudak.com/blog/2018/04/28/how-to-install-valgrind-on-macos-high-sierra/

If you happen to be on Sierra still, this works (but not on High Sierra), just do

$ brew install valgrind

 valgrind: This formula either does not compile or function as expected on macOS
 versions newer than Sierra due to an upstream incompatibility.
 Error: An unsatisfied requirement failed this build.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!