Hello,
I’m getting an error trying to install MRtrix3 on Fedora 24 and g++ version 6.2. The error occurs at the ./configure
stage. Here is a full copy of configure.log
:
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:
6.2.1
>>
REPORT: 6.2.1
COMPILE /tmp/tmp0s6fRr.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/tmp0s6fRr.cpp -o /tmp/tmp0s6fRr.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmp0s6fRr.o -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: - tested ok
REPORT: Detecting pointer size:
COMPILE /tmp/tmpH7zFSE.cpp:
---
#include <iostream>
int main() {
std::cout << sizeof(void*);
return (0);
}
---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native /tmp/tmpH7zFSE.cpp -o /tmp/tmpH7zFSE.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpH7zFSE.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/tmpj6hbGu.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/tmpj6hbGu.cpp -o /tmp/tmpj6hbGu.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpj6hbGu.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/tmpgPd2n6.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/tmpgPd2n6.cpp -o /tmp/tmpgPd2n6.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpgPd2n6.o -pthread -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: yes
REPORT: Checking for zlib compression library:
COMPILE /tmp/tmpvc65Ky.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/tmpvc65Ky.cpp -o /tmp/tmpvc65Ky.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpvc65Ky.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/tmphhache.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/tmphhache.cpp -
o /tmp/tmphhache.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmphhache.o -pthread -lz -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
3.2.9
>>
REPORT: 3.2.9
REPORT: Checking shared library generation:
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -isystem /usr/include/eigen3 /tmp/tmpjsOZnK.cpp -
o /tmp/tmpjsOZnK.o
EXIT: 0
>>
EXEC <<
CMD: g++ /tmp/tmpjsOZnK.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.7)
>>
REPORT: moc (version 4.8.7)
REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 2.01a
Using Qt version 4.8.7 in /usr/lib64
>>
REPORT: qmake (version 4.8.7)
REPORT: Checking for Qt rcc:
EXEC <<
CMD: rcc -v
EXIT: 1
STDERR:
Qt Resource Compiler version 4.8.7
>>
REPORT: rcc (version 4.8.7)
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 -pipe -O2 -Wall -W -
D_REENTRANT -DQT_NO_DEBUG -DQT_SVG_LIB -DQT_OPENGL_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -isystem /usr/lib64/qt4
/mkspecs/linux-g++ -isystem /usr/include/QtCore -isystem /usr/include/QtGui -isystem /usr/include/QtOpenGL -isystem /
usr/include/QtSvg -isystem /usr/include -isystem /usr/X11R6/include qt.cpp -o qt.o
EXIT: 1
STDERR:
In file included from /usr/include/c++/6.2.1/ext/string_conversions.h:41:0,
from /usr/include/c++/6.2.1/bits/basic_string.h:5402,
from /usr/include/c++/6.2.1/string:52,
from /usr/include/c++/6.2.1/bits/locale_classes.h:40,
from /usr/include/c++/6.2.1/bits/ios_base.h:41,
from /usr/include/c++/6.2.1/ios:42,
from /usr/include/c++/6.2.1/ostream:38,
from /usr/include/c++/6.2.1/iostream:39,
from qt.cpp:1:
/usr/include/c++/6.2.1/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
^
compilation terminated.
I found these two posts suggesting there is an issue with using the “-isystem /usr/include
” flag with gcc version 6:
https://bugreports.qt.io/browse/QTBUG-53367
https://bugreports.qt.io/browse/QTBUG-53375
Can I change the configure
options to not use this flag?
There doesn’t seem to be any easy way to change the g++ to a version < 6 on Fedora 24…
Any other suggestion?
Any help appreciated. Thanks
Julien