Windows 11 "Looking for compiler [clang++]: not found"

Hello, I am trying to install and run mrtrix3 on my computer (Windows 11) and I am getting stuck on the build stage where you run ./configure

This is the error I receive:

MRtrix build type requested: debug version with asserts, nooptim


Detecting OS: windows
Looking for compiler [g++]: g++.exe (Rev8, Built by MSYS2 project) 15.2.0
Checking for C++11 compliance: test failed (see configure.log for details)

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 or clang, 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.

I can’t seem to find ‘MinGW-w64 Win64 Shell’ as indicated in the documentation, so I am running the code on MSYS2 MINGW64 as administrator. Furthermore, I cannot find a ‘configure.log’ file in the \mrtrix3 directory, only the original configure.file

I have run the pacman -Syuu code upwards to 6 times at this point.

Running pacman -Q results in this output:

base 2022.06-1
bash 5.2.037-2
bash-completion 2.16.0-1
brotli 1.1.0-2
bsdtar 3.8.1-1
bzip2 1.0.8-4
ca-certificates 20250419-1
coreutils 8.32-5
curl 8.16.0-1
dash 0.5.12-1
db 6.2.32-5
file 5.46-2
filesystem 2025.05.08-2
findutils 4.10.0-2
gawk 5.3.2-1
gcc-libs 15.2.0-1
gdbm 1.26-1
getent 2.18.90-5
gettext 0.22.5-1
git 2.51.0-1
gmp 6.3.0-2
gnupg 2.4.8-1
grep 1~3.0-7
gzip 1.14-1
heimdal 7.8.0-5
heimdal-libs 7.8.0-5
inetutils 2.6-1
info 7.2-2
less 679-1
libargp 20241207-1
libasprintf 0.22.5-1
libassuan 3.0.2-1
libbz2 1.0.8-4
libcbor 0.12.0-1
libcurl 8.16.0-1
libdb 6.2.32-5
libedit 20240808_3.1-1
libexpat 2.7.1-1
libffi 3.5.2-1
libfido2 1.16.0-1
libgcrypt 1.11.2-1
libgdbm 1.26-1
libgettextpo 0.22.5-1
libgnutls 3.8.10-1
libgpg-error 1.55-1
libhogweed 3.10.2-1
libiconv 1.18-1
libidn2 2.3.8-1
libintl 0.22.5-1
libksba 1.6.7-1
liblz4 1.10.0-1
liblzma 5.8.1-1
libnettle 3.10.2-1
libnghttp2 1.67.0-1
libnghttp3 1.11.0-1
libngtcp2 1.15.0-1
libnpth 1.8-1
libopenssl 3.5.2-1
libp11-kit 0.25.7-1
libpcre 8.45-5
libpcre2_8 10.46-1
libpsl 0.21.5-2
libreadline 8.3.001-1
libsqlite 3.50.4-1
libssh2 1.11.1-1
libtasn1 4.20.0-1
libunistring 1.3-1
libutil-linux 2.40.2-2
libxcrypt 4.4.38-1
libzstd 1.5.7-1
mingw-w64-ucrt-x86_64-binutils 2.45-2
mingw-w64-ucrt-x86_64-crt-git 13.0.0.r167.g2e31630bc-1
mingw-w64-ucrt-x86_64-gcc 15.2.0-8
mingw-w64-ucrt-x86_64-gcc-libs 15.2.0-8
mingw-w64-ucrt-x86_64-gettext-runtime 0.26-1
mingw-w64-ucrt-x86_64-gmp 6.3.0-2
mingw-w64-ucrt-x86_64-headers-git 13.0.0.r167.g2e31630bc-1
mingw-w64-ucrt-x86_64-isl 0.27-1
mingw-w64-ucrt-x86_64-libiconv 1.18-1
mingw-w64-ucrt-x86_64-libwinpthread 13.0.0.r167.g2e31630bc-1
mingw-w64-ucrt-x86_64-mpc 1.3.1-2
mingw-w64-ucrt-x86_64-mpfr 4.2.2-1
mingw-w64-ucrt-x86_64-tzdata 2025b-2
mingw-w64-ucrt-x86_64-windows-default-manifest 6.4-4
mingw-w64-ucrt-x86_64-winpthreads 13.0.0.r167.g2e31630bc-1
mingw-w64-ucrt-x86_64-zlib 1.3.1-1
mingw-w64-ucrt-x86_64-zstd 1.5.7-1
mingw-w64-x86_64-assimp 6.0.2-1
mingw-w64-x86_64-binutils 2.45-2
mingw-w64-x86_64-brotli 1.1.0-5
mingw-w64-x86_64-bzip2 1.0.8-3
mingw-w64-x86_64-crt-git 13.0.0.r167.g2e31630bc-1
mingw-w64-x86_64-dbus 1.16.2-3
mingw-w64-x86_64-double-conversion 3.3.1-3
mingw-w64-x86_64-eigen3 3.4.0-1
mingw-w64-x86_64-expat 2.7.1-2
mingw-w64-x86_64-fftw 3.3.10-5
mingw-w64-x86_64-fontconfig 2.17.1-1
mingw-w64-x86_64-freeglut 3.6.0-1
mingw-w64-x86_64-freetype 2.14.1-1
mingw-w64-x86_64-gcc 15.2.0-8
mingw-w64-x86_64-gcc-libs 15.2.0-8
mingw-w64-x86_64-gettext-runtime 0.26-1
mingw-w64-x86_64-giflib 5.2.2-1
mingw-w64-x86_64-glib2 2.86.0-1
mingw-w64-x86_64-gmp 6.3.0-2
mingw-w64-x86_64-graphite2 1.3.14-3
mingw-w64-x86_64-harfbuzz 11.5.0-1
mingw-w64-x86_64-headers-git 13.0.0.r167.g2e31630bc-1
mingw-w64-x86_64-icu 77.1-2
mingw-w64-x86_64-isl 0.27-1
mingw-w64-x86_64-jasper 4.2.8-1
mingw-w64-x86_64-jbigkit 2.1-5
mingw-w64-x86_64-lcms2 2.17-1
mingw-w64-x86_64-lerc 4.0.0-1
mingw-w64-x86_64-libdeflate 1.24-1
mingw-w64-x86_64-libffi 3.5.2-1
mingw-w64-x86_64-libiconv 1.18-1
mingw-w64-x86_64-libjpeg-turbo 3.1.2-1
mingw-w64-x86_64-libmng 2.0.3-7
mingw-w64-x86_64-libmysofa 1.3.1-1
mingw-w64-x86_64-libpng 1.6.50-1
mingw-w64-x86_64-libsystre 1.0.2-1
mingw-w64-x86_64-libtiff 4.7.0-1
mingw-w64-x86_64-libtre 0.9.0-1
mingw-w64-x86_64-libwebp 1.6.0-1
mingw-w64-x86_64-libwinpthread 13.0.0.r167.g2e31630bc-1
mingw-w64-x86_64-libxml2 2.14.6-1
mingw-w64-x86_64-libxslt 1.1.43-3
mingw-w64-x86_64-md4c 0.5.2-1
mingw-w64-x86_64-minizip 1.3.1-1
mingw-w64-x86_64-mpc 1.3.1-2
mingw-w64-x86_64-mpdecimal 4.0.1-1
mingw-w64-x86_64-mpfr 4.2.2-1
mingw-w64-x86_64-mrtrix3 3.0.7-1
mingw-w64-x86_64-ncurses 6.5.20241228-3
mingw-w64-x86_64-openal 1.24.3-2
mingw-w64-x86_64-openjpeg2 2.5.3-1
mingw-w64-x86_64-openssl 3.5.2-2
mingw-w64-x86_64-pcre2 10.46-1
mingw-w64-x86_64-python 3.12.11-3
mingw-w64-x86_64-python-packaging 25.0-1
mingw-w64-x86_64-qt5-3d 5.15.17-2
mingw-w64-x86_64-qt5-activeqt 5.15.17-1
mingw-w64-x86_64-qt5-base 5.15.17+kde+r122-1
mingw-w64-x86_64-qt5-charts 5.15.17-1
mingw-w64-x86_64-qt5-connectivity 5.15.17-1
mingw-w64-x86_64-qt5-datavis3d 5.15.17-1
mingw-w64-x86_64-qt5-declarative 5.15.17+kde+r21-1
mingw-w64-x86_64-qt5-doc 5.15.17-1
mingw-w64-x86_64-qt5-gamepad 5.15.17-1
mingw-w64-x86_64-qt5-graphicaleffects 5.15.17-1
mingw-w64-x86_64-qt5-imageformats 5.15.17-1
mingw-w64-x86_64-qt5-location 5.15.17+kde+r7-1
mingw-w64-x86_64-qt5-lottie 5.15.17-1
mingw-w64-x86_64-qt5-multimedia 5.15.17-1
mingw-w64-x86_64-qt5-networkauth 5.15.17-1
mingw-w64-x86_64-qt5-pdf 5.15.17-1
mingw-w64-x86_64-qt5-purchasing 5.15.17-1
mingw-w64-x86_64-qt5-quick3d 5.15.17-2
mingw-w64-x86_64-qt5-quickcontrols 5.15.17-1
mingw-w64-x86_64-qt5-quickcontrols2 5.15.17+kde+r5-1
mingw-w64-x86_64-qt5-quicktimeline 5.15.17-1
mingw-w64-x86_64-qt5-remoteobjects 5.15.17-1
mingw-w64-x86_64-qt5-script 5.15.17-1
mingw-w64-x86_64-qt5-scxml 5.15.17-1
mingw-w64-x86_64-qt5-sensors 5.15.17-1
mingw-w64-x86_64-qt5-serialbus 5.15.17-1
mingw-w64-x86_64-qt5-serialport 5.15.17-1
mingw-w64-x86_64-qt5-speech 5.15.17-1
mingw-w64-x86_64-qt5-svg 5.15.17+kde+r5-1
mingw-w64-x86_64-qt5-tools 5.15.17-2
mingw-w64-x86_64-qt5-translations 5.15.17-1
mingw-w64-x86_64-qt5-virtualkeyboard 5.15.17-1
mingw-w64-x86_64-qt5-webchannel 5.15.17+kde+r3-1
mingw-w64-x86_64-qt5-webglplugin 5.15.17-1
mingw-w64-x86_64-qt5-websockets 5.15.17+kde+r2-1
mingw-w64-x86_64-qt5-webview 5.15.17-1
mingw-w64-x86_64-qt5-winextras 5.15.17-1
mingw-w64-x86_64-qt5-xmlpatterns 5.15.17-1
mingw-w64-x86_64-readline 8.3.001-1
mingw-w64-x86_64-sqlite3 3.50.4-1
mingw-w64-x86_64-tcl 8.6.16-1
mingw-w64-x86_64-termcap 1.3.1-7
mingw-w64-x86_64-tk 8.6.16-1
mingw-w64-x86_64-tzdata 2025b-2
mingw-w64-x86_64-vulkan-loader 1~1.4.321.0-1
mingw-w64-x86_64-windows-default-manifest 6.4-4
mingw-w64-x86_64-wineditline 2.208-1
mingw-w64-x86_64-winpthreads 13.0.0.r167.g2e31630bc-1
mingw-w64-x86_64-xz 5.8.1-2
mingw-w64-x86_64-zlib 1.3.1-1
mingw-w64-x86_64-zstd 1.5.7-1
mintty 1~3.8.0-1
mpdecimal 4.0.1-1
mpfr 4.2.2-1
msys2-keyring 1~20250619-1
msys2-launcher 1.5-3
msys2-runtime 3.6.4-1
nano 8.6-1
ncurses 6.5.20240831-2
nettle 3.10.2-1
openssh 10.0p1-2
openssl 3.5.2-1
p11-kit 0.25.7-1
pacman 6.1.0-19
pacman-contrib 1.10.6-1
pacman-mirrors 20250607-1
perl 5.40.3-1
perl-Authen-SASL 2.1900-1
perl-Clone 0.47-2
perl-Convert-BinHex 1.125-2
perl-Encode-Locale 1.05-2
perl-Error 0.17030-1
perl-File-Listing 6.16-1
perl-HTML-Parser 3.83-2
perl-HTML-Tagset 3.24-1
perl-HTTP-Cookies 6.11-1
perl-HTTP-Daemon 6.16-1
perl-HTTP-Date 6.06-1
perl-HTTP-Message 7.00-1
perl-HTTP-Negotiate 6.01-3
perl-IO-HTML 1.004-2
perl-IO-Socket-SSL 2.094-1
perl-IO-Stringy 2.113-2
perl-LWP-MediaTypes 6.04-2
perl-MIME-tools 5.515-1
perl-MailTools 2.22-1
perl-Net-HTTP 6.23-1
perl-Net-SMTP-SSL 1.04-2
perl-Net-SSLeay 1.94-3
perl-TermReadKey 2.38-7
perl-TimeDate 2.33-2
perl-Try-Tiny 0.32-1
perl-URI 5.32-1
perl-WWW-RobotRules 6.02-3
perl-http-cookiejar 0.014-1
perl-libwww 6.80-1
pinentry 1.3.2-1
pkgconf 2.5.1-1
python 3.12.11-1
rebase 4.5.0-5
sed 4.9-1
tar 1.35-2
time 1.9-3
tzcode 2025b-1
util-linux 2.40.2-2
wget 1.25.0-1
which 2.23-4
xz 5.8.1-1
zlib 1.3.1-1
zstd 1.5.7-1

Any assistance would be greatly appreciated.

Hi Sue,

The shortcuts ultimately just pass command-line flags to the shell command. So if for whatever reason you do not have the corresponding shortcut, you could try just making one.

On my Windows 11 system:

  • The “MSYS2 MSYS” shortcut, which is not the one to use, invokes:
    msys2_shell.cmd -msys
  • The “MSYS2 MinGW 64-bit” shortcut, which is the one to use, invokes:
    msys2_shell.cmd -mingw64

The information that should otherwise be visible within the configure script’s log file can probably be generated at the terminal by using the -verbose flag. I suspect the error won’t actually be anything esoteric about C++11 compliance as suggested by its output, but will be some more fundamental clash between libraries.

Regards
Rob

Hi Rob, I’m not sure if I quite follow.

I believe I’m using the right shortcut (in administrator). This is the only one that pops up if I search for “mingw64”. All the others ones do not have the mingw64 name.

I ran ./configure -verbose and this was the output:

# ./configure -verbose

MRtrix build type requested: release version


PATH set to: /mingw64/bin:/usr/local/bin:/usr/bin:/usr/bin:/c/Windows/System32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
Detecting OS: windows
Looking for compiler [g++]: EXEC <<
CMD: g++ --version
EXIT: 0
STDOUT:
g++.exe (Rev8, Built by MSYS2 project) 15.2.0
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>

g++.exe (Rev8, Built by MSYS2 project) 15.2.0
Checking for C++11 compliance:
COMPILE /tmp/tmpvo2rt5wu.cpp:
---

#include <cstddef>
struct Base {
    Base (int);
};
struct Derived : Base {
    using Base::Base;
};

int main() {
  Derived D (int); // check for contructor inheritance
  return 0;
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -DMRTRIX_WINDOWS -mms-bitfields -Wa,-mbig-obj -D_FILE_OFFSET_BITS=64 /tmp/tmpvo2rt5wu.cpp -o /tmp/tmpvo2rt5wu.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpvo2rt5wu.o -Wl,--sort-common,--as-needed -pthread -Wl,--allow-multiple-definition -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
error invoking command "./a.out": Permission denied
>>

test failed (see configure.log for details)

Looking for compiler [clang++]: EXEC <<
CMD: clang++ --version
error invoking command "clang++": No such file or directory
>>

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 or clang, 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.

Still no ‘configure.log’ file to be seen, but hopefully this is enough information.

Sorry for the double post, but I believe a.out was being blocked due to my institution’s IT system. I’ve gotten in touch with them to get the appropriate permissions.

I will update this post if that solves my installation issues. Many thanks for your help, Rob!

Hello, I’m back to share that it was indeed my institution’s firewall that was causing the error. I have since finished up the installation.

I did come across another issue while running ./build, but my problem was solved with the solution outlined in this forum post: Installation error at build stage - #3 by daljit46