Hi all,
Following the instruction on the website I manage to install MRtrix3 without problem on Mac 10.11.5.
The second challenge is to install it with the flag -openmp.
If I run the followings:
export PATH=/usr/local/Cellar/qt/5.9.1/bin/:$PATH;
export CXX=/usr/local/bin/clang-omp++;
EIGEN_CFLAGS=“-isystem /usr/local/Cellar/eigen/3.2.10/include/eigen3” ARCH=native ./configure;
Everything works fine the installation does not appear to be using openmp as I am missing the flag -openmp.
When adding the flag
EIGEN_CFLAGS=“-isystem /usr/local/Cellar/eigen/3.2.10/include/eigen3” ARCH=native ./configure -openmp;
I had the following error in the log:
EXEC <<
CMD: /usr/local/bin/clang-omp++ -mmacosx-version-min=10.11 -lz -L/usr/local/Cellar/libtiff/4.0.7/lib -ltiff -L/usr/local/Cellar/fftw/3.3.6-pl2/lib -lfftw3 -fopenmp qt_moc.o qt.o -o qt -stdlib=libc++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.11 -Wl,-rpath,@executable_path/Frameworks -F/usr/local/Cellar/qt/5.9.1/lib -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSvg -framework OpenGL -framework AGL
EXIT: 1
STDERR:
ld: library not found for -liomp5
clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)ERROR: error linking Qt application!
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 tried other options, such as
EIGEN_CFLAGS=“-isystem /usr/local/Cellar/eigen/3.2.10/include/eigen3” QMAKE=“/usr/local/Cellar/qt/5.9.1/bin/qmake QMAKE_CXXFLAGS=-fopenmp LIBS=-fopenmp” ARCH=native ./configure -openmp;
With the following unsuccessful log:
REPORT: moc (version 5.9.1)
REPORT: Checking for Qt qmake:
EXEC <<
CMD: /usr/local/Cellar/qt/5.9.1/bin/qmake QMAKE_CXXFLAGS=-fopenmp LIBS=-fopenmp -v
error invoking command “/usr/local/Cellar/qt/5.9.1/bin/qmake QMAKE_CXXFLAGS=-fopenmp LIBS=-fopenmp”: No such file or directoryERROR: Qt qmake not found!
MRtrix3 was unable to locate the Qt command ‘qmake’.
Make sure your PATH environment variable includes the location of the correct
version of this command, for example:
$ export PATH=/opt/qt5/bin:PATH ./configure
(amend with the actual path to the Qt executables on your system)
When, for a test, I run this
EIGEN_CFLAGS=“-isystem /usr/local/Cellar/eigen/3.2.10/include/eigen3” QMAKE=/usr/local/Cellar/qt/5.9.1/bin/qmake ARCH=native ./configure -openmp
The output I get is
MRtrix build type requested: release
Detecting OS: darwin
OS X deployment target: 10.11
Machine architecture set by ARCH environment variable to: native
Looking for compiler [/usr/local/bin/clang-omp++]: clang version 3.5.0
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: not found
Checking for ::max_align_t: 16 bytes
Checking for std::max_align_t: 16 bytes
Checking for Eigen3 library: 3.2.10
Checking for zlib compression library: 1.2.5
Checking for “JSON for Modern C++” requirements: ok
Checking for TIFF library: LIBTIFF, Version 4.0.7
Checking for FFTW library: fftw-3.3.6-pl2-sse2
Checking for OpenMP support: ok
Checking for Qt moc: moc (version 5.9.1)
Checking for Qt qmake: /usr/local/Cellar/qt/5.9.1/bin/qmake (version 5.9.1)
Checking for Qt rcc: rcc (version 5.9.1)
Checking for Qt:
ERROR: error linking Qt application!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.
with the following log
EXEC <<
CMD: /usr/local/bin/clang-omp++ -mmacosx-version-min=10.11 -lz -L/usr/local/Cellar/libtiff/4.0.7/lib -ltiff -L/usr/local/Cellar/fftw/3.3.6-pl2/lib -lfftw3 -fopenmp qt_moc.o qt.o -o qt -stdlib=libc++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.11 -Wl,-rpath,@executable_path/Frameworks -F/usr/local/Cellar/qt/5.9.1/lib -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSvg -framework OpenGL -framework AGL
EXIT: 1
STDERR:
ld: library not found for -liomp5
clang-3.5: error: linker command failed with exit code 1 (use -v to see invocation)ERROR: error linking Qt application!
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.
Therefore it seems that openmp is close by, but qt is missing the parallel flags.
So, finally the question: what am I doing wrong?
How do I pass the CXXFLAGS and LIBS when calling qmake in installing MRtrix3?
Many thanks for the help and support!