Installation on Windows - qt error!

Hi MRTrix Team,

Im testing the new forum. :slightly_smiling:
I try to install MRTrix on Windows…just to test it.
I tried both ways (with and without MSYS2).
Both failed for me and I think its the qt - qmake file.
For the MSYS2 Installation it gave me:


$ ./configure

MRtrix build type requested: release

Detecting OS: windows
Checking for C++11 compliant compiler [g++]: 5.3.0 - 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 GNU Scientific Library: 2.1
Checking whether GSL compiles with -DHAVE_INLINE: yes
Checking shared library generation: yes
Checking for Qt moc: moc (version 4.8.7)
Checking for Qt qmake: qmake (version 4.8.7)
Checking for Qt rcc: rcc (version 4.8.7)
Checking for Qt:
ERROR: qmake returned with error:

QMAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: C:/msys64/tmp/tmp5s776d44/qt.pro


I tried to install it by my own, not to use the QT Reps, but that didnt help either. Any quick hints?

Ralf

Any chance you could post the full configure.log file? Preferably the one produced using MSYS2. My guess is, you have conflicting versions of Qt installed, or something like this…

Hi Donald,
here is the log.
Thanks:

REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: windows

REPORT: Checking for C++11 compliant compiler [g++]:
EXEC <<
CMD: g++ -dumpversion
EXIT: 0
STDOUT:
5.3.0
>>


REPORT: 5.3.0

COMPILE /tmp/tmpwfgdnjsb.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 -DMRTRIX_WINDOWS -mms-bitfields -march=native /tmp/tmpwfgdnjsb.cpp -o /tmp/tmpwfgdnjsb.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpwfgdnjsb.o -pthread -Wl,--allow-multiple-definition -o a.out
EXIT: 0
>>

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


REPORT:  - tested ok

REPORT: Detecting pointer size:

COMPILE /tmp/tmpdvtq1emh.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -DMRTRIX_WINDOWS -mms-bitfields -march=native /tmp/tmpdvtq1emh.cpp -o /tmp/tmpdvtq1emh.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpdvtq1emh.o -pthread -Wl,--allow-multiple-definition -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/tmpftk515un.cpp:
---


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

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -DMRTRIX_WINDOWS -mms-bitfields -march=native -DMRTRIX_WORD64 /tmp/tmpftk515un.cpp -o /tmp/tmpftk515un.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpftk515un.o -pthread -Wl,--allow-multiple-definition -o a.out
EXIT: 0
>>

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


REPORT: yes

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

COMPILE /tmp/tmp6hh7_6t_.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 -DMRTRIX_WINDOWS -mms-bitfields -march=native -DMRTRIX_WORD64 /tmp/tmp6hh7_6t_.cpp -o /tmp/tmp6hh7_6t_.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmp6hh7_6t_.o -pthread -Wl,--allow-multiple-definition -o a.out
EXIT: 0
>>

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


REPORT: yes

REPORT: Checking for zlib compression library:

COMPILE /tmp/tmpiney1kd8.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -DMRTRIX_WINDOWS -mms-bitfields -march=native -DMRTRIX_WORD64 /tmp/tmpiney1kd8.cpp -o /tmp/tmpiney1kd8.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpiney1kd8.o -pthread -Wl,--allow-multiple-definition -lz -o a.out
EXIT: 0
>>

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


REPORT: 1.2.8

REPORT: Checking for GNU Scientific Library:
EXEC <<
CMD: gsl-config --cflags
EXIT: 0
STDOUT:
-I/mingw64/include
>>

EXEC <<
CMD: gsl-config --libs
EXIT: 0
STDOUT:
-L/mingw64/lib -lgsl -lgslcblas -lm
>>


COMPILE /tmp/tmpww11r61r.cpp:
---

#include <iostream>
#include <gsl/gsl_version.h>
#include <gsl/gsl_matrix.h>

int main() { 
  std::cout << gsl_version; 
  gsl_matrix* M = gsl_matrix_alloc (3,3); 
  return (M->size1 != 3);
}

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -DMRTRIX_WINDOWS -mms-bitfields -march=native -DMRTRIX_WORD64 -I/mingw64/include /tmp/tmpww11r61r.cpp -o /tmp/tmpww11r61r.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpww11r61r.o -pthread -Wl,--allow-multiple-definition -lz -L/mingw64/lib -lgsl -lgslcblas -lm -o a.out
EXIT: 0
>>

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


REPORT: 2.1

REPORT: Checking whether GSL compiles with -DHAVE_INLINE:

COMPILE /tmp/tmpehanxnwy.cpp:
---

#include <gsl/gsl_matrix.h>
int main() { 
  gsl_matrix* M = gsl_matrix_alloc (3,3); 
  gsl_matrix_set(M,0,0,3.14); 
  return (gsl_matrix_get(M,0,0) != 3.14); 
}
---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -DMRTRIX_WINDOWS -mms-bitfields -march=native -DMRTRIX_WORD64 -I/mingw64/include -DHAVE_INLINE /tmp/tmpehanxnwy.cpp -o /tmp/tmpehanxnwy.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpehanxnwy.o -pthread -Wl,--allow-multiple-definition -lz -L/mingw64/lib -lgsl -lgslcblas -lm -o a.out
EXIT: 0
>>

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


REPORT: yes

REPORT: Checking shared library generation:
EXEC <<
CMD: g++ -c -std=c++11 -pthread -DMRTRIX_WINDOWS -mms-bitfields -march=native -DMRTRIX_WORD64 /tmp/tmptii0x0zh.cpp -o /tmp/tmptii0x0zh.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmptii0x0zh.o -pthread -shared -pthread -Wl,--allow-multiple-definition -lz -L/mingw64/lib -lgsl -lgslcblas -lm -o test.dll
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 C:/repo/mingw-w64-qt4/pkg/mingw-w64-x86_64-qt4/mingw64/lib
>>


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: 3
STDERR:
QMAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: C:/msys64/tmp/tmp5s776d44/qt.pro
>>


ERROR: qmake returned with error:

QMAKESPEC has not been set, so configuration cannot be deduced.
Error processing project file: C:/msys64/tmp/tmp5s776d44/qt.pro

Yes, not hugely helpful, unfortunately…

One option is to try using the more recent version of Qt, and removing version 4:

$ pacman -R mingw-w64-x86_64-qt4
$ pacman -S mingw-w64-x86_64-qt5

or something like that, and try again. I’m not sure why the instructions on the wiki current list version 4, maybe @bjeurissen has some good reason for that?

Otherwise, if that still fails with the same error, you could try explicitly setting your QMAKESPEC variable with something sensible. Given your log, I expect something like this might do the trick:

$ export QMAKESPEC=C:/repo/mingw-w64-qt5/pkg/mingw-w64-x86_64-qt5/mingw64/mkspecs/mingw-w64-g++

or something like this (I don’t have a Windows install to play with right now, so this is just a guess based on what I’ve seen with a Google search). Have a look inside that mkspecs folder, see if there’s anything that looks more promising.

Otherwise, I’m a bit stumped. I don’t really understand why you would need to set this in the first place, the instructions seem to have worked fine for others… Might be worth having a look a any init scripts you might have in your account, see whether any of them explicitly set or unset this variable?

Maby the reason for qt4 is:
Suche nach in Konflikt stehenden Paketen…

Pakete (5) mingw-w64-x86_64-icu-56.1-1  mingw-w64-x86_64-icu-debug-libs-56.1-1
           mingw-w64-x86_64-jasper-1.900.1-4  mingw-w64-x86_64-xpm-nox-4.2.0-4
           mingw-w64-x86_64-qt5-5.5.1-4

But I try arround,
maybe I will find something usefull.

Ralf

In case you wonder:
Suche nach in Konflikt stehenden Paketen… = Searching for conflicting packages…

I am building and running mrtrix on windows with the latest MSYS2 qt5 package just fine. I put qt4 on the wiki, because a couple of months ago I had some OpenGL glitches using the MYS2 qt5 package, but those seem to be fixed by now…

I guess we should update the instructions to use the Qt5 version then…

About the original problem though: have you come across this problem before…? Maybe you can check what your QMAKESPEC is set to?

Hi,

I reinstalled it on 5 Windows computers. 2 had the problem too and the other 3 worked. I’m not sure what the problem is. On one the qmake.exe still stays as qmake.exe.bak after installation. I dont know why. Non of them has an QT Phyton or something preinstalled.

QMAKESPEC: Where do I have to look for. Its not set in bashrc and so on.
Maybe this is the problem.

Ralf

My Windows system doesn’t have QMAKESPEC set and compiles fine. So no idea what’s going on here…