Valgrind on Mac OS X (10.10) Yosemite

The trunk version of valgrind seems to be compiling properly on Mac OS X (10.10.2), Xcode 6.2.

Here’s my self-explanatory build script:

#! /usr/bin/env bash

mkdir -p buildvalgrind
cd buildvalgrind
svn co svn:// valgrind
cd valgrind
./configure --prefix=/usr/local
make && sudo make install

# check that we have our valgrind installed
/usr/local/bin/valgrind --version

UPDATE: r15088 works for Xcode 6.3 commandline tools. r14960 as shown in the build script above only works for Xcode 6.2 commandline tools. Julian Seward (the valgrind creator himself) gave me the heads-up.

svn diff -c15088
--- (revision 15087)
+++ (revision 15088)
@@ -154,7 +154,7 @@
# Note: m4 arguments are quoted with [ and ] so square brackets in shell
# statements have to be quoted.
case "${is_clang}-${gcc_version}" in
- applellvm-5.1|applellvm-6.0*)
+ applellvm-5.1|applellvm-6.*)
AC_MSG_RESULT([ok (Apple LLVM version ${gcc_version})])

P.S.: This is an update to the original post here

  • jacob esau salazar solano

    I think you meant Yosemite, hehe.

    I’ve been trying to install for a while with the following persistent problem when I try “./configure –prefix=/usr/local” :

    checking for a supported version of gcc… Configured with: –prefix=/Applications/ –with-gxx-include-dir=/usr/include/c++/4.2.1
    Configured with: –prefix=/Applications/ –with-gxx-include-dir=/usr/include/c++/4.2.1
    no (6.1.0)
    configure: error: please use gcc >= 3.0 or clang >= 2.9 or icc >= 13.0

    Do you have any idea how to solve this? I have Xcode Version 6.3 with command line tools installed. As I understand gcc is a link to LLMV’s clang. Your help is deeply appreciated!

    • Ah, you are right… so silly of me. Yosemite!. :-p Corrected.

      Will check it in a bit.