You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On macOS Mojave 10.14.6, brew install --HEAD https://raw.githubusercontent.com/LouisBrunner/valgrind-macos/master/valgrind.rb fails.
❯ brew install --HEAD https://raw.githubusercontent.com/LouisBrunner/valgrind-macos/master/valgrind.rb
######################################################################## 100.0%
==> Cloning https://github.com/LouisBrunner/valgrind-macos.git
Updating /Users/solzard/Library/Caches/Homebrew/valgrind--git
fatal: unable to access 'https://github.com/LouisBrunner/valgrind-macos.git/': Couldn't connect to server
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "valgrind"
Failure while executing; `git fetch origin` exited with 128. Here's the output:
fatal: unable to access 'https://github.com/LouisBrunner/valgrind-macos.git/': Couldn't connect to server
Hi @LouisBrunner,
Thank you for informing me of related issues.
It seems my new firewall settings silently rejected git-remote-http(s).
After fixing it, the terminal started installing; however, I got another error.
brew uses a different SDK than CommandLine or Xcode (error: fail: has __UNIXSTACK, but wrong ::maxprot (should be 7)), I don't know yet if the best way to fix this is improve the brew formula or improve valgrind's SDK detection
the build breaks with the Xcode SDK on 10.14.6 (error: type 'task_exc_guard_behavior_t' not defined), I have seen this error before but can't remember exactly what is going on
Your output from brew was truncated (that line ==> ./configure --prefix=/usr/local/Cellar/valgrind/HEAD-7334244 --enable-only64bit --buil) but after trying it on mine, it shows ./configure --prefix=/usr/local/Cellar/valgrind/HEAD-7334244 --enable-only64bit --build=amd64-darwin --with-xcode-path=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk, if you can confirm you have the same, I'll see what I can do.
Unfortunately, that isn't enough to build reliably on every system. Depending on what SDK you have currently selected using xcode-select (CLI or Xcode), the build will still fail.
I am currently trying to unify the build process to ensure that SDK versions are correctly detected.
The above fix will only work if the currently selected SDK is CLI (which was GitHub and mine and thus why I never caught the bug), but @solzard has Xcode and that currently doesn't work (this can be changed through xcode-select but affects your whole system so I don't want to recommend it).
Just a question.
Is brew upgrade fine to upgrade this Valgrind?
Or, tapping brew install --force --HEAD https://raw.githubusercontent.com/LouisBrunner/valgrind-macos/master/valgrind.rb?
brew upgrade caused weird behaviors: trying to upgrade from the latest version and showing the installation error of the original Valgrind.
❯ brew update; brew upgrade
Updated 1 tap (homebrew/core).
==> Updated Formulae
helmfile
==> Upgrading 2 outdated packages:
valgrind HEAD-36f444c -> HEAD-36f444c
==> Upgrading valgrind HEAD-36f444c -> HEAD-36f444c
==> Cloning https://sourceware.org/git/valgrind.git
Updating /Users/solzard/Library/Caches/Homebrew/valgrind--git
From https://sourceware.org/git/valgrind
+ 36f444cf0...d9e714812 master -> origin/master (forced update)
==> Checking out branch master
Already on 'master'
Your branch is ahead of 'origin/master' by 65 commits.
(use "git push" to publish your local commits)
HEAD is now at d9e714812 Do not fix '417075 - pwritev(vector[...]) suppression ignored' but produce a warning.
==> ./autogen.sh
==> ./configure --prefix=/usr/local/Cellar/valgrind/HEAD-d9e7148 --enable-only64bit --buil
Last 15 lines from /Users/solzard/Library/Logs/Homebrew/valgrind/02.configure:
checking for gcc-ar... no
checking for perl... /usr/bin/perl
checking for gdb... /no/gdb/was/found/at/configure/time
checking dependency style of clang... none
checking for diff -u... yes
checking for clang option to accept ISO C99... none needed
checking for a supported version of gcc... ok (clang-11.0.0)
checking build system type... x86_64-pc-darwin
checking host system type... x86_64-pc-darwin
checking for a supported CPU... ok (x86_64)
checking for a 64-bit only build... yes
checking for a 32-bit only build... no
checking for a supported OS... ok (darwin)
checking for the kernel version... unsupported (18.7.0)
configure: error: Valgrind works on Darwin 10.x, 11.x, 12.x, 13.x, 14.x, 15.x, 16.x and 17.x (Mac OS X 10.6/7/8/9/10/11 and macOS 10.12/13)
READ THIS: https://docs.brew.sh/Troubleshooting
I don't know enough about brew and how it updates but it seems to be fetching from the upstream who doesn't support Mojave and later.
You might need to brew pin valgrind to ensure it doesn't get updated and then manually rerun brew install --HEAD https://raw.githubusercontent.com/LouisBrunner/valgrind-macos/master/valgrind.rb (potentially with a brew remove valgrind before) when you want to update.
Unless we change the repository used in brew itself, I don't know what can be done for this unfortunately. I do have the plan of starting to build binary releases of valgrind at the same time the upstream release.
Good news, I have found a way to solve that issue. After @YsHaNgM suggested adding a Homebrew Tap, I did just that and it works great!
See the Tap repository for full information. TL;DR: you just need to do brew tap LouisBrunner/valgrind and then use brew install --HEAD LouisBrunner/valgrind/valgrind. Once you do that, you can brew remove valgrind, any brew upgrade should fetch my repository instead of the upstream one.
@LouisBrunner Great job! Apart from the tapping way, the aforementioned "change the repository used in brew itself", what's the requirements from brew? Do you have to build binary releases for each macOS versions?
Hi @LouisBrunner ,
I'm still getting the aforementioned error despite I have tapped the repo and trying to install it with brew install --HEAD LouisBrunner/valgrind/valgrind
I noticed that despite having xcode normally installed my ./configure line lacks the last flag --with-xcode-path=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
I'm on macOS Mojave 10.14.6
using Homebrew 2.2.17 Homebrew/homebrew-core (git revision 294ee; last commit 2020-05-19) Homebrew/homebrew-cask (git revision 4939f; last commit 2020-05-19)
@LouisBrunner@Axenow sorry for the late response, I have to admit that I completely forgot this thread. I can confirm btw that updating CLI tools works fine even for me.
Louis, thanks again for your work!
Hello, I installed valgrind from your repo, but it doesn't detect any allocs and frees (although I'm sure there should be about 100,000 of them). macOS 11 Big Sur. What could be the problem? TY
Activity
LouisBrunner commentedon Apr 23, 2020
Hi @solzard,
Unfortunately, the issue seems to be a problem with git or GitHub side (it can't even download the repo). Could it be a temporary networking issue? See Homebrew/brew#1414 or https://gitlab.com/gnachman/iterm2/issues/6590 (might need to disable git proxying?)
solzard commentedon Apr 23, 2020
Hi @LouisBrunner,
Thank you for informing me of related issues.
It seems my new firewall settings silently rejected
git-remote-http(s).After fixing it, the terminal started installing; however, I got another error.
LouisBrunner commentedon Apr 24, 2020
That should be easy enough to fix. Can you tell me what version of Xcode you have installed?
solzard commentedon Apr 24, 2020
LouisBrunner commentedon Apr 25, 2020
So there are multiple issues at play here:
brewuses a different SDK than CommandLine or Xcode (error:fail: has __UNIXSTACK, but wrong ::maxprot (should be 7)), I don't know yet if the best way to fix this is improve thebrewformula or improve valgrind's SDK detectiontype 'task_exc_guard_behavior_t' not defined), I have seen this error before but can't remember exactly what is going onYour output from
brewwas truncated (that line==> ./configure --prefix=/usr/local/Cellar/valgrind/HEAD-7334244 --enable-only64bit --buil) but after trying it on mine, it shows./configure --prefix=/usr/local/Cellar/valgrind/HEAD-7334244 --enable-only64bit --build=amd64-darwin --with-xcode-path=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk, if you can confirm you have the same, I'll see what I can do.[-]Can't install[/-][+]macOS 10.14.6: install fails from `brew`[/+]solzard commentedon Apr 25, 2020
Here's the log in full width.
./configurehas the same option as yours.porcupinenick commentedon Apr 26, 2020
Hey Louis, great project! I noticed that this project's install script is very similar to this script:
https://github.com/sowson/valgrind/blob/master/valgrind.rb
It seems like you are checking for Xcode a bit differently. ^ I was able to successfully install Valgrind using the above mentioned script.
Your script is on the left, the mentioned script is on the right.
LouisBrunner commentedon Apr 26, 2020
Unfortunately, that isn't enough to build reliably on every system. Depending on what SDK you have currently selected using
xcode-select(CLI or Xcode), the build will still fail.I am currently trying to unify the build process to ensure that SDK versions are correctly detected.
The above fix will only work if the currently selected SDK is CLI (which was GitHub and mine and thus why I never caught the bug), but @solzard has Xcode and that currently doesn't work (this can be changed through
xcode-selectbut affects your whole system so I don't want to recommend it).LouisBrunner commentedon Apr 27, 2020
I have now merged the fix to
master, can you please confirm it is building and working as expected?porcupinenick commentedon Apr 27, 2020

It worked, thanks Louis!solzard commentedon Apr 27, 2020
I could install it successfully. It works properly in some small test codes.
I really appreciate you, Louis!
solzard commentedon Apr 27, 2020
Just a question.
Is
brew upgradefine to upgrade this Valgrind?Or, tapping
brew install --force --HEAD https://raw.githubusercontent.com/LouisBrunner/valgrind-macos/master/valgrind.rb?brew upgradecaused weird behaviors: trying to upgrade from the latest version and showing the installation error of the original Valgrind.LouisBrunner commentedon Apr 27, 2020
I don't know enough about
brewand how it updates but it seems to be fetching from the upstream who doesn't support Mojave and later.You might need to
brew pin valgrindto ensure it doesn't get updated and then manually rerunbrew install --HEAD https://raw.githubusercontent.com/LouisBrunner/valgrind-macos/master/valgrind.rb(potentially with abrew remove valgrindbefore) when you want to update.Unless we change the repository used in
brewitself, I don't know what can be done for this unfortunately. I do have the plan of starting to build binary releases ofvalgrindat the same time the upstream release.LouisBrunner commentedon May 4, 2020
@solzard,
Good news, I have found a way to solve that issue. After @YsHaNgM suggested adding a Homebrew Tap, I did just that and it works great!
See the Tap repository for full information. TL;DR: you just need to do
brew tap LouisBrunner/valgrindand then usebrew install --HEAD LouisBrunner/valgrind/valgrind. Once you do that, you canbrew remove valgrind, anybrew upgradeshould fetch my repository instead of the upstream one.YsHaNgM commentedon May 4, 2020
@LouisBrunner Great job! Apart from the tapping way, the aforementioned "change the repository used in
brewitself", what's the requirements frombrew? Do you have to build binary releases for each macOS versions?LouisBrunner commentedon May 4, 2020
I have no idea. I imagine they might not be too pleased with the lack of binary releases and my erratic branch management.
I guess there is no harm in asking, I will put in down on my list.
solzard commentedon May 4, 2020
@LouisBrunner Fantastic! I confirmed it works on my environment too.
How about adding this tip on README? It must help future users.
TonioGela commentedon May 19, 2020
Hi @LouisBrunner ,
I'm still getting the aforementioned error despite I have tapped the repo and trying to install it with
brew install --HEAD LouisBrunner/valgrind/valgrindI noticed that despite having xcode normally installed my
./configureline lacks the last flag--with-xcode-path=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdkI'm on
macOS Mojave 10.14.6using
Homebrew 2.2.17 Homebrew/homebrew-core (git revision 294ee; last commit 2020-05-19) Homebrew/homebrew-cask (git revision 4939f; last commit 2020-05-19)Can I do something to help you debugging?
TY
LouisBrunner commentedon Jun 9, 2020
@TonioGela could you send me the files contained in
~/Library/Logs/Homebrew/valgrind?Axenow commentedon Aug 1, 2020
Hi @TonioGela.
Just want to help you if you still needed it.
I had totally the same issue like you. Just try to download https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_for_Xcode_11.3/Command_Line_Tools_for_Xcode_11.3.dmg
Even if you have the version of CMT for Xcode 11.2 it may not compile for you.
@LouisBrunner Very big thank you for your work.
TonioGela commentedon Aug 1, 2020
@LouisBrunner @Axenow sorry for the late response, I have to admit that I completely forgot this thread. I can confirm btw that updating CLI tools works fine even for me.
Louis, thanks again for your work!
LouisBrunner commentedon Aug 2, 2020
Thanks for the confirmation, I will add a line in the README!
karimvafin commentedon Dec 5, 2020
Hello, I installed valgrind from your repo, but it doesn't detect any allocs and frees (although I'm sure there should be about 100,000 of them). macOS 11 Big Sur. What could be the problem? TY

mkjun14 commentedon Aug 26, 2021
@karimvafin did you find the solution to the issue? Iam facing the same problem as well
LouisBrunner commentedon Aug 28, 2021
@karimvafin @mkjun14 As stated in #19, Big Sur is still unsupported.