Search code examples
buildvalgrind

How to build and install Valgrind on Mac?


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 not know ANY terminal/console commands and am generally new to programming, so I have no idea how to "build" or "compile" it. I just have a folder called Valgrind with a bunch of random files in it.

Could someone please tell me how to proceed? I already checked the website/documentation but it didn't really give me installation instructions, just usage instructions.

Thanks

PS: I know I already posted this question, but the previous question was shut down, for being too vague. I reposted this one with more info.

PSS: All that I am basically asking is what do I do to install Valgrind right after I download it from the website and extract the files?


Solution

  • Recommended:

    Use brew: brew install valgrind

    Manual Install:

    Here's what worked on my Mac (10.6). Double-check you have the latest version, then change into the uncompressed directory

    cd /users/(insert username here)/downloads/valgrind-3.17.0
    

    I suggest you do as another posted and read the readme.

    nano README
    

    Commence the build; /usr/local is the place on the filesystem that the program will be installed to. There are many arguments like prefix that are available to customize the installation to your particular system if it doesn't work by default. Normally just using ./configure works perfectly well though.

    ./configure --prefix=/usr/local
    
    make
    
    sudo make install
    

    Or you could probably get it from fink or macports or homebrew.