Error: Unknown module(s) in QT: svg

Hi all,

I am trying to build MRtrix3 on the Lin4Neuro package using Virtual box on Windows 10.
Lin4Neuro is based on Ubuntu 18.04LTS with XFCE desktop environment.
I installed libqt5sv5 and libqt5svg5-dev which are latest versions. but I’ve got some issues in configuring Mtrix3 as below.


brain@l4n:~/git/mrtrix3$ ./configure

MRtrix build type requested: release version

Detecting OS: linux
Looking for compiler [clang++]: not found
Looking for compiler [g++]: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.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: ok
Checking for ::max_align_t: 16 bytes
Checking for std::max_align_t: 16 bytes
Checking for Eigen3 library: 3.3.4
Checking for Eigen3 Unsupported: Present
Checking for zlib compression library: 1.2.11
Checking for "JSON for Modern C++" requirements: ok
Checking for TIFF library: not found - TIFF support disabled
Checking for PNG library: Header: 1.6.34; library: 1.6.34
Checking for FFTW library: not found - FFTW support disabled
Checking for Qt moc: moc (version 5.12.8)
Checking for Qt qmake: qmake (version 5.12.8)
Checking for Qt rcc: rcc (version 5.12.8)
Checking for Qt: 
ERROR: qmake returned with error:

Project ERROR: Unknown module(s) in QT: svg

How can I resolve this issue?
Thank you.

-T_K

I think you just need to install the Qt5 SVG module:

sudo apt-get install libqt5svg5

and then try ./configure again. Let us know if that doesn’t fix the issue.

Thank you for your suggestion.

I ran command to install libqt5svg5 and got the latest version (5.9.5-0ubuntu1). Then I tried ./configure and got the following response.

brain@l4n:~/git/mrtrix3$ ./configure

MRtrix build type requested: release version

Detecting OS: linux
Looking for compiler [clang++]: not found
Looking for compiler [g++]: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.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: ok
Checking for ::max_align_t: 16 bytes
Checking for std::max_align_t: 16 bytes
Checking for Eigen3 library: 3.3.4
Checking for Eigen3 Unsupported: Present
Checking for zlib compression library: 1.2.11
Checking for "JSON for Modern C++" requirements: ok
Checking for TIFF library: not found - TIFF support disabled
Checking for PNG library: Header: 1.6.34; library: 1.6.34
Checking for FFTW library: not found - FFTW support disabled
Checking for Qt moc: 
ERROR:  Qt moc not found!

  MRtrix3 was unable to locate the Qt meta-object compiler 'moc'.

  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)
brain@l4n:~/git/mrtrix3$ export PATH=/opt/qt512/bin:$PATH
brain@l4n:~/git/mrtrix3$ ./configure

MRtrix build type requested: release version

Detecting OS: linux
Looking for compiler [clang++]: not found
Looking for compiler [g++]: g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.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: ok
Checking for ::max_align_t: 16 bytes
Checking for std::max_align_t: 16 bytes
Checking for Eigen3 library: 3.3.4
Checking for Eigen3 Unsupported: Present
Checking for zlib compression library: 1.2.11
Checking for "JSON for Modern C++" requirements: ok
Checking for TIFF library: not found - TIFF support disabled
Checking for PNG library: Header: 1.6.34; library: 1.6.34
Checking for FFTW library: not found - FFTW support disabled
Checking for Qt moc: moc (version 5.12.8)
Checking for Qt qmake: qmake (version 5.12.8)
Checking for Qt rcc: rcc (version 5.12.8)
Checking for Qt: 
ERROR: qmake returned with error:

Project ERROR: Unknown module(s) in QT: svg

How can I solve the problem from here?
Thank you.

-T_K

Sorry, I got that slightly wrong: you need the development version of that package (and the OpenGL module too): libqt5opengl5-dev and libqt5svg5-dev. From our documentation, this should install all the required dependencies on an Ubuntu system:

sudo apt-get install git g++ python libeigen3-dev zlib1g-dev libqt5opengl5-dev libqt5svg5-dev libgl1-mesa-dev libfftw3-dev libtiff5-dev libpng-dev

The other issue you have in your second attempt is that you’re trying to compile against a different version of Qt5 – not the Ubuntu-supplied version. It looks like that version (in /opt/qt512) was not compiled with the SVG module, which is what is causing the issue when you try to use it. I’m not sure why you’re trying to use that version, but if you have to use it, you may need to re-compile or re-install it with the SVG module.

It seems that Qt5.12 was interfering with the installation of MRtrix3. I was able to install MRtrix3 after that was fixed. Thank you very much.