Help with installing on Centos7?

Hi,
Would you be able to help me with compilation problems on Centos7
Sorry, I can’t seem to find the button to attach the log file.
I think there are three errors:

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpirPCYM.cpp -o /tmp/tmpirPCYM.o
EXIT: 1
STDERR:
/tmp/tmpirPCYM.cpp:11:6: error: variable length array of non-POD element type 'X'
  X x[argc];
     ^
1 error generated.
>>



EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /tmp/tmpfXACoU.cpp -o /tmp/tmpfXACoU.o
EXIT: 1
STDERR:
/tmp/tmpfXACoU.cpp:4:7: error: no member named 'max_align_t' in namespace 'std'; did you mean '::max_align_t'?
using std::max_align_t;
      ^~~~~~~~~~~~~~~~
      ::max_align_t
/usr/bin/../lib/clang/3.4.2/include/stddef.h:94:3: note: '::max_align_t' declared here
} max_align_t;
  ^
1 error generated.
>>
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_STD_MAX_ALIGN_T_NOT_DEFINED -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -pipe -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/include/libdrm -idirafter /usr/lib64/qt5/mkspecs/linux-g++ qt.cpp -o qt.o
EXIT: 1
STDERR:
clang: error: unknown argument: '-fstack-protector-strong'
>>

I have attached the ful log file below. Would you let us know how to fix them?

Thanks very much,
Nyoman

REPORT: 
MRtrix build type requested: release version

REPORT: Detecting OS: linux

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
EXIT: 0
STDOUT:
clang version 3.4.2 (tags/RELEASE_34/dot2-final)
Target: x86_64-redhat-linux-gnu
Thread model: posix
>>


REPORT: clang version 3.4.2 (tags/RELEASE_34/dot2-final)

REPORT: Checking for C++11 compliance:

COMPILE /tmp/tmpsEn4XZ.cpp:
---

#include <cstddef>
struct Base {
    Base (int);
};
struct Derived : Base {
    using Base::Base;
};

int main() {
  Derived D (int); // check for contructor inheritance
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpsEn4XZ.cpp -o /tmp/tmpsEn4XZ.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpsEn4XZ.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
>>


REPORT: ok

REPORT: Checking shared library generation:
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpFzeMYL.cpp -o /tmp/tmpFzeMYL.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpFzeMYL.o -shared -Wl,--sort-common,--as-needed -pthread -o libtest.so
EXIT: 0
>>


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /tmp/tmp2SiY9p.cpp:
---

#include <iostream>
int main() {
  std::cout << sizeof(void*);
  return (0);
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmp2SiY9p.cpp -o /tmp/tmp2SiY9p.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmp2SiY9p.o -Wl,--sort-common,--as-needed -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/tmpp62kyq.cpp:
---

int main(int argc, char* argv[]) {
  int x[argc];
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpp62kyq.cpp -o /tmp/tmpp62kyq.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpp62kyq.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
>>


REPORT: ok

REPORT: Checking for non-POD variable-length array support:

COMPILE /tmp/tmpirPCYM.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: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpirPCYM.cpp -o /tmp/tmpirPCYM.o
EXIT: 1
STDERR:
/tmp/tmpirPCYM.cpp:11:6: error: variable length array of non-POD element type 'X'
  X x[argc];
     ^
1 error generated.
>>

error deleting temporary file "/tmp/tmpirPCYM.o": No such file or directory
REPORT: not found

REPORT: Checking for ::max_align_t:

COMPILE /tmp/tmpec6_K5.cpp:
---

#include <iostream>
#include <cstddef>
using ::max_align_t;
int main() {
  std::cout << alignof (max_align_t) << " bytes\n";
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /tmp/tmpec6_K5.cpp -o /tmp/tmpec6_K5.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpec6_K5.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
16 bytes
>>


REPORT: 16 bytes

REPORT: Checking for std::max_align_t:

COMPILE /tmp/tmpfXACoU.cpp:
---

#include <iostream>
#include <cstddef>
using std::max_align_t;
int main() {
  std::cout << alignof (max_align_t) << " bytes\n";
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /tmp/tmpfXACoU.cpp -o /tmp/tmpfXACoU.o
EXIT: 1
STDERR:
/tmp/tmpfXACoU.cpp:4:7: error: no member named 'max_align_t' in namespace 'std'; did you mean '::max_align_t'?
using std::max_align_t;
      ^~~~~~~~~~~~~~~~
      ::max_align_t
/usr/bin/../lib/clang/3.4.2/include/stddef.h:94:3: note: '::max_align_t' declared here
} max_align_t;
  ^
1 error generated.
>>

error deleting temporary file "/tmp/tmpfXACoU.o": No such file or directory
REPORT: not found
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/include/eigen3
>>


REPORT: Checking for Eigen3 library:

COMPILE /tmp/tmpqY1coY.cpp:
---

#include <cstddef>
#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: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_STD_MAX_ALIGN_T_NOT_DEFINED -idirafter /usr/include/eigen3 /tmp/tmpqY1coY.cpp -o /tmp/tmpqY1coY.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpqY1coY.o -Wl,--sort-common,--as-needed -pthread -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
3.3.4
>>


REPORT: 3.3.4
EXEC <<
CMD: pkg-config --cflags zlib
EXIT: 0
>>

EXEC <<
CMD: pkg-config --libs zlib
EXIT: 0
STDOUT:
-lz
>>


REPORT: Checking for zlib compression library:

COMPILE /tmp/tmpd1gsyb.cpp:
---

#include <iostream>
#include <zlib.h>

int main() {
  std::cout << zlibVersion();
  return (0);
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_STD_MAX_ALIGN_T_NOT_DEFINED /tmp/tmpd1gsyb.cpp -o /tmp/tmpd1gsyb.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpd1gsyb.o -Wl,--sort-common,--as-needed -pthread -lz -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
1.2.11
>>


REPORT: 1.2.11

REPORT: Checking for "JSON for Modern C++" requirements:

COMPILE /tmp/tmpRMt8Xe.cpp:
---

#include "file/json.h"
int main (int argc, char* argv[])
{
  nlohmann::json json;
  json["key"] = "value";
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_STD_MAX_ALIGN_T_NOT_DEFINED -I/home/uqnkurn1/mrtrix3/core /tmp/tmpRMt8Xe.cpp -o /tmp/tmpRMt8Xe.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpRMt8Xe.o -Wl,--sort-common,--as-needed -pthread -lz -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
>>


REPORT: ok
EXEC <<
CMD: pkg-config --cflags libtiff-4
EXIT: 0
>>

EXEC <<
CMD: pkg-config --libs libtiff-4
EXIT: 0
STDOUT:
-ltiff
>>


REPORT: Checking for TIFF library:

COMPILE /tmp/tmpmNtuFe.cpp:
---

#include <iostream>
#include <tiffio.h>

int main() {
  std::cout << TIFFGetVersion();
  return (0);
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_STD_MAX_ALIGN_T_NOT_DEFINED /tmp/tmpmNtuFe.cpp -o /tmp/tmpmNtuFe.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpmNtuFe.o -Wl,--sort-common,--as-needed -pthread -lz -ltiff -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
LIBTIFF, Version 4.0.3
Copyright (c) 1988-1996 Sam Leffler
Copyright (c) 1991-1996 Silicon Graphics, Inc.
>>


REPORT: LIBTIFF, Version 4.0.3
EXEC <<
CMD: pkg-config --cflags fftw3
EXIT: 0
>>

EXEC <<
CMD: pkg-config --libs fftw3
EXIT: 0
STDOUT:
-lfftw3 -lm
>>


REPORT: Checking for FFTW library:

COMPILE /tmp/tmpqDzGFw.cpp:
---

#include <iostream>
#include <fftw3.h>

int main() {
  std::cout << fftw_version << "\n";
  return (0);
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_STD_MAX_ALIGN_T_NOT_DEFINED -DMRTRIX_TIFF_SUPPORT /tmp/tmpqDzGFw.cpp -o /tmp/tmpqDzGFw.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /tmp/tmpqDzGFw.o -Wl,--sort-common,--as-needed -pthread -lz -ltiff -lfftw3 -lm -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
fftw-3.3.3-sse2
>>


REPORT: fftw-3.3.3-sse2

REPORT: Checking for Qt moc:
EXEC <<
CMD: moc-qt5 -v
EXIT: 0
STDOUT:
moc-qt5 5.9.7
>>


REPORT: moc-qt5 (version 5.9.7)

REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake-qt5 -v
EXIT: 0
STDOUT:
QMake version 3.1
Using Qt version 5.9.7 in /usr/lib64
>>


REPORT: qmake-qt5 (version 5.9.7)

REPORT: Checking for Qt rcc:
EXEC <<
CMD: rcc-qt5 -v
EXIT: 0
STDOUT:
rcc-qt5 5.9.7
>>


REPORT: rcc-qt5 (version 5.9.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-qt5
EXIT: 0
STDOUT:
Info: creating stash file /tmp/tmpi6psA4/.qmake.stash
>>

EXEC <<
CMD: moc-qt5 qt.h -o qt_moc.cpp
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_STD_MAX_ALIGN_T_NOT_DEFINED -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -pipe -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtCore -isystem /usr/include/libdrm -idirafter /usr/lib64/qt5/mkspecs/linux-g++ qt.cpp -o qt.o
EXIT: 1
STDERR:
clang: error: unknown argument: '-fstack-protector-strong'
>>


ERROR: error compiling 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.
1 Like

I think the problem is that this is an old version of the compiler. On my system, I have clang 9.0.1… Try upgrading it, or using a recent version of GCC.