# ERROR: error compiling Eigen3 application!

**URL:** https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215
**Category:** Uncategorized
**Created:** [October 6, 2017, 4:25pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215 "2017-10-06T16:25:26Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Jeff\_Sadowski](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/j/a3d4f5/32.png) [@Jeff\_Sadowski](https://community.mrtrix.org/u/Jeff_Sadowski)
#### Post date: [October 6, 2017, 4:25pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215/1 "2017-10-06T16:25:27Z")

</div>

I think I am missing qt. How would I install it with msys2?

Could I have also used the Linux subsystem on windows 10?

I installed msys2 on windows 10 as the instructions suggest.

```auto
pacman -Syuu
pacman -S git python pkg-config mingw-w64-x86_64-gcc mingw-w64-x86_64-eigen3 mingw-w64-x86_64-qt5 mingw-w64-x86_64-fftw 

```

then

```auto
git clone https://github.com/MRtrix3/mrtrix3.git
cd mrtrix3
./configure

```

I get the following error

```auto
ERROR: error compiling Eigen3 application!

    MRtrix3 was unable to compile a test program involving Eigen3.

  Set the EIGEN_CFLAGS environment variable to inform 'configure' of
  the flags it must provide to the compiler in order to compile
  programs that use Eigen3 functionality; this may include the path to
  the Eigen3 include files, as well as any required flags.
  For example:
    $ export EIGEN_CFLAGS="-isystem /usr/include/eigen3"
    $./configure
  (amend with the actual path to the Eigen3 include files on your system)

```

---

<div class="post-metadata">

### Author: ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)
#### Post date: [October 6, 2017, 7:44pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215/2 "2017-10-06T19:44:02Z")

</div>

Ok, this seems to be the [problem that I posted about earlier today](http://community.mrtrix.org/t/configure-and-build-fails-on-windows-install/323/4). There is indeed an issue with the procedure, which is probably a result of recent changes in MSYS2.

I’ve just [pushed a fix](https://github.com/MRtrix3/mrtrix3/pull/1160) for this that’ll hopefully handle this more gracefully, but it’s not yet merged. In the meantime, the workaround I suggest is to replace:

```auto
$ ./configure
$ ./build

```

with:

```auto
$ /usr/bin/python ./configure
$ /usr/bin/python ./build

```

* * *

Other random notes:

> [@Jeff\_Sadowski](#):
>
> I think I am missing qt.

I’m not sure what makes you say that…? The error message is about Eigen3, which is unrelated to Qt…

> [@Jeff\_Sadowski](#):
>
> Could I have also used the Linux subsystem on windows 10?

Yes and no. You can build MRtrix3 on WSL, but you can’t run `mrview` yet - see discussion e.g. [here](http://community.mrtrix.org/t/mrtrix3-configuration-problem-on-windows-subsystem-for-linux-wsl/1014/9).

---

<div class="post-metadata">

### Author: ![Jeff\_Sadowski](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/j/a3d4f5/32.png) [@Jeff\_Sadowski](https://community.mrtrix.org/u/Jeff_Sadowski)
#### Post date: [October 9, 2017, 4:08pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215/3 "2017-10-09T16:08:58Z")

</div>

$ /usr/bin/python ./configure

has the same result.

I found eigen3 here /mingw64/include/eigen3  
I did

ln -s /mingw64/include/\* /usr/include  
then I was able to run configure

I didn’t need to be explicit about python running configure.  
I was able to run it like the instructions say after I did the linking I mentioned.

---

<div class="post-metadata">

### Author: ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)
#### Post date: [October 10, 2017, 9:30pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215/6 "2017-10-10T21:30:43Z")

</div>

OK, that really shouldn’t be required… I’m surprised about this, the only reason I can think of that might explain this would that you’re not using the MinGW 64-bit shell (things won’t work using the 32-bit or MSYS-only shell)…? But then I’d expect things to fall over much earlier if that was the case. Any chance you could post the contents of your `configure.log` file after a failed `./configure`…?

---

<div class="post-metadata">

### Author: ![Jeff\_Sadowski](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/j/a3d4f5/32.png) [@Jeff\_Sadowski](https://community.mrtrix.org/u/Jeff_Sadowski)
#### Post date: [October 11, 2017, 2:37pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215/7 "2017-10-11T14:37:14Z")

</div>

This was for a coworker. I no longer have the machine. They had requested mrtrix3 installed (I’m IT) I am sure I installed the 64-bit msys2.

I did not do any of the “git config” commands because those are for developers.  
The set\_path I undid as I wanted it in the /etc/bash.bashrc for all users.

mrview ran as she expected. I watched her open a file and look at the brain pictures she had on it. So I left it with her.

Apparently she knows how to use mrview. I do not. I tinker with some cross platform things once in awhile. I use to use cygwin and had tinkered with the linux subsystem. This was the first time I had seen msys2 I found it rather intriguing knowing it had the build tools so easily installable and upgradable with “pacman -Syuu”. I could try the install again on a windows 10 vm I have at home when I get a chance. But I usually use linux machines myself.

---

<div class="post-metadata">

### Author: ![Jeff\_Sadowski](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/j/a3d4f5/32.png) [@Jeff\_Sadowski](https://community.mrtrix.org/u/Jeff_Sadowski)
#### Post date: [October 11, 2017, 2:47pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215/8 "2017-10-11T14:47:09Z")

</div>

Ahh that is it I was using msys2 shell not the mingw64 shell. I missed the line saying to run

MinGW-w64 Win64 Shell

I just opened the msys2.exe that I saw when I installed it.

---

<div class="post-metadata">

### Author: ![jdtournier](https://community.mrtrix.org/user_avatar/community.mrtrix.org/jdtournier/32/2594_2.png) [@jdtournier](https://community.mrtrix.org/u/jdtournier)
#### Post date: [October 11, 2017, 2:53pm UTC](https://community.mrtrix.org/t/error-error-compiling-eigen3-application/1215/9 "2017-10-11T14:53:54Z")

</div>

OK, that makes sense. Thanks for reporting back! MSYS2 is a great project, but it does have a few rough edges… I wish there was a simpler way - maybe when we start shipping precompiled binaries, which shouldn’t be too long…
