Scripts directory after static compilation

Dear Mrtrix experts,

I have a couple of questions about the installation procedure:

  • This is my current setup:

  • final destination for mrtrix software is a computer (from now on: WS) equipped with CentOS 68.

  • for compiling the sources I am using a virtual machine (from now on: VM) equipped with Debian 8.

  • To produce a working version on WS I followed these steps, I cloned the github repository on VM and I compiled the software with -static option:
    git clone https://github.com/MRtrix3/mrtrix3.git ARCH=x86-64 ./configure -static -nogui ./build

  • I then followed the instructions and I put the bin directory in a /release/bin directory on WS system (this was not completely clear to me after reading the documentation, though). Mrtrix commands seem to work.

  • However, I was missing mrtrix scripts. In the documentation I could not find instructions about this. To solve this problem, I simply tried to copy the scripts subdirectory included in the sources on WS in /scripts, added it to my PATH environmental variable and this seems to work.

  • Question 1: Am I missing something? Is this simple copy procedure enough to have a working version of the software?


  • I also tried another strategy:

  • In order to obtain a consistent version of the software (including the scripts), I tried to use the package_mrtrix command. I cloned the sources in a fresh directory on VM, I ran configure and build commands following the instructions. but after running package_mrtrix command I am always getting this error:
    cp: cannot stat 'bin/': No such file or directory

  • Question 2: Is package_mrtrix procedure somehow better than static compiling? Should I create in advance a bin sub-directory within the source one to prepare this kind of standalone installation? Am I missing something?

Thank you so much for the answers.
Best,

Vittorio

Question 1: spot on. That should be all that’s needed. We may need to add the missing step about the scripts in the docs, thanks for the feedback.

Question 2: package_mrtrix is definitely not better than static linking, it’s just an alternative when the static libraries required to do this are not available. I’m pretty sure I’d always recommend the static approach as the first option. But it does look like this script needs to be updated to match the new location of the executables (clearly no-one has touched it since March…).

Thanks for your quick and clear reply!

Best,

Vittorio

However, I was missing mrtrix scripts. In the documentation I could not find instructions about this. To solve this problem, I simply tried to copy the scripts subdirectory included in the sources on WS in /scripts, added it to my PATH environmental variable and this seems to work.

The only catch is the way in which the Python scripts library interfaces with the MRtrix3 binaries, in order to propagate settings (currently: command-line verbosity and multi-threading) down to any MRtrix3 commands invoked, without also erroneously sending those options to any non-MRtrix3 commands invoked. If you want these to work, then the binaries must be located in ../release/bin/ relative to the scripts. Therefore, I’d suggest making an mrtrix3/ directory on the target system, placing the contents of scripts/ (including sub-directories) into mrtrix3/scripts, placing the statically-compiled binaries into mrtrix3/release/bin, and adding both mrtrix3/release/bin and mrtrix3/scripts to PATH.

Thanks!

Best,

Vittorio