We have set up a new formula that ships the release candidate 3 version of MRtrix3 via homebrew’s package manager without the need to re-compile it from scratch. Before we officially support this method of installation, we’d like to test it on a more diverse set of systems than we have at our disposal. If you use homebrew and want to give this a spin, please report back if it works or if you encounter are any issues. The installation should be as simple as
brew tap MRtrix3/mrtrix3 && brew unlink mrtrix3; brew install mrtrix3_0rc3
and take no more than a couple of minutes. Please let us know the output of these commands if homebrew starts building MRtrix3 from scratch instead of just extracting the binaries.
To test the installation, you can run brew test --verbose mrtrix3_0rc3
and opening mrview is a good idea as well. Just make sure to use the correct version:
ls -la `which mrview`
lrwxr-xr-x 1 mp admin 53 May 14 18:47 /usr/local/bin/mrview -> ../Cellar/mrtrix3_0rc3/3.0_RC3-0-g57e351eb/bin/mrview
To go back to your previous installation, uninstall the RC3 version and re-link the previous version:
==> Postinstalling mrtrix3_0rc3
running post_installWarning: The post-install step did not complete successfully
You can try again using `brew postinstall mrtrix3/mrtrix3/mrtrix3_0rc3`
also with efforts directing the command to /usr/local/Cellar/mrtrix3_0rc3
This most likely means that you did not have mrtrix3 installed via homebrew before, hence brew unlink mrtrix3 is complaining. No problem here, I probably should have mentioned that you might get this error.
I can confirm the post-install error, caused by a permission error when trying to set the path to our matlab bindings to startup.m. This is related to a security feature of homebrew that permits writing files for “tap formulas”. For now, I catch the error and issue a warning and print how to do it manually. Again, this warning should not affect anything except for the matlab scripts.
Did you try to start mrview or run the tests? I think Mrtrix3 should be installed despite the errors and warnings.
Hm, I installed and updated MRtrix3 always with homebrew.
After another check, I received this, mrview doesn’t pick the _0rc3 version (/usr/local/Cellar/mrtrix3) , but the standard installed version (/Users/luciusfekonja/mrtrix3/bin/mrview):
Luciuss-MacBook-Pro:mrtrix3 luciusfekonja$ brew tap MRtrix3/mrtrix3 && brew unlink mrtrix3; brew install mrtrix3_0rc3
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, mrtrix3/mrtrix3).
==> Updated Formulae
agedu coffeescript ispc
annie infer jsonpp
Error: No such keg: /usr/local/Cellar/mrtrix3
Warning: mrtrix3/mrtrix3/mrtrix3_0rc3 3.0_RC3-0-g57e351eb_1 is already installed and up-to-date
To reinstall 3.0_RC3-0-g57e351eb_1, run `brew reinstall mrtrix3_0rc3`
Luciuss-MacBook-Pro:mrtrix3 luciusfekonja$ brew reinstall mrtrix3_0rc3
==> Reinstalling mrtrix3/mrtrix3/mrtrix3_0rc3 --test
==> Cloning https://github.com/MRtrix3/mrtrix3.git
Cloning into '/Users/luciusfekonja/Library/Caches/Homebrew/mrtrix3_0rc3--git'...
remote: Counting objects: 1235, done.
remote: Compressing objects: 100% (1214/1214), done.
remote: Total 1235 (delta 160), reused 163 (delta 8), pack-reused 0
Receiving objects: 100% (1235/1235), 2.51 MiB | 2.10 MiB/s, done.
Resolving deltas: 100% (160/160), done.
==> Checking out branch master
PATH:
/usr/local/Homebrew/Library/Homebrew/shims/super:/usr/local/opt/gdbm/bin:/usr/local/opt/openssl/bin:/usr/local/opt/sqlite/bin:/usr/local/opt/xz/bin:/usr/local/opt/python/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/qt/bin:/usr/bin:/bin:/usr/sbin:/sbin
==> git reset --hard origin/master
==> git checkout 3.0_RC3-0-g57e351eb
Last 15 lines from /Users/luciusfekonja/Library/Logs/Homebrew/mrtrix3_0rc3/02.git:
2018-05-22 15:41:19 +0200
git
checkout
3.0_RC3-0-g57e351eb
error: pathspec '3.0_RC3-0-g57e351eb' did not match any file(s) known to git.
If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/mrtrix3/homebrew-mrtrix3/issues
Luciuss-MacBook-Pro:mrtrix3 luciusfekonja$ brew test --verbose mrtrix3_0rc3
Testing mrtrix3/mrtrix3/mrtrix3_0rc3
/usr/bin/sandbox-exec -f /tmp/homebrew20180522-86128-1cc1nx8.sb /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3_2/bin/ruby -W0 -I /usr/local/Homebrew/Library/Homebrew -- /usr/local/Homebrew/Library/Homebrew/test.rb /usr/local/Homebrew/Library/Taps/mrtrix3/homebrew-mrtrix3/mrtrix3_0rc3.rb --verbose
/usr/local/Cellar/mrtrix3_0rc3/3.0_RC3-0-g57e351eb_1
/tmp/mrtrix3_0rc3-test-20180522-86129-4lmzyo
==> ./run_tests no_fetch no_build
logging to "testing.log"
running "5tt2gmwmi"... 1 of 1 passed
running "5tt2vis"... 1 of 1 passed
running "5ttedit"... 1 of 1 passed
running "amp2sh"... 1 of 1 passed
running "dirgen"... 4 of 4 passed
running "dwi2adc"... 1 of 1 passed
running "dwi2fod"... 5 of 5 passed
running "dwi2mask"... 1 of 1 passed
running "dwi2tensor"... 8 of 8 passed
running "dwidenoise"... 6 of 6 passed
running "dwiextract"... 2 of 2 passed
running "fixel2sh"... 2 of 2 passed
running "fixel2tsf"... 1 of 1 passed
running "fixel2voxel"... 13 of 13 passed
running "fixelconvert"... 2 of 2 passed
running "fixelcorrespondence"... 1 of 1 passed
running "fixelcrop"... 1 of 1 passed
running "fixelreorient"... 1 of 1 passed
running "fod2dec"... 12 of 12 passed
running "fod2fixel"... 3 of 3 passed
running "label2colour"... 3 of 3 passed
running "label2mesh"... 2 of 2 passed
running "labelconvert"... 4 of 4 passed
running "maskfilter"... 9 of 9 passed
running "mesh2voxel"... 1 of 1 passed
running "meshconvert"... 10 of 10 passed
running "mrcalc"... 4 of 4 passed
running "mrcat"... 5 of 5 passed
running "mrconvert"... 11 of 11 passed
running "mrcrop"... 2 of 2 passed
running "mrdegibbs"... 1 of 1 passed
running "mrfilter"... 15 of 15 passed
running "mrhistmatch"... 2 of 2 passed
running "mrhistogram"... 0 of 0 passed
running "mrmath"... 4 of 4 passed
running "mrpad"... 4 of 4 passed
running "mrresize"... 8 of 8 passed
running "mrstats"... 2 of 2 passed
running "mrthreshold"... 9 of 9 passed
running "mrtransform"... 10 of 10 passed
running "peaks2amp"... 1 of 1 passed
running "population_template"... 2 of 2 passed
running "sh2amp"... 3 of 3 passed
running "sh2peaks"... 2 of 2 passed
running "sh2power"... 0 of 0 passed
running "sh2response"... 1 of 1 passed
running "shbasis"... 4 of 4 passed
running "shconv"... 2 of 2 passed
running "tck2connectome"... 3 of 3 passed
running "tckconvert"... 8 of 8 passed
running "tckgen"... 14 of 14 passed
running "tckmap"... 4 of 4 passed
running "tckresample"... 5 of 5 passed
running "tcksample"... 8 of 8 passed
running "tcksift"... 1 of 1 passed
running "tcksift2"... 1 of 1 passed
running "tcktransform"... 1 of 1 passed
running "tensor2metric"... 8 of 8 passed
running "transformcalc"... 5 of 5 passed
running "transformcompose"... 4 of 4 passed
running "transformconvert"... 4 of 4 passed
running "tsfdivide"... 1 of 1 passed
running "tsfmult"... 1 of 1 passed
running "tsfsmooth"... 1 of 1 passed
running "tsfthreshold"... 2 of 2 passed
running "voxel2fixel"... 1 of 1 passed
running "warp2metric"... 3 of 3 passed
running "warpcorrect"... 1 of 1 passed
running "warpinit"... 1 of 1 passed
Luciuss-MacBook-Pro:mrtrix3 luciusfekonja$ ls -la `which mrview`
-rwxr-xr-x 1 luciusfekonja staff 3266276 May 22 10:49 /Users/luciusfekonja/mrtrix3/bin/mrview
The command brew unlink mrtrix3 tries to unlink MRtrix installed completely via homebrew (brew install mrtrix3). I suspect you installed our dependencies (qt, libtiff, …) with homebrew but compile MRtrix3 manually (./configure; ./build) using our cloned git repo in /Users/luciusfekonja/mrtrix3/.
Your version of mrview is in your PATH, hiding the RC3 version. A simple /usr/local/bin/mrview should open the new version. To double check, ls -l /usr/local/bin/mrview should link to ../Cellar/mrtrix3_0rc3/3.0_RC3-0-g57e351eb_1/bin/mrview.
I have changed the formula. It is now printing instructions about removing old versions from the search PATH.
Good catch! For reference, brew reinstall --force-bottle mrtrix3_0rc3 works. We’ll need to look into how to circumvent brew’s shallow clone. They don’t make it easy to customise a formula…
Ok, now I get it. And yes, I installed & copmpiled it like you suspected.
Removing the path and updating it with addpath('/usr/local/Cellar/mrtrix3_0rc3/3.0_RC3-0-g57e351eb_1/matlab') worked well without errors.
/usr/local/bin/mrview picks now the new mrtrix3_0rc3 version: Verified via mrview / info button / About MRview.
And ls -l /usr/local/bin/mrview verifies the wanted version as well: ls -l /usr/local/bin/mrview lrwxr-xr-x 1 luciusfekonja admin 55 May 22 18:02 /usr/local/bin/mrview -> ../Cellar/mrtrix3_0rc3/3.0_RC3-0-g57e351eb_1/bin/mrview.
sorry for replying so late – I had some scripts running and didn’t want to interrupt the computation. But now I also tested the new formula. To note, I had the new release candidate already installed (via github), so I don’t know how useful my testing is for you. However, here are my experiences:
Steps 1 and 2,
brew tap MRtrix3/mrtrix3 && brew unlink mrtrix3; brew install mrtrix3_0rc3
brew test --verbose mrtrix3_0rc3
ran without errors.
ls -la which mrview
gave me
/Users/Marlene/mrtrix3/bin/mrview
I then checked which mrview version I’m running as suggested by
this gives me “The MRtrix viewer, version 3.0_RC3-dirty
64 bit release version, built May 18 2018”
Then I tried to uninstall rc3 by running
brew uninstall mrtrix3_0rc3; brew link mrtrix3
which resulted in a similar error message as in Lucius’ case:
Error: No such keg: /usr/local/Cellar/mrtrix3_0rc3
Linking /usr/local/Cellar/mrtrix3/3.0_RC3-0-g57e351eb… 125 symlinks created
I’m not really sure what the last line of that error message did. Also, I’m not 100% sure which version I’m now accessing…
This means you opened the previously installed version of mrview. You can open the currently - via homebrew - installed (and linked) version with $(brew --prefix)/bin/mrview
Make sure that this is the RC3 version via: brew install mrtrix3_0rc3
of brew link mrtrix3_0rc3 if it was installed already. Since the tests ran successfully, that should be enough testing of RC3 on your system
This means that you probably tried to uninstall mrtrix3_0rc3 twice.
I think you are using the version in your user folder. You can find out with ls -l $(which mrinfo)
indicates that you linked the latest master-branch version installed via homebrew (brew install mrtrix3). Hence you have 3 versions of MRtrix3 on your system: the RC3 homebrew version (mrtrix3_0rc3), the regular homebrew version (mrtrix3), and the version in /Users/Marlene/mrtrix3. Your PATH seems to be configured to contain /Users/Marlene/mrtrix3 (see echo $PATH) before /usr/local/bin, hence irrespective of the version you install with homebrew you will be using the version in your user folder. If you want to use the homebrew versions, you’d need to edit your PATH (presumably in ~/.bash_profile) or rename the folder ~/mrtrix3 to something else.
I have added a more verbose info message to the RC3 package to prevent this kind of confusion.
Hi Max. The bottle installs fine, but when running mrview I see
$ mrview
dyld: Library not loaded: /usr/local/opt/fftw/lib/libfftw3.3.dylib
Referenced from: /usr/local/bin/mrview
Reason: image not found
It looks like the bottle has an undeclared dependency on fftw. Perhaps a configure script is picking it up as present on the system used to build the bottle, even if it isn’t strictly required?
Yes, unless you need to use that particular version of MRtrix3 for consistency reasons. As a side note, themrtrix3_0rc3 version will not change, the mrtrix3 version will get updated to the latest master version whenever you update homebrew (unless you pin it).