I followed the instructions here using MSYS2 option and successfully installed the latest MRtrix3 on Windows 10. But when I test mrview it says it can’t find the libraries. The path to libraries is on the $PATH. Please see the attached screenshot.
Can you ls -la /c/MRTrix3/mrtrix3/release/lib just to confirm that the library file is still there and non-empty?
Do you still get the same problem after a python build clean; python build?
Unless anyone else can spot a problem, I’d try re-installing to a different directory that doesn’t contain any uppercase characters, just on the (exceptionally unlikely) chance that those are causing an issue.
before it would build properly, and then hit the same issue with the library. My fix to that was to copy the release/lib/mrtrix-0.3.X.dll over to release/bin, which I think is a cleaner solution on the long run. We could easily modify the build script to set the target part for the library to be in the bin folder on Windows, which would avoid this issue.
It’s annoying that I had to set the PATH and CFLAGS manually though, anyone else found this necessary…? I’m guessing the CFLAGS one could be avoided if pkg-config was included in the list of dependencies. No idea why the PATH wasn’t set properly from the outset though. This was a fresh MSYS2 install, by the way, just ran update-core, pacman -Syu, then the instructions on our wiki…
I am stunned this would fix it… Unless the issue was related to white spaces in the PATH…?
Me too. Windows paths inevitably contain whitespaces, and in this case there are no whitespaces before the MRtrix paths, so I don’t think it’s that. I’m curious to know if somewhere during configure / build there’s a lowercase conversion going on.
My fix to that was to copy the release/lib/mrtrix-0.3.X.dll over to release/bin, which I think is a cleaner solution on the long run.
As in, you had added both release/bin and release/lib to the path as per the instructions and it didn’t work, then you copied the .dll to release/bin and it did work? Or did you not add release/lib to your path? Either way, I’d be happy with the suggested alternative.
OK, I hadn’t added anything to the PATH… my mistake.
Still, I like to be able to invoke commands by their full path, which can come in handy when testing, etc. Moving the DLL over to the bin folder means it works out of the box. It’s a pretty simple change, I think we should do it.
From a completely fresh MSYS2 installation, I was able to configure, build and run without any issues, using just this (copied literally from the very first entries of my .bash_history):
Note that this corresponds exactly to the instructions in the documentation.
@jdtournier: the pkg-config package is already included in the docs, so it should just all works fine without too much hassle.
PS: msys2 was installed in its default directory without any spaces (this is recommended against) and I ran everything from the home directory provided by msys2
I tested using capitals in a directory outside the msys2 homedir, and it all works out perfectly fine. So something else must have been different on the second go…
OK, it seems the issue was that I was using the MSYS2 shell, not the MinGW-w64 shell as clearly stated in the docs… Everything does indeed run fine when following the instructions to the letter…
Thank you Donald and Ben for testing this and updating the instructions and such.
I typically do try to follow the instructions to the letter but somehow I missed this one but all is good now
Thanks again tremendously!