Dear Experts,
I encountered the same, I believe, error. The only difference is that I am using Debian 8 (Jessie) OS.
I did follow installation steps listed in MRtrix docs for Linux (Ubuntu). During compilation I received error message similar to the one received by Meng.
Error Message returned by running ./configure
`MRtrix build type requested: release
Detecting OS: linux
Checking for C++11 compliant compiler [g++]: 4.9.2 - tested ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: yes
Checking for non-POD variable-length array support: yes
Checking for zlib compression library: 1.2.8
Checking for Eigen 3 library: 3.2.2
Checking shared library generation: yes
Checking for Qt moc: moc (version 4.8.6)
Checking for Qt qmake: qmake (version 4.8.6)
Checking for Qt rcc: rcc (version 4.8.6)
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.`
Here one can find configure.log file content
configure.log content
REPORT:
MRtrix build type requested:
REPORT: release
REPORT:
REPORT: Detecting OS: linux
REPORT: Checking for C++11 compliant compiler [g++]:
EXEC <<
CMD: g++ -dumpversion
EXIT: 0
STDOUT:
4.9.2
>>
REPORT: 4.9.2
COMPILE /tmp/tmpWWnIIa.cpp:
---
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 -pthread -fPIC -march=native /tmp/tmpWWnIIa.cpp -o /tmp/tmpWWnIIa.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpWWnIIa.o -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: - tested ok
REPORT: Detecting pointer size:
COMPILE /tmp/tmpUcCEFs.cpp:
---
#include <iostream>
int main() {
std::cout << sizeof(void*);
return (0);
}
---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native /tmp/tmpUcCEFs.cpp -o /tmp/tmpUcCEFs.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpUcCEFs.o -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
8
>>
REPORT: 64 bit
REPORT: Detecting byte order:
REPORT: little-endian
REPORT: Checking for variable-length array support:
COMPILE /tmp/tmp9Lulne.cpp:
---
int main(int argc, char* argv[]) {
int x[argc];
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 /tmp/tmp9Lulne.cpp -o /tmp/tmp9Lulne.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmp9Lulne.o -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: yes
REPORT: Checking for non-POD variable-length array support:
COMPILE /tmp/tmpbRyoo3.cpp:
---
#include <string>
class X {
int x;
double y;
std::string s;
};
int main(int argc, char* argv[]) {
X x[argc];
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 /tmp/tmpbRyoo3.cpp -o /tmp/tmpbRyoo3.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpbRyoo3.o -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: yes
REPORT: Checking for zlib compression library:
COMPILE /tmp/tmpAmoyO4.cpp:
---
#include <iostream>
#include <zlib.h>
int main() {
std::cout << zlibVersion();
return (0);
}
---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 /tmp/tmpAmoyO4.cpp -o /tmp/tmpAmoyO4.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpAmoyO4.o -pthread -lz -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
1.2.8
>>
REPORT: 1.2.8
REPORT: Checking for Eigen 3 library:
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/include/eigen3
>>
COMPILE /tmp/tmp1yLlF1.cpp:
---
#include <Eigen/Core>
#include <iostream>
int main (int argc, char* argv[]) {
std::cout << EIGEN_WORLD_VERSION << "." << EIGEN_MAJOR_VERSION << "." << EIGEN_MINOR_VERSION << "\n";
return 0;
}
---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -isystem /usr/include/eigen3 /tmp/tmp1yLlF1.cpp -o /tmp/tmp1yLlF1.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmp1yLlF1.o -pthread -lz -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
3.2.2
>>
REPORT: 3.2.2
REPORT: Checking shared library generation:
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -isystem /usr/include/eigen3 /tmp/tmpItflYI.cpp -o /tmp/tmpItflYI.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpItflYI.o -pthread -shared -pthread -lz -o libtest.so
EXIT: 0
>>
REPORT: yes
REPORT: Checking for Qt moc:
EXEC <<
CMD: moc -v
EXIT: 1
STDERR:
Qt Meta Object Compiler version 63 (Qt 4.8.6)
>>
REPORT: moc (version 4.8.6)
REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 2.01a
Using Qt version 4.8.6 in /usr/lib/x86_64-linux-gnu
>>
REPORT: qmake (version 4.8.6)
REPORT: Checking for Qt rcc:
EXEC <<
CMD: rcc -v
EXIT: 1
STDERR:
Qt Resource Compiler version 4.8.6
>>
REPORT: rcc (version 4.8.6)
REPORT: Checking for Qt:
source file "qt.h":
---
#include <QObject>
class Foo: public QObject {
Q_OBJECT;
public:
Foo();
~Foo();
public slots:
void setValue(int value);
signals:
void valueChanged (int newValue);
private:
int value_;
};
---
source file "qt.cpp":
---
#include <iostream>
#include "qt.h"
Foo::Foo() : value_ (42) { connect (this, SIGNAL(valueChanged(int)), this, SLOT(setValue(int))); }
Foo::~Foo() { std::cout << qVersion() << "\n"; }
void Foo::setValue (int value) { value_ = value; }
int main() { Foo f; }
---
project file "qt.pro":
---
CONFIG += c++11
QT += core gui opengl svg
HEADERS += qt.h
SOURCES += qt.cpp
---
EXEC <<
CMD: qmake
EXIT: 0
>>
EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -isystem /usr/include/eigen3 -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -isystem /usr/share/qt4/mkspecs/linux-g++-64 -isystem /usr/include/qt4/QtCore -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtOpenGL -isystem /usr/include/qt4/QtSvg -isystem /usr/include/qt4 -isystem /usr/X11R6/include qt.cpp -o qt.o
EXIT: 0
>>
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -isystem /usr/include/eigen3 -m64 -pipe -O2 -Wall -W -D_REENTRANT -DQT_WEBKIT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -isystem /usr/share/qt4/mkspecs/linux-g++-64 -isystem /usr/include/qt4/QtCore -isystem /usr/include/qt4/QtGui -isystem /usr/include/qt4/QtOpenGL -isystem /usr/include/qt4/QtSvg -isystem /usr/include/qt4 -isystem /usr/X11R6/include qt_moc.cpp -o qt_moc.o
EXIT: 0
>>
EXEC <<
CMD: g++ -pthread -lz qt_moc.o qt.o -o qt -m64 -Wl,-O1 -L/usr/lib/x86_64-linux-gnu -L/usr/X11R6/lib64 -lQtSvg -lQtOpenGL -lQtGui -lQtCore -lGL -lpthread
EXIT: 1
STDERR:
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
>>
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 double checked that I have all of the explicitly mentioned modules - this is, quoting docs
’You will need to get those that provide these Qt modules: Core, GUI, OpenGL, SVG, and the qmake, rcc & moc executables (note these will probably be included in one of the other packages).’
Here is the list of Qt-related packages (version 4.8.6.) I have installed on my PC
My Debian Qt packages
ii libqt4-core 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 transitional package for Qt 4 core non-GUI runtime libraries
ii libqt4-dbus:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 D-Bus module
ii libqt4-declarative:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 Declarative module
ii libqt4-designer:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 designer module
ii libqt4-dev 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 development files
ii libqt4-dev-bin 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 development programs
ii libqt4-gui 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 transitional package for Qt 4 GUI runtime libraries
ii libqt4-help:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 help module
ii libqt4-network:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 network module
ii libqt4-opengl:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 OpenGL module
ii libqt4-opengl-dev 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 OpenGL library development files
ii libqt4-qt3support:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 3 compatibility library for Qt 4
ii libqt4-script:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 script module
ii libqt4-scripttools:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 script tools module
ii libqt4-sql:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 SQL module
ii libqt4-sql-mysql:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 MySQL database driver
ii libqt4-svg:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 SVG module
ii libqt4-test:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 test module
ii libqt4-xml:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 XML module
ii libqt4-xmlpatterns:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 XML patterns module
ii libqtcore4:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 core module
ii libqtdbus4:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 D-Bus module library
ii libqtgui4:amd64 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 GUI module
ii libqtwebkit-dev 2.3.4.dfsg-3 amd64 Web content engine library for Qt - development files
ii libqtwebkit4:amd64 2.3.4.dfsg-3 amd64 Web content engine library for Qt
ii libqwt5-qt4 5.2.3-1 amd64 Qt4 widgets library for technical applications (runtime)
ii libvtk5.8-qt4 5.8.0-17.5 amd64 Visualization Toolkit - A high level 3D visualization library - Qt runtime
ii qt-assistant-compat 4.6.3-6 amd64 Qt Assistant compatibility binary (legacy)
ii qt-at-spi:amd64 0.3.1-5 amd64 at-spi accessibility plugin for Qt
ii qt4-linguist-tools 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 Linguist tools
ii qt4-qmake 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64 Qt 4 qmake Makefile generator tool
ii qtchooser 47-gd2b7997-2 amd64 Wrapper to select between Qt development binary versions
ii qtcore4-l10n 4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 all Qt 4 core module translations
I tried comparing this list with the one posted by dchristiaens, but I did not reach any conclusions.