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

how to install git-annex ver=7 on a Mac? #3

Closed
mrneont opened this issue Jun 10, 2021 · 2 comments
Closed

how to install git-annex ver=7 on a Mac? #3

mrneont opened this issue Jun 10, 2021 · 2 comments

Comments

@mrneont
Copy link
Contributor

mrneont commented Jun 10, 2021

@leej3

I have a Mac OS 10.15. I am trying to run the testing framework, and get all the way to the 2nd data-lad publish, as described in this issue:
#2

I am not sure what that error means, but this part of the instructions:
https://github.com/afni/afni_ci_test_data#git-configuration
says that git-annex should "likely be" ver=7, but installing datalad always brings a dependency of git-annex ver=8. I don't even know how to install git-annex ver=7 on this Mac OS.

Things I have tried:

A) The building the conda env with the distributed environment.yml: only specifies datalad, and I only get git-annex ver=8.

B) brew install git-annex : only installs ver=8. Trying brew install git-annex@7 to try to specify a version only produces an error (even if I try the full version number with the dot).

C) Trying to follow the instructions here (which you suggested in an email):
https://itnext.io/how-to-install-an-older-brew-package-add141e58d32
I followed its instructions for git-annex, leading me to run this, but git-annex is not allowed to install in this way, as the text output implies:

$ brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/58523dde0519e92b494a833c66baea59389d4e84/Formula/git-annex.rb
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
Updated 6 formulae.
==> Updated Casks
Updated 1 cask.

Traceback (most recent call last):
9: from /usr/local/Homebrew/Library/Homebrew/brew.rb:122:in `<main>'
8: from /usr/local/Homebrew/Library/Homebrew/cmd/install.rb:131:in `install'
7: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:303:in `parse'
6: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:634:in `formulae'
5: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:634:in `map'
4: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:638:in `block in formulae'
3: from /usr/local/Homebrew/Library/Homebrew/formulary.rb:404:in `factory'
2: from /usr/local/Homebrew/Library/Homebrew/formulary.rb:180:in `get_formula'
1: from /usr/local/Homebrew/Library/Homebrew/formulary.rb:185:in `klass'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:277:in `load_file': Invalid usage: Installation of git-annex from a GitHub commit URL is unsupported! `brew extract git-annex` to a stable tap on GitHub instead. (UsageError)
12: from /usr/local/Homebrew/Library/Homebrew/brew.rb:155:in `<main>'
11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:157:in `rescue in <main>'
10: from /usr/local/Homebrew/Library/Homebrew/help.rb:64:in `help'
9: from /usr/local/Homebrew/Library/Homebrew/help.rb:83:in `command_help'
8: from /usr/local/Homebrew/Library/Homebrew/help.rb:103:in `parser_help'
7: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:303:in `parse'
6: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:634:in `formulae'
5: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:634:in `map'
4: from /usr/local/Homebrew/Library/Homebrew/cli/parser.rb:638:in `block in formulae'
3: from /usr/local/Homebrew/Library/Homebrew/formulary.rb:404:in `factory'
2: from /usr/local/Homebrew/Library/Homebrew/formulary.rb:180:in `get_formula'
1: from /usr/local/Homebrew/Library/Homebrew/formulary.rb:185:in `klass'
/usr/local/Homebrew/Library/Homebrew/formulary.rb:277:in `load_file': Invalid usage: Installation of git-annex from a GitHub commit URL is unsupported! `brew extract git-annex` to a stable tap on GitHub instead. (UsageError)

D) ... So I went the "brew extract ..." route, suggested by the above. First I googled about it: there were no hits for "brew extract git-annex", but for just "brew extract", there was this helpful/general page:
https://cmichel.io/how-to-install-an-old-package-version-with-brew/
(I also did try again "brew install git-annex@7.20200219", thinking the more specific version might get found, but that failed.)
I did these steps then:

$ brew tap-new $USER/local-git-annex
$ brew extract --version=7 git-annex $USER/local-git-annex
==> Searching repository history
Warning: Calling `cellar` in a bottle block is deprecated! Use `brew style --fix` on the formula to update the style or use `sha256` with a `cellar:` argument instead.
Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/git-annex.rb:15

[... and MANY MORE repeats of this warning...]

Error: git-annex: cannot load such file -- language/haskell

I also tried running the 2nd command above with the full version number 7.[number], but that didn't change anything. Googling about that error brought me here:
https://stackoverflow.com/questions/67059691/warning-calling-sha256-digest-tag-in-a-bottle-block-is-deprecated-use
... so I ran:
brew style --fix /usr/local/Homebrew/Library/Taps/ptaylor/homebrew-local-git-annex/Formula
(I note that before running this, I checked out what the above directory looked---it was empty; after running this command, it still was.)
... but then running the above "brew extract ..." didn't produce any different output.

Any advice is welcome.

leej3 pushed a commit to afni/afni that referenced this issue Jun 12, 2021
git-annex version 8 was previously difficult to install on some systems but now it is default
and indeed it is not trivial to install older versions:
afni/afni_ci_test_data#3

Forcing a git-annex repository version of 7 is no longer appropriate. It results in a difficult tangle:
afni/afni_ci_test_data#2
leej3 added a commit to afni/afni that referenced this issue Jun 12, 2021
git-annex version 8 was previously difficult to install on some systems but now it is default
and indeed it is not trivial to install older versions:
afni/afni_ci_test_data#3

Forcing a git-annex repository version of 7 is no longer appropriate. It results in a difficult tangle:
afni/afni_ci_test_data#2
leej3 added a commit to afni/afni that referenced this issue Jun 12, 2021
git-annex version 8 was previously difficult to install on some systems but now it is default
and indeed it is not trivial to install older versions:
afni/afni_ci_test_data#3

Forcing a git-annex repository version of 7 is no longer appropriate. It results in a difficult tangle:
afni/afni_ci_test_data#2
@leej3
Copy link
Contributor

leej3 commented Jun 12, 2021

I'm going to leave this for now in the hope that only supporting git annex version 8 is sufficient

@mrneont
Copy link
Contributor Author

mrneont commented Dec 8, 2021

Closing this now, because the main issue that led us down this road has been resolved by @yarikoptic; see here:
#2 (comment)

@mrneont mrneont closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants