Issues installing latest MRTrix3 on Windows


#1

Following the instructions here: http://mrtrix.readthedocs.io/en/latest/installation/windows_install.html

I’m getting:

MRtrix build type requested: release

Detecting OS: windows
Looking for compiler [g++]: not found
Looking for compiler [clang++]: not found

ERROR: no suitable compiler found!



  Set the CXX environment variable to inform 'configure' of the path to the
  compiler on your system, as follows:
    $ export CXX=/usr/bin/g++-5.5
    $./configure
  (amend with the actual path to the compiler on your system)

  If you are using a compiler other than gcc, you can also set the CXX_ARGS
  environment variable to specify how your compiler expects different arguments
  to be presented on the command line, for instance as follows:
    $ export CXX_ARGS="-c CFLAGS SRC -o OBJECT"
    $ ./configure

See the file ‘configure.log’ for details. If this doesn’t help and you need
further assistance, please post on the MRtrix3 community forum
(http://community.mrtrix.org/), and make sure to include the full contents of
the ‘configure.log’ file.

Any thoughts? What should I try next?

-Ty


#2

Sorry about the delay in responding. Quick check: did you install all the dependencies via the pacman command line (here in the instructions)? Otherwise nothing will work…


#3

Yup, I followed those instructions and everything seems to have installed, but it’s still giving me the same error.


#4

OK, that’s weird. First off, can you check that you’re running within the right shell: you should be using the MinGW64 Win64 Shell (as per this warning). I think g++ won’t be in the your PATH if you use the standard MSYS2 shell.

Next, check that the relevant package is actually installed:

$ pacman -Qi mingw-w64-x86_64-gcc
Name            : mingw-w64-x86_64-gcc
Version         : 6.3.0-3
Description     : GNU Compiler Collection (C,C++,OpenMP) for MinGW-w64
Architecture    : any
URL             : https://gcc.gnu.org
Licenses        : GPL  LGPL  FDL  custom
Groups          : mingw-w64-x86_64-toolchain
Provides        : mingw-w64-x86_64-gcc-base
Depends On      : mingw-w64-x86_64-binutils  mingw-w64-x86_64-crt  mingw-w64-x86_64-headers  mingw-w64-x86_64-isl  mingw-w64-x86_64-libiconv  mingw-w64-x86_64-mpc  mingw-w64-x86_64-gcc-libs=6.3.0-3  mingw-w64-x86_64-windows-default-manifest  mingw-w64-x86_64-winpthreads
                  mingw-w64-x86_64-zlibhttp://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004692
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : mingw-w64-x86_64-gcc-base
Replaces        : None
Installed Size  : 111.24 MiB
Packager        : Alexey Pavlov <alexpux@gmail.com>
Build Date      : Mon, May 15, 2017 9:59:37 AM
Install Date    : Tue, May 30, 2017 4:42:03 PM
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

and that it actually provides g++:

$ pacman -Ql mingw-w64-x86_64-gcc | grep g++
mingw-w64-x86_64-gcc /mingw64/bin/g++.exe
mingw-w64-x86_64-gcc /mingw64/bin/x86_64-w64-mingw32-g++.exe
mingw-w64-x86_64-gcc /mingw64/share/man/man1/g++.1.gz

If this all checks out, then verify that g++ is in your PATH:

$ which g++
/mingw64/bin/g++

If that still checks out, then I’ve no idea what’s wrong…


#5

Ah! That was it. I’m sorry, I was dumb! :slight_smile:
Thanks for the help!


#6

I’m assuming you mean using the right shell…? Don’t worry, it’s caught me out a few times too… :wink:


#7

I’ve done all of these instructions and I still get the same error


#8

Can you provide more information about this? At the very least, post the full command and its complete output, and preferably also post the contents of the configure.log file. It might also help to post the output of pacman -Q so we can check that all the necessary packages are installed.