How to build and install Valgrind on Mac?

后端 未结 5 1574
粉色の甜心
粉色の甜心 2021-02-03 22:14

I am on Mac OS X using codeblocks 10.05

I downloaded Valgrind, and extracted a folder. I am completely lost from there, and have no idea how to build it.

I do no

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-03 23:06

    On MacOS High Sierra

    If you have the following error message:

    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.
    

    Fix

    (1) To correctly install it, first, type the following command at the Terminal (which opens Valgrind’s formulae)

    brew edit valgrind
    

    And change the URL in head section

    https://sourceware.org/git/valgrind.git
    

    to

    git://sourceware.org/git/valgrind.git
    

    (2) Do an update for Homebrew:

    brew update
    

    (3) Finally, use the following command to install Valgrind from the HEAD:

    brew install --HEAD valgrind
    

    Sources

    • https://www.gungorbudak.com/blog/2018/04/28/how-to-install-valgrind-on-macos-high-sierra/
    • https://github.com/Homebrew/homebrew-core/issues/18998

提交回复
热议问题