Valgrind on macOS Sierra

前端 未结 5 1377
青春惊慌失措
青春惊慌失措 2020-12-14 00:17

I following this guide:

valgrind installation guide

After I have downloading the package, and I have run the sh script, but when I launch the make inst

相关标签:
5条回答
  • I know this is an old question, but I got kinda fed up with the last few versions of macOS not supporting Valgrind, so I just coded a simple tool in Python that allows you to use Valgrind through Docker:

    https://github.com/kokkonisd/macgrind

    0 讨论(0)
  • 2020-12-14 00:23

    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.

    0 讨论(0)
  • 2020-12-14 00:28

    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.

    0 讨论(0)
  • 2020-12-14 00:31

    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/

    0 讨论(0)
  • 2020-12-14 00:41

    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.
    

    Update: seems it works on "High Sierra" OOTB now too, it now says:

    ...versions newer than High Sierra due to an upstream incompatibility...

    0 讨论(0)
提交回复
热议问题