MRtrix3 Tissue qt5 installation error

I am trying to install MRtrix3 Tissue but I have issues with qt5 opengl I guess.

(base) andraderenew@Renes-MacBook-Air MRtrix3Tissue % ./configure
MRtrix3Tissue build type requested: release version
MRtrix3Tissue is a fork of the MRtrix3 project
WARNING: Anaconda removed from PATH to avoid conflicts
Detecting OS: darwin
OS X deployment target: 12.5
Looking for compiler [clang++]: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Checking for C++11 compliance: ok
Checking shared library generation: ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: ok
Checking for non-POD variable-length array support: ok
Checking for ::max_align_t: 16 bytes
Checking for std::max_align_t: 16 bytes
Checking for Eigen3 library: 3.4.0
Checking for zlib compression library: 1.2.11
Checking for "JSON for Modern C++" requirements: ok
Checking for TIFF library: not found - TIFF support disabled
Checking for PNG library: not found - PNG support disabled
Checking for FFTW library: not found - FFTW support disabled
Checking for Qt moc: moc (version 5.15.5)
Checking for Qt qmake: qmake (version 5.15.5)
Checking for Qt rcc: rcc (version 5.15.5)
Checking for Qt:
ERROR: error linking Qt application!

Clearly is a QT linking issue. I opened configure file but I still don’t know what to do to make QT5 visible to the compiler. I saved it in zprofile or zrc and nothing seems to change. It happens both in linux ubuntu and Mac OS X.

I have installed in Linux passing with -nogui option in ./configure so partially solved. But still opengl and mrview wouldn’t work.

Mostly Ubuntu/Linux posts but here are some potentially helpful links:

  • My previous post on ensuring the Qt5 plugins path is available. TL;DR set an environment variable called QT_PLUGIN_PATH to the qt5/plugins filepath.
  • In this previous post where multiple people had the linking error reported, there are a few different things that fixed their issues:
    • Install the qt5/openGL libraries, including the dev versions
    • Make sure you don’t have a conflicting version of Eigen3 installed
    • Alternative library to install: libglvnd-dev
    • If you’re using an NVIDIA card, the person from that post found that there was a libGL.so linking issue related to their error - follow their steps to set the right symbolic link target at the correct location.
  • Further debugging:
    • Paste the configure.log file which may have a better description of your error for people helping out.
    • Run ldd on mrview to understand where the libraries live.
  • Mac-specific debugging: Error during compilation: "error linking Qt application" - #11 by joely

Hello @andraderenew,

You can try seeing if following the steps on this link fix your issue.

Also, since the 3Tissue branch is not up to date with the rest of MRtrix, it probably makes most sense to use it only for the SS3T CSD step, and to install the MRtrix master branch to run mrview and other scripts.

Cheers,
Nick

Sorry, bit late to the party, but hopefully some of this will be useful…

The first thing to note is that you’re trying to build within a conda / anaconda environment – the giveaway is this line:

WARNING: Anaconda removed from PATH to avoid conflicts

This is our attempt at minimising the many issues that crop up when trying to build with an existing conda / anaconda install. The problem stems mainly from conda providing its own versions of all sorts of packages, many of which will conflict with the system-supplied versions. Qt is particularly problematic given the very tight integration between GUI components & OpenGL and the hardware & drivers on your system: these bits can’t rely on the generic packages provided by anaconda, they have to use the right drivers supplied by your OS, and that causes issues. We can (and do) build on anaconda, but it’s not easy (recipe here if you’re interested).

So the first thing to do if you want to build on macOS is to disable anaconda – at least long enough for the build to complete. You should be able to find the bit in your ~/.zshrc or ~/.profile where anaconda runs its startup scripts, and comment them out (you can always revert them later on). Then you’d need to install Qt5 along with all the other dependencies outside of anaconda (there are quite a few options on macOS, the trick is to make sure none of these different sources of packages don’t end up conflicting with each other). Personally, I’d probably go for the last option: manual install of the required dependencies, it’s probably the best way to avoid conflicts later on.

If you get this far, but things still aren’t working, feel free to ask again, but do include your entire configure.log in your post, it often contains loads of information that you wouldn’t recognise as relevant, but gives us important clues as to what the problem is.

Cheers, and good luck…
Donald

this is perfect for configure but then in build I have an issue seems to me related to eigen

andraderenew@Renes-MacBook-Air MRtrix3Tissue % python3 configure

MRtrix3Tissue build type requested: release version

MRtrix3Tissue is a fork of the MRtrix3 project

Detecting OS: darwin
OS X deployment target: 12.5
Looking for compiler [clang++]: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Checking for C++11 compliance: ok
Checking shared library generation: ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: ok
Checking for non-POD variable-length array support: ok
Checking for ::max_align_t: 8 bytes
Checking for std::max_align_t: 8 bytes
Checking for Eigen3 library: 3.4.0
Checking for zlib compression library: 1.2.11
Checking for “JSON for Modern C++” requirements: ok
Checking for TIFF library: LIBTIFF, Version 4.4.0
Checking for PNG library: Header: 1.6.37; library: 1.6.37
Checking for FFTW library: fftw-3.3.10
Checking for Qt moc: moc (version 5.15.5)
Checking for Qt qmake: qmake (version 5.15.5)
Checking for Qt rcc: rcc (version 5.15.5)
Checking for Qt: 5.15.5

writing configuration to file ‘config’: ok

andraderenew@Renes-MacBook-Air MRtrix3Tissue % ./build
env: python: No such file or directory
andraderenew@Renes-MacBook-Air MRtrix3Tissue % python3 /build
/opt/homebrew/bin/python3: can’t open file ‘/build’: [Errno 2] No such file or directory
andraderenew@Renes-MacBook-Air MRtrix3Tissue % python3 build
( 1/506) [CC] tmp/core/formats/nifti2.o
( 2/506) [CC] tmp/core/image_io/png.o
( 4/506) [CC] tmp/core/image_io/pipe.o
( 3/506) [CC] tmp/core/file/config.o
( 6/506) [CC] tmp/core/formats/tiff.o
( 5/506) [CC] tmp/core/file/dicom/dict.o
( 7/506) [CC] tmp/core/file/png.o
( 8/506) [CC] tmp/core/file/name_parser.o

ERROR: ( 8/506) [CC] tmp/core/file/name_parser.o

clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE=“release version” -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.5 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -idirafter /opt/homebrew/Cellar/libtiff/4.4.0_1/include -DMRTRIX_PNG_SUPPORT -idirafter /opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 -DEIGEN_FFTW_DEFAULT -idirafter /opt/homebrew/Cellar/fftw/3.3.10_1/include -Wall -O3 -DNDEBUG -Isrc -I./core -Icmd -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -DEIGEN_DONT_PARALLELIZE core/file/name_parser.cpp -o tmp/core/file/name_parser.o

failed with output

In file included from core/file/name_parser.cpp:19:
In file included from ./core/file/name_parser.h:22:
In file included from ./core/mrtrix.h:37:
./core/types.h:326:9: error: redefinition of ‘Vector3’ as different kind of symbol
using Vector3 = Matrix<MR::default_type, 3, 1>;
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(3, 3)

zsh: suspended python3 build

andraderenew@Renes-MacBook-Air MRtrix3Tissue % python3 build
( 1/371) [CC] tmp/src/dwi/tractography/roi.o
( 2/371) [CC] tmp/src/dwi/tractography/file_base.o
( 3/371) [CC] tmp/src/dwi/tractography/seeding/list.o
( 5/371) [CC] tmp/src/exec_version.o
( 4/371) [CC] tmp/cmd/tcktransform.o
( 6/371) [CC] tmp/src/dwi/tractography/rng.o
( 7/371) [CC] tmp/core/progressbar.o
( 8/371) [CC] tmp/core/file/mmap.o
( 9/371) [CC] tmp/core/file/dicom/element.o

ERROR: ( 6/371) [CC] tmp/src/dwi/tractography/rng.o

clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE=“release version with nogui” -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.5 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -idirafter /opt/homebrew/Cellar/libtiff/4.4.0_1/include -DMRTRIX_PNG_SUPPORT -idirafter /opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 -DEIGEN_FFTW_DEFAULT -idirafter /opt/homebrew/Cellar/fftw/3.3.10_1/include -Wall -O3 -DNDEBUG -Isrc -I./core -Icmd -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -DEIGEN_DONT_PARALLELIZE src/dwi/tractography/rng.cpp -o tmp/src/dwi/tractography/rng.o

failed with output

In file included from src/dwi/tractography/rng.cpp:17:
In file included from src/dwi/tractography/rng.h:20:
In file included from ./core/math/rng.h:27:
In file included from ./core/mrtrix.h:37:
./core/types.h:326:9: error: redefinition of ‘Vector3’ as different kind of symbol
using Vector3 = Matrix<MR::default_type, 3, 1>;
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: previous definition is here
andraderenew@Renes-MacBook-Air MRtrix3Tissue % python3 configure

MRtrix3Tissue build type requested: release version

MRtrix3Tissue is a fork of the MRtrix3 project

Detecting OS: darwin
OS X deployment target: 12.5
Looking for compiler [clang++]: Apple clang version 13.1.6 (clang-1316.0.21.2.5)
Checking for C++11 compliance: ok
Checking shared library generation: ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: ok
Checking for non-POD variable-length array support: ok
Checking for ::max_align_t: 8 bytes
Checking for std::max_align_t: 8 bytes
Checking for Eigen3 library: 3.4.0
Checking for zlib compression library: 1.2.11
Checking for “JSON for Modern C++” requirements: ok
Checking for TIFF library: LIBTIFF, Version 4.4.0
Checking for PNG library: Header: 1.6.37; library: 1.6.37
Checking for FFTW library: fftw-3.3.10
Checking for Qt moc: moc (version 5.15.5)
Checking for Qt qmake: qmake (version 5.15.5)
Checking for Qt rcc: rcc (version 5.15.5)
Checking for Qt: 5.15.5

writing configuration to file ‘config’: ok

andraderenew@Renes-MacBook-Air MRtrix3Tissue % python3 build
( 1/506) [CC] tmp/core/image_io/scratch.o
( 2/506) [CC] tmp/core/header.o
( 3/506) [CC] tmp/core/phase_encoding.o
( 4/506) [CC] tmp/core/image_io/sparse.o
( 5/506) [CC] tmp/core/formats/pipe.o
( 6/506) [CC] tmp/core/file/dicom/select_cmdline.o
( 7/506) [CC] tmp/core/formats/mgz.o
( 8/506) [CC] tmp/core/formats/mrtrix_sparse_legacy.o

ERROR: ( 4/506) [CC] tmp/core/image_io/sparse.o

clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE=“release version” -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.5 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -idirafter /opt/homebrew/Cellar/libtiff/4.4.0_1/include -DMRTRIX_PNG_SUPPORT -idirafter /opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 -DEIGEN_FFTW_DEFAULT -idirafter /opt/homebrew/Cellar/fftw/3.3.10_1/include -Wall -O3 -DNDEBUG -Isrc -I./core -Icmd -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -DEIGEN_DONT_PARALLELIZE core/image_io/sparse.cpp -o tmp/core/image_io/sparse.o

failed with output

In file included from core/image_io/sparse.cpp:17:
In file included from ./core/header.h:23:
In file included from ./core/app.h:28:
In file included from ./core/cmdline_option.h:28:
In file included from ./core/mrtrix.h:37:
./core/types.h:326:9: error: redefinition of ‘Vector3’ as different kind of symbol
using Vector3 = Matrix<MR::default_type, 3, 1>;
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(3, 3)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro ‘EIGEN_MAKE_TYPEDEFS’
template
^
In file included from core/image_io/sparse.cpp:17:
In file included from ./core/header.h:23:
In file included from ./core/app.h:28:
In file included from ./core/cmdline_option.h:28:
In file included from ./core/mrtrix.h:37:
./core/types.h:327:9: error: redefinition of ‘Vector4’ as different kind of symbol
using Vector4 = Matrix<MR::default_type, 4, 1>;
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:542:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(4, 4)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro ‘EIGEN_MAKE_TYPEDEFS’
template
^
In file included from core/image_io/sparse.cpp:17:
In file included from ./core/header.h:30:
./core/image_helpers.h:427:20: error: use of alias template ‘Eigen::Vector3’ requires template arguments
const Eigen::Vector3 vs1 (in1.spacing(0), in1.spacing(1), in1.spacing(2));
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: template is declared here
EIGEN_MAKE_TYPEDEFS(3, 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro ‘EIGEN_MAKE_TYPEDEFS’
template \

In file included from core/image_io/sparse.cpp:17:
In file included from ./core/header.h:30:
./core/image_helpers.h:428:20: error: use of alias template 'Eigen::Vector3' requires template arguments
      const Eigen::Vector3 vs2 (in2.spacing(0), in2.spacing(1), in2.spacing(2));
                   ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: template is declared here
EIGEN_MAKE_TYPEDEFS(3, 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
~~~~~~~~~~~~~~~~~~~~~~~~                                          ^
4 errors generated.

ERROR: (  5/506) [CC] tmp/core/formats/pipe.o

clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.5 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -idirafter /opt/homebrew/Cellar/libtiff/4.4.0_1/include -DMRTRIX_PNG_SUPPORT -idirafter /opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 -DEIGEN_FFTW_DEFAULT -idirafter /opt/homebrew/Cellar/fftw/3.3.10_1/include -Wall -O3 -DNDEBUG -Isrc -I./core -Icmd -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -DEIGEN_DONT_PARALLELIZE core/formats/pipe.cpp -o tmp/core/formats/pipe.o

failed with output

In file included from core/formats/pipe.cpp:18:
In file included from ./core/file/utils.h:26:
In file included from ./core/app.h:28:
In file included from ./core/cmdline_option.h:28:
In file included from ./core/mrtrix.h:37:
./core/types.h:326:9: error: redefinition of 'Vector3' as different kind of symbol
  using Vector3 = Matrix<MR::default_type, 3, 1>;
        ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(3, 3)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
                                                                  ^
In file included from core/formats/pipe.cpp:18:
In file included from ./core/file/utils.h:26:
In file included from ./core/app.h:28:
In file included from ./core/cmdline_option.h:28:
In file included from ./core/mrtrix.h:37:
./core/types.h:327:9: error: redefinition of 'Vector4' as different kind of symbol
  using Vector4 = Matrix<MR::default_type, 4, 1>;
        ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:542:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(4, 4)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
                                                                  ^
In file included from core/formats/pipe.cpp:20:
In file included from ./core/header.h:30:
./core/image_helpers.h:427:20: error: use of alias template 'Eigen::Vector3' requires template arguments
      const Eigen::Vector3 vs1 (in1.spacing(0), in1.spacing(1), in1.spacing(2));
                   ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: template is declared here
EIGEN_MAKE_TYPEDEFS(3, 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
~~~~~~~~~~~~~~~~~~~~~~~~                                          ^
In file included from core/formats/pipe.cpp:20:
In file included from ./core/header.h:30:
./core/image_helpers.h:428:20: error: use of alias template 'Eigen::Vector3' requires template arguments
      const Eigen::Vector3 vs2 (in2.spacing(0), in2.spacing(1), in2.spacing(2));
                   ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: template is declared here
EIGEN_MAKE_TYPEDEFS(3, 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
~~~~~~~~~~~~~~~~~~~~~~~~                                          ^
4 errors generated.

ERROR: (  1/506) [CC] tmp/core/image_io/scratch.o

clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.5 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -idirafter /opt/homebrew/Cellar/libtiff/4.4.0_1/include -DMRTRIX_PNG_SUPPORT -idirafter /opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 -DEIGEN_FFTW_DEFAULT -idirafter /opt/homebrew/Cellar/fftw/3.3.10_1/include -Wall -O3 -DNDEBUG -Isrc -I./core -Icmd -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -DEIGEN_DONT_PARALLELIZE core/image_io/scratch.cpp -o tmp/core/image_io/scratch.o

failed with output

In file included from core/image_io/scratch.cpp:19:
In file included from ./core/image_io/scratch.h:20:
In file included from ./core/image_io/base.h:25:
In file included from ./core/mrtrix.h:37:
./core/types.h:326:9: error: redefinition of 'Vector3' as different kind of symbol
  using Vector3 = Matrix<MR::default_type, 3, 1>;
        ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(3, 3)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
                                                                  ^
In file included from core/image_io/scratch.cpp:19:
In file included from ./core/image_io/scratch.h:20:
In file included from ./core/image_io/base.h:25:
In file included from ./core/mrtrix.h:37:
./core/types.h:327:9: error: redefinition of 'Vector4' as different kind of symbol
  using Vector4 = Matrix<MR::default_type, 4, 1>;
        ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:542:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(4, 4)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
                                                                  ^
In file included from core/image_io/scratch.cpp:20:
In file included from ./core/header.h:30:
./core/image_helpers.h:427:20: error: use of alias template 'Eigen::Vector3' requires template arguments
      const Eigen::Vector3 vs1 (in1.spacing(0), in1.spacing(1), in1.spacing(2));
                   ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: template is declared here
EIGEN_MAKE_TYPEDEFS(3, 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
~~~~~~~~~~~~~~~~~~~~~~~~                                          ^
In file included from core/image_io/scratch.cpp:20:
In file included from ./core/header.h:30:
./core/image_helpers.h:428:20: error: use of alias template 'Eigen::Vector3' requires template arguments
      const Eigen::Vector3 vs2 (in2.spacing(0), in2.spacing(1), in2.spacing(2));
                   ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: template is declared here
EIGEN_MAKE_TYPEDEFS(3, 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
~~~~~~~~~~~~~~~~~~~~~~~~                                          ^
4 errors generated.

ERROR: (  6/506) [CC] tmp/core/file/dicom/select_cmdline.o

clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.5 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -idirafter /opt/homebrew/Cellar/libtiff/4.4.0_1/include -DMRTRIX_PNG_SUPPORT -idirafter /opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 -DEIGEN_FFTW_DEFAULT -idirafter /opt/homebrew/Cellar/fftw/3.3.10_1/include -Wall -O3 -DNDEBUG -Isrc -I./core -Icmd -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -DEIGEN_DONT_PARALLELIZE core/file/dicom/select_cmdline.cpp -o tmp/core/file/dicom/select_cmdline.o

failed with output

In file included from core/file/dicom/select_cmdline.cpp:17:
In file included from ./core/file/dicom/image.h:22:
In file included from ./core/datatype.h:20:
In file included from ./core/cmdline_option.h:28:
In file included from ./core/mrtrix.h:37:
./core/types.h:326:9: error: redefinition of 'Vector3' as different kind of symbol
  using Vector3 = Matrix<MR::default_type, 3, 1>;
        ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(3, 3)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
                                                                  ^
In file included from core/file/dicom/select_cmdline.cpp:17:
In file included from ./core/file/dicom/image.h:22:
In file included from ./core/datatype.h:20:
In file included from ./core/cmdline_option.h:28:
In file included from ./core/mrtrix.h:37:
./core/types.h:327:9: error: redefinition of 'Vector4' as different kind of symbol
  using Vector4 = Matrix<MR::default_type, 4, 1>;
        ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:542:1: note: previous definition is here
EIGEN_MAKE_TYPEDEFS(4, 4)
^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:67: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
                                                                  ^
In file included from core/file/dicom/select_cmdline.cpp:17:
./core/file/dicom/image.h:55:18: error: use of alias template 'Eigen::Vector3' randraderenew@Renes-MacBook-Air MRtrix3Tissue % ls 
#configure#			doxygen
CONTRIBUTING.md			generate_bash_completion.py
Doxyfile			icons
LICENCE.txt			install_mime_types.sh
README.md			lib
bin				matlab
build				mrtrix-mime.xml
build.default.active		mrtrix-mrview.desktop
build.log			package_mrtrix
check_syntax			run_pylint
cmd				run_tests
config				set_path
configure			share
configure.log			src
core				testing
docs				tmp
andraderenew@Renes-MacBook-Air MRtrix3Tissue % emacs build.log

File Edit Options Buffers Tools Help                                            
~~~~~~~~~~~~~~~~~~~~~~~~                                          ^
core/header.cpp:684:14: error: use of alias template 'Eigen::Vector3' requires \
template arguments
      Eigen::Vector3 new_dir;
             ^
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:541:1\
: note: template is declared here
EIGEN_MAKE_TYPEDEFS(3, 3)
^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3/Eigen/src/Core/Matrix.h:523:6\
7: note: expanded from macro 'EIGEN_MAKE_TYPEDEFS'
template <typename Type>                                          \
~~~~~~~~~~~~~~~~~~~~~~~~                                          ^
9 errors generated.

Yes, older versions of MRtrix won’t compile with Eigen 3.4.0 – and MRtrix3Tissue is an old version. The simplest thing to do is to download an older version of Eigen and use that. Something like this should work:

# navigate to your MRtrix3Tissue installation:
cd MRtrix3Tissue

# download Eigen repo and checkout older version:
git clone https://gitlab.com/libeigen/eigen.git
cd Eigen
git checkout 3.3.9
cd ..

# try again with appropriate flags:
EIGEN_CFLAGS="-isystem $(pwd)/eigen" ./configure
./build

This is from memory, there may some adjustments to make to get it to work…

1 Like

it worked flawlessly thank you so much!!