-
-
Notifications
You must be signed in to change notification settings - Fork 11.4k
Valgrind does not compile on OSX 1.9 Mavericks #23660
Comments
Have you reported this to the Valgrind developers? |
I would start there if they were on GitHub, but since they use mailing lists and bugzilla, I thought it would be simpler to start a discussion here and submit the solution to Valgrind community later. |
Registered an issue in Valgrind's bugzilla: https://bugs.kde.org/show_bug.cgi?id=326724 |
I got it to compile (from trunk) using the patches in https://gist.github.com/drodriguez/d8713b063c7d1dfd5f46 but it still doesn't work. The patches simply comment out part of the code related to two constants that seems to have dissapear in Maverics ( Anyway, as I said, it doesn’t work, I get the following when testing with
There should be some work in trunk for 10.8 according to this email http://article.gmane.org/gmane.comp.debugging.valgrind/13280 but even in trunk things do not work. So, no luck at all. |
We've updated to valgrind 3.9.0 in the meantime, but since it is well known that valgrind lags behind OS X releases, I'm closing this. |
I try and compile succeed. But running |
I'm successfully using I adjusted the valgrind formula so that patches look like: def patches
# v4 of patch for Mavericks support, cf. https://bugs.kde.org/show_bug.cgi?id=326724
{ :p0 => 'http://bugsfiles.kde.org/attachment.cgi?id=83590' }
end And I installed with
I'm mostly using |
@jacknagel Please consider the above comment. |
@nddrylliog Thanks for mentioning this! Just saved me some time. +1 |
A notice for people installing with the Be patient, because downloads from their SVN are slow and the repository is 40+MB. |
@wtn think it isn't a download issue as compiling doesn't work. |
@katgironpe I was able to compile using the @nddrylliog patch (as shown above). I ended up using Valgrind on Debian (under VirtualBox) because the version that successfully compiled didn't produce the output I expected. |
@wtn read similar comments about Valgrind not working as expected. Thanks for the info. Would likely use Ubuntu when I have to. |
I've edit the formula based on the patch, can anyone try that # step1: brew edit valgrind
# step2: paste me
# step3: brew install valgrind
require 'formula'
class Valgrind < Formula
homepage 'http://www.valgrind.org/'
url 'http://valgrind.org/downloads/valgrind-3.9.0.tar.bz2'
sha1 '9415e28933de9d6687f993c4bb797e6bd49583f1'
depends_on 'automake'
depends_on 'autoconf'
depends_on 'libtool'
head do
url 'svn://svn.valgrind.org/valgrind/trunk'
end
depends_on :macos => :snow_leopard
# Valgrind needs vcpreload_core-*-darwin.so to have execute permissions.
# See #2150 for more information.
skip_clean 'lib/valgrind'
def patches
# 1: For Xcode-only systems, we have to patch hard-coded paths, use xcrun &
# add missing CFLAGS. See: https://bugs.kde.org/show_bug.cgi?id=295084
# 2: Fix for 10.7.4 w/XCode-4.5, duplicate symbols. Reported upstream in
# https://bugs.kde.org/show_bug.cgi?id=307415
# 3: Fix for 10.9 Mavericks
p = []
p << 'https://gist.github.com/raw/3784836/f046191e72445a2fc8491cb6aeeabe84517687d9/patch1.diff' unless MacOS::CLT.installed?
p << 'https://gist.github.com/raw/3784930/dc8473c0ac5274f6b7d2eb23ce53d16bd0e2993a/patch2.diff' if MacOS.version == :lion
p << 'https://gist.github.com/mckelvin/8514475/raw/1939e5dfeb1dfc2974582f0dbbf5e3aaeb46d17a/valgrind-3.9.0-mavericks.patch' if MacOS.version == :mavericks
return p
end
def install
args = %W[
--disable-dependency-tracking
--prefix=#{prefix}
]
if MacOS.prefer_64_bit?
args << "--enable-only64bit" << "--build=amd64-darwin"
else
args << "--enable-only32bit"
end
system "./autogen.sh"
system "./configure", *args
system "make"
system "make install"
end
def test
system "#{bin}/valgrind", "ls", "-l"
end
end |
@mckelvin Your formula compiles for me on Mavericks. The behavior is still different from Debian/Ubuntu, which perhaps is not surprising given the message in the output from Valgrind:
|
@mckelvin Please submit a pull request. |
@wtn it's always an unstable one, but anyway most of the time it works. |
Hi there, I made a series of patches for Darwin 10.9, adding new syscalls or renaming some anonymous ones, and a few other improvements. I believe it works much better with these. They are to be applied on current SVN trunk, after applying Diego Giagio's patch. Could you try them and validate it's working better with them ? Thanks, You can find them on my homebrew branch there for the git friendly people (it's a messy and unofficial import, I forgot to change emails in valgind import, so fork it at your own risk please) : |
This one works Great !! http://calvinx.com/2014/05/04/valgrind-on-mac-os-x-10-9-mavericks/ |
@gangleader thanks but that's for macports. Valgrind + homebrew works now. |
I know this is probably not the right place to start since the problem is not directly related to Homebrew, but though to share the issue here upfront as it will be acted upon faster.
Valgrind does not have compile options for OSX 1.9 yet, so I've modified
configure.ac
to mimic OSX 1.8 when compiling on 1.9.It got me though configure step, but I finally got stuck when running
make
:Configure line was:
See the Gist for configure.ac patch and full make output
Ideas how to move it further?
The text was updated successfully, but these errors were encountered: