约塞米蒂和瓦尔冈

你能告诉我怎么在约塞米蒂国家公园安装瓦尔冈吗?当我尝试安装它时,我会检查内核版本... 不支持(14.0.0) Configure: error: 瓦尔恩使用 Darwin 10.x,11.x,12.x 和13.x (Mac OS X 10.6/7/8/9)”

没有正式的路径或更新,我没有找到任何东西(除了 http://comments.gmane.org/gmane.comp.kde.devel.bugs/1553705,但他们没有解决这个问题)。

44082 次浏览

Whilst it may have been the case in past OS X release cycles that Valgrind took a period of time before achieving reasonable feature support, basic OS X 10.10 support is already available in Valgrind trunk due to significant work on pre-release Yosemite.

From the mailing list:

There has been some effort recently to improve Valgrind's support for Yosemite. If you develop on Mac OS, you might like to try out the trunk (svn co svn://svn.valgrind.org/valgrind/trunk) and report any breakage you get. Support for Yosemite is good enough that at least one large graphical application (Firefox) runs OK. Support for the previous release, 10.9 (Mavericks), is also substantially improved.

Note that the work has targetted 64 bit processes only. 32 bit might work, and probably better on Mavericks, but I suspect it will be increasingly problematic on Yosemite due to Valgrind's 32 bit x86 instruction set support not having progressed passed SSSE3.

Julian Seward

http://sourceforge.net/p/valgrind/mailman/message/33047840/

Full disclosure: I'm one of the new Valgrind developers who contributed patches to support OS X 10.10

Worked for me on 10.10.1 :

svn co svn://svn.valgrind.org/valgrind
cd valgrind
./autogen.sh
./configure
make
make install

As there's no stable release that supports Yosemite, you can install the latest development version with

brew install --HEAD valgrind

Valerio's svn workflow will download every branch which is time and resource consuming. A better procedure is to download just the trunk:

svn co svn://svn.valgrind.org/valgrind/trunk valgrind
cd valgrind
./autogen.sh
./configure
make
make install

All of the solutions listed here failed for me. What finally ended up working was to use mac ports.

sudo port install valgrind-devel

Here is another take on the svn install. The previous ones did not work for me, since I needed to have automake and autoconf installed, which I did not, even though I had the latest version of the Xcode command line tools installed.

I got the following from this site. I also had to link automake and autoconf after doing brew install automake and brew install autoconf by doing brew link automake and brew link autoconf for this to work.

# Check out their repo...
$ svn co svn://svn.valgrind.org/valgrind/trunk valgrind-trunk
# and hop into it.
$ cd valgrind-trunk


# You need to have autoconf and automake installed to build Valgrind
# This example uses Homebrew to install these dependencies
# (MacPorts should also work)
# (Permission error? add sudo!)
$ brew install automake
$ brew install autoconf


# run autogen.sh in valgrind-trunk
$ ./autogen.sh


# Tricky, there are some hard wired paths in the Valgrind sources.
# You need to symlink the mach folder in your XCode SDK to /usr/include/mach
# Be sure to use the proper Xcode SDK "MacOSX10.10.sdk" in the path!
$ ln -sv /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/mach /usr/include/mach


# Run configure + set install paths in valgrind-trunk
$ ./configure --prefix=/usr/local


# Run Make and make install (permission error? add sudo!) in valgrind-trunk
$ make
$ make install


# Check it works
$ valgrind --version
valgrind-3.11.0.SVN

Here is my take on it. I more or less had a clean mac with xcode installed. Got it compiling and running with the following:

# build/install autoconf/automake/libtool so that 'autogen' works
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-2.69.tar.gz
tar -xzf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure && make && sudo make install
cd ..


curl -OL http://ftpmirror.gnu.org/automake/automake-1.14.tar.gz
tar -xzf automake-1.14.tar.gz
cd automake-1.14
./configure && make && sudo make install
cd..


curl -OL http://ftpmirror.gnu.org/libtool/libtool-2.4.2.tar.gz
tar -xzf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure && make && sudo make install
cd ..


svn co svn://svn.valgrind.org/valgrind/trunk valgrind
cd valgrind
./autogen.sh
# important: configure-params, otherwise make ends in errors
./configure -disable-tls --enable-only64bit --build=amd64-darwin
make
# sudo, otherwise it fails due to permissions
sudo make install

请注意,CallGrind_控件(来自valgrind-3.11.0 svn)似乎无法在OS X上运行,看起来像是一个Perl脚本,并且它运行的命令行工具(vgdb-l)会打印一些该脚本无法正确解析的“意外”内容(因此它无法找到使用Valgrind运行的其他进程)。

Alternatively, the perl script just calls vgdb, we can also directly do that ( just figure out your process-id manually):

vgdb --pid=2858 instrumentation on

Here's how to install it using alternative sources besides the official svn (because it seems to be intermittently available).

https://crispyappstudiosblog.wordpress.com/2015/07/07/installing-valgrind-on-osx-yosemite/

1) Navigate to this git mirror of the svn and download the latest available version: http://repo.or.cz/w/valgrind.git

2) You need VEX as well, so grab the latest version here: http://repo.or.cz/w/vex.git

3) Extract both of them. Put the entire contents of the VEX folder into a folder called VEX in the top level of the valgrind directory.

cd to the valgrind directory, and execute the following:

Run ./autogen.sh


Run ./configure


Run make


Run sudo make install

Test it out by running valgrind --version You should be running at least 3.11.0 SVN for it work on Yosemite. Valgrind 3.11.0 SVN running on OSX Yosemite 10.10.4

I have used kalmiya's instructions to build valgrind as a conda package for OSX Yosemite. For those who work with anaconda/conda, just do

conda install -c https://conda.binstar.org/groakat valgrind

Side-note: I needed to install the command line tools as described below to get valgrind compiled.

https://stackoverflow.com/a/30471647/2156909

I installed it on my mac by installing homebrew and then running this 3 commands in the terminal.

  1. brew update
  2. brew doctor
  3. brew install --HEAD valgrind

PS: I have Os X El Capitan (10.11) but this should work with previous versions too.

I got valgrind on Yosemite compiled, but had to use a hack to do so. While I think you should be using xcode-select install to get all command line tools (after which valgrind should make properly), but if you don't want to do this (eg. size of Xcode tools too big), you can also get the Darwin OSX code and copy the following files to /usr/include/mach

   mach_vm.defs
task.defs
thread_act.defs
vm_map.defs

This allowed a clean compile and install, although note it is a rather slack hack.

I finally got Valgrind to work on my OSX El Capitan 10.11.12.

User Kalmiya's answer worked for me first after I installed Xcode commandline tools.

Type this in the terminal:

xcode-select --install

Now follow Kalmiya's post, step by step. https://stackoverflow.com/a/30366798/3633475