Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more specificity in README regarding command-line tools update/install #28

Open
zardini123 opened this issue Jan 30, 2021 · 3 comments
Labels
documentation enhancement New feature or request

Comments

@zardini123
Copy link

zardini123 commented Jan 30, 2021

When attempting to install this beautiful macOS installment of valgrind on my macOS 10.14.6 machine, I was met with the same compile issues as #6. After the fail to compile, Brew reported via an error that:

Error: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

I ran the softwareupdate command, resulting in macOS Mojave security updates installing, and many others. No command-line tools update ever was installed. Running the same 'softwareupdate' command again reports "No updates are available."

I then tried the second line in the error that Homebrew reports:

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

After reinstall, Homebrew still complained about an outdated command-line tools (along with valgrind not installing).

I have Xcode updated to the newest version for macOS 10.14.6, which is currently 11.3.1, so Brew does not report any issues with that.

I then went to the last and final line:

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.

My thoughts was "well if softwareupdate does not report any new version, why would I need to manually download it?"
Well, I was wrong.

According to this StackExchange post, one is able to get their currently installed CI Tools version number via running pkgutil --pkg-info=com.apple.pkg.CLTools_Executables.

package-id: com.apple.pkg.CLTools_Executables
version: 10.3.0.0.1.1562985497
...

10.3.0? Darn that's really old! Following https://developer.apple.com/download/more/, I downloaded Command_Line_Tools_for_Xcode_11.3.1.dmg, installed it, and now the same command reports:

version: 11.3.1.0.1.1576735732

Re-running brew install --HEAD LouisBrunner/valgrind/valgrind now properly installs valgrind!


Conclusion/TL;DR
I'd suggest that the README more clearly point out that CI tools version matters greatly. Yes the README currently states "make sure you have the latest Xcode/CLI tools installed." Though with how its phrased, I thought it was saying simply if you have the CLI tools installed it will work. I didn't realize version number was that important.

Even with following the link to #6 (comment), I never thought that my version via installing with softwareupdate was really out-dated. I was thinking Homebrew was thinking I needed a CLI tools version for a newer macOS or something.

Therefore I'd also suggest telling people in the README to run the pkgutil command, checking to see if their version number is equal to the Xcode version number. If the version numbers do not match, they should manually install the newest .dmg from the Apple developer website instead of via softwareupdate.

Thank you so much for reading! I hope these suggestions will help others in the future not go in loops as much as I did, and also make people like me not make assumptions about softwareupdate!

@LouisBrunner
Copy link
Owner

Hi @zardini123,

Thanks a lot for this detailed report! Would you consider contributing the README changes yourself? I can do it too but I'd like to be sure it's as straight-forward and understandable as possible (which isn't my forte!).

@LouisBrunner LouisBrunner added the enhancement New feature or request label Feb 3, 2021
@zardini123
Copy link
Author

Would you consider contributing the README changes yourself?

Sure thing! I probably have time this weekend. I'll write up a draft, and open a PR once ready to gather your ideas and suggestions!

Being I'm making changes to the README, I was wondering something. What exactly is the macOS 10.14.4 subsection under section "tests" all about? Should this instead list the resulting tests of Mojave 10.14.6? Another question I have is how could I run or generate these tests on my system? I can also add the answer to some of these when I work on the README.

@LouisBrunner
Copy link
Owner

Ah! One of the feedback I got when trying to get my patches merged upstream is that they break test (or in some cases, they make test which break silently break more explicitly).
So I started collecting a list of failing tests on different versions so I could check when changes were improving the situation or worsening it (so many tests are broken that it's not a question of "do all tests pass or not" unfortunately...).
I still have a laptop using 10.14.6 so I can regenerate these tests, I am just only focusing on 10.15 as this is the version available in GitHub Actions so don't worry about that.

If you want to run them locally anyway, you need to check out the code and run make regtest (it might take a while and even block on some tests unfortunately!).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants