ERROR: error linking Qt application! Ubuntu 22.04

Hello everyone,

I am trying to install mrtrix in ubuntu 22.04 and I am receiving errors while configuring. I have attached the configure.log file below for reference.

I have installed libqt5-opengl & libqt5-opengl-dev package but still the error persist. I have been trying various solutions from the forums but nothing is working.

Thanks

Tried Solutions:

ERROR:
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.

REPORT:

type or paste code here
REPORT: 
MRtrix build type requested: release version
PATH set to: /home/cbdl/ANTs/bin:/usr/local/freesurfer/bin:/usr/local/freesurfer/fsfast/bin:/usr/local/freesurfer/tktools:/usr/local/fsl/bin:/usr/local/fsl/share/fsl/bin:/usr/local/freesurfer/mni/bin:/usr/local/fsl/share/fsl/bin:/usr/local/fsl/share/fsl/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin
REPORT: Detecting OS: linux

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
EXIT: 0
STDOUT:
Ubuntu clang version 14.0.0-1ubuntu1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
>>


REPORT: Ubuntu clang version 14.0.0-1ubuntu1

REPORT: Checking for C++11 compliance:

COMPILE /tmp/tmp5qzb6zso.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/tmp5qzb6zso.cpp -o /tmp/tmp5qzb6zso.o
EXIT: 1
STDERR:
/tmp/tmp5qzb6zso.cpp:2:10: fatal error: 'cstddef' file not found
#include <cstddef>
         ^~~~~~~~~
1 error generated.
>>

error deleting temporary file "/tmp/tmp5qzb6zso.o": No such file or directory
REPORT: test failed (see configure.log for details)

REPORT: Looking for compiler [g++]:
EXEC <<
CMD: g++ --version
EXIT: 0
STDOUT:
g++ (conda-forge gcc 11.3.0-19) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>


REPORT: g++ (conda-forge gcc 11.3.0-19) 11.3.0

REPORT: Checking for C++11 compliance:

COMPILE /tmp/tmpx_znw5ri.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: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmpx_znw5ri.cpp -o /tmp/tmpx_znw5ri.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpx_znw5ri.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: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC /tmp/tmph_q2dkzc.cpp -o /tmp/tmph_q2dkzc.o
EXIT: 0
>>

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


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /tmp/tmprcv620_l.cpp:
---

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

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

EXEC <<
CMD: g++ /tmp/tmprcv620_l.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/tmpwdyhz31e.cpp:
---

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

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

EXEC <<
CMD: g++ /tmp/tmpwdyhz31e.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/tmpwaeth5b7.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 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 /tmp/tmpwaeth5b7.cpp -o /tmp/tmpwaeth5b7.o
EXIT: 0
>>

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

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


REPORT: ok

REPORT: Checking for ::max_align_t:

COMPILE /tmp/tmpxywg2v0p.cpp:
---

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

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

EXEC <<
CMD: g++ /tmp/tmpxywg2v0p.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/tmpn_9m4t5a.cpp:
---

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

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

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

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


REPORT: 16 bytes
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/local/fsl/include/eigen3
>>


REPORT: Checking for Eigen3 library:

COMPILE /tmp/tmpznfrkcfm.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: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -idirafter /usr/local/fsl/include/eigen3 /tmp/tmpznfrkcfm.cpp -o /tmp/tmpznfrkcfm.o
EXIT: 0
>>

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

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


REPORT: 3.4.0

REPORT: Checking for Eigen3 Unsupported:

COMPILE /tmp/tmpl1cf66od.cpp:
---

#include <iostream>
#include <Eigen/Core>
#include <unsupported/Eigen/SpecialFunctions>

using array_type = Eigen::Array<double, 1, 1>;

int main (int argc, char* argv[]) {
  auto test = Eigen::betainc (array_type::Constant (10.0), array_type::Constant (0.5), array_type::Constant (1.0));
  std::cout << "Present";
  return (0);
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -idirafter /usr/local/fsl/include/eigen3 -DEIGEN_DONT_PARALLELIZE /tmp/tmpl1cf66od.cpp -o /tmp/tmpl1cf66od.o
EXIT: 0
>>

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

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


REPORT: Present
EXEC <<
CMD: pkg-config --cflags zlib
EXIT: 0
STDOUT:
-I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs zlib
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -lz
>>


REPORT: Checking for zlib compression library:

COMPILE /tmp/tmpzhy640t5.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /usr/local/fsl/include /tmp/tmpzhy640t5.cpp -o /tmp/tmpzhy640t5.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpzhy640t5.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -o a.out
EXIT: 0
>>

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


REPORT: 1.2.13

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

COMPILE /tmp/tmpodwylycg.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /usr/local/fsl/include -I/home/cbdl/mrtrix3/core /tmp/tmpodwylycg.cpp -o /tmp/tmpodwylycg.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpodwylycg.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -o a.out
EXIT: 0
>>

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


REPORT: ok
EXEC <<
CMD: pkg-config --cflags libtiff-4
EXIT: 0
STDOUT:
-I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs libtiff-4
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -ltiff
>>


REPORT: Checking for TIFF library:

COMPILE /tmp/tmpxvn37frz.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /usr/local/fsl/include -idirafter /usr/local/fsl/include /tmp/tmpxvn37frz.cpp -o /tmp/tmpxvn37frz.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpxvn37frz.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -ltiff -o a.out
EXIT: 0
>>

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


REPORT: LIBTIFF, Version 4.4.0
EXEC <<
CMD: pkg-config --cflags libpng
EXIT: 0
STDOUT:
-I/usr/local/fsl/include/libpng16 -I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs libpng
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -lpng16
>>


REPORT: Checking for PNG library:

COMPILE /tmp/tmpuk9zf5bj.cpp:
---

#include <iostream>
#include <png.h>

int main() {
  std::cout << "Header: " << PNG_LIBPNG_VER_STRING << "; library: " << png_libpng_ver;
  return (0);
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /usr/local/fsl/include -DMRTRIX_TIFF_SUPPORT -idirafter /usr/local/fsl/include -idirafter /usr/local/fsl/include/libpng16 -idirafter /usr/local/fsl/include /tmp/tmpuk9zf5bj.cpp -o /tmp/tmpuk9zf5bj.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpuk9zf5bj.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -ltiff -L/usr/local/fsl/lib -lpng16 -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
Header: 1.6.39; library: 1.6.39
>>


REPORT: Header: 1.6.39; library: 1.6.39
EXEC <<
CMD: pkg-config --cflags fftw3
EXIT: 0
STDOUT:
-I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs fftw3
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -lfftw3
>>


REPORT: Checking for FFTW library:

COMPILE /tmp/tmpkkstmkov.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /usr/local/fsl/include -DMRTRIX_TIFF_SUPPORT -idirafter /usr/local/fsl/include -DMRTRIX_PNG_SUPPORT -idirafter /usr/local/fsl/include/libpng16 -idirafter /usr/local/fsl/include -idirafter /usr/local/fsl/include /tmp/tmpkkstmkov.cpp -o /tmp/tmpkkstmkov.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpkkstmkov.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -ltiff -L/usr/local/fsl/lib -lpng16 -L/usr/local/fsl/lib -lfftw3 -o a.out
EXIT: 0
>>

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


REPORT: fftw-3.3.10-sse2-avx

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


REPORT: moc (version 5.15.6)

REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 3.1
Using Qt version 5.15.6 in /usr/local/fsl/lib
>>


REPORT: qmake (version 5.15.6)

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


REPORT: rcc (version 5.15.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 network
HEADERS += qt.h
SOURCES += qt.cpp
---
EXEC <<
CMD: qmake
EXIT: 0
STDOUT:
Info: creating stash file /tmp/tmpt2yqmhi4/.qmake.stash
>>

reading Qt parameters from file 'Makefile'... ok
  qt_defines: ['-DQT_NO_DEBUG', '-DQT_OPENGL_LIB', '-DQT_SVG_LIB', '-DQT_WIDGETS_LIB', '-DQT_GUI_LIB', '-DQT_NETWORK_LIB', '-DQT_CORE_LIB']
  qt_includes: ['-I.', '-I/usr/local/fsl/include/qt', '-I/usr/local/fsl/include/qt/QtOpenGL', '-I/usr/local/fsl/include/qt/QtSvg', '-I/usr/local/fsl/include/qt/QtWidgets', '-I/usr/local/fsl/include/qt/QtGui', '-I/usr/local/fsl/include/qt/QtNetwork', '-I/usr/local/fsl/include/qt/QtCore', '-I.', '-I/usr/local/fsl/include', '-I/usr/include/libdrm', '-I$(CONDA_BUILD_SYSROOT)/usr/include', '-I/usr/local/fsl/mkspecs/linux-g++']
  qt_libs: ['$(SUBLIBS)', '/usr/local/fsl/lib/libQt5OpenGL.so', '/usr/local/fsl/lib/libQt5Svg.so', '/usr/local/fsl/lib/libQt5Widgets.so', '/usr/local/fsl/lib/libQt5Gui.so', '/usr/local/fsl/lib/libQt5Network.so', '/usr/local/fsl/lib/libQt5Core.so', '-L/usr/lib64', '-lGL', '-lpthread']
EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>

EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /usr/local/fsl/include -DMRTRIX_TIFF_SUPPORT -idirafter /usr/local/fsl/include -DMRTRIX_PNG_SUPPORT -idirafter /usr/local/fsl/include/libpng16 -idirafter /usr/local/fsl/include -DEIGEN_FFTW_DEFAULT -idirafter /usr/local/fsl/include -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -idirafter /usr/local/fsl/include/qt -idirafter /usr/local/fsl/include/qt/QtOpenGL -idirafter /usr/local/fsl/include/qt/QtSvg -idirafter /usr/local/fsl/include/qt/QtWidgets -idirafter /usr/local/fsl/include/qt/QtGui -idirafter /usr/local/fsl/include/qt/QtNetwork -idirafter /usr/local/fsl/include/qt/QtCore -idirafter /usr/local/fsl/include -idirafter /usr/include/libdrm -idirafter $(CONDA_BUILD_SYSROOT)/usr/include -idirafter /usr/local/fsl/mkspecs/linux-g++ qt.cpp -o qt.o
EXIT: 0
>>

EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /usr/local/fsl/include -DMRTRIX_TIFF_SUPPORT -idirafter /usr/local/fsl/include -DMRTRIX_PNG_SUPPORT -idirafter /usr/local/fsl/include/libpng16 -idirafter /usr/local/fsl/include -DEIGEN_FFTW_DEFAULT -idirafter /usr/local/fsl/include -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -idirafter /usr/local/fsl/include/qt -idirafter /usr/local/fsl/include/qt/QtOpenGL -idirafter /usr/local/fsl/include/qt/QtSvg -idirafter /usr/local/fsl/include/qt/QtWidgets -idirafter /usr/local/fsl/include/qt/QtGui -idirafter /usr/local/fsl/include/qt/QtNetwork -idirafter /usr/local/fsl/include/qt/QtCore -idirafter /usr/local/fsl/include -idirafter /usr/include/libdrm -idirafter $(CONDA_BUILD_SYSROOT)/usr/include -idirafter /usr/local/fsl/mkspecs/linux-g++ qt_moc.cpp -o qt_moc.o
EXIT: 0
>>

EXEC <<
CMD: g++ -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -ltiff -L/usr/local/fsl/lib -lpng16 -L/usr/local/fsl/lib -lfftw3 qt_moc.o qt.o -o qt /usr/local/fsl/lib/libQt5OpenGL.so /usr/local/fsl/lib/libQt5Svg.so /usr/local/fsl/lib/libQt5Widgets.so /usr/local/fsl/lib/libQt5Gui.so /usr/local/fsl/lib/libQt5Network.so /usr/local/fsl/lib/libQt5Core.so -L/usr/lib64 -lGL -lpthread
EXIT: 1
STDERR:
/usr/local/fsl/bin/../lib/gcc/x86_64-conda-linux-gnu/11.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lGL: No such file or directory
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.

Output of dpkg -l | grep nvidia

type or paste code hereii  libnvidia-cfg1-470:amd64                   470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-470                       470.161.03-0ubuntu0.22.04.1             all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-470:amd64                470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA libcompute package
ii  libnvidia-compute-470:i386                 470.161.03-0ubuntu0.22.04.1             i386         NVIDIA libcompute package
ii  libnvidia-decode-470:amd64                 470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-decode-470:i386                  470.161.03-0ubuntu0.22.04.1             i386         NVIDIA Video Decoding runtime libraries
ii  libnvidia-egl-wayland1:amd64               1:1.1.9-1.1                             amd64        Wayland EGL External Platform library -- shared library
ii  libnvidia-encode-470:amd64                 470.161.03-0ubuntu0.22.04.1             amd64        NVENC Video Encoding runtime library
ii  libnvidia-encode-470:i386                  470.161.03-0ubuntu0.22.04.1             i386         NVENC Video Encoding runtime library
ii  libnvidia-extra-470:amd64                  470.161.03-0ubuntu0.22.04.1             amd64        Extra libraries for the NVIDIA driver
ii  libnvidia-fbc1-470:amd64                   470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-fbc1-470:i386                    470.161.03-0ubuntu0.22.04.1             i386         NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-470:amd64                     470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-gl-470:i386                      470.161.03-0ubuntu0.22.04.1             i386         NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  libnvidia-ifr1-470:amd64                   470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA OpenGL-based Inband Frame Readback runtime library
ii  libnvidia-ifr1-470:i386                    470.161.03-0ubuntu0.22.04.1             i386         NVIDIA OpenGL-based Inband Frame Readback runtime library
rc  linux-modules-nvidia-470-5.15.0-43-generic 5.15.0-43.46+1                          amd64        Linux kernel nvidia modules for version 5.15.0-43
ii  linux-modules-nvidia-470-5.15.0-60-generic 5.15.0-60.66                            amd64        Linux kernel nvidia modules for version 5.15.0-60
ii  linux-modules-nvidia-470-generic-hwe-22.04 5.15.0-60.66                            amd64        Extra drivers for nvidia-470 for the generic-hwe-22.04 flavour
ii  linux-objects-nvidia-470-5.15.0-43-generic 5.15.0-43.46+1                          amd64        Linux kernel nvidia modules for version 5.15.0-43 (objects)
ii  linux-objects-nvidia-470-5.15.0-60-generic 5.15.0-60.66                            amd64        Linux kernel nvidia modules for version 5.15.0-60 (objects)
ii  linux-signatures-nvidia-5.15.0-43-generic  5.15.0-43.46+1                          amd64        Linux kernel signatures for nvidia modules for version 5.15.0-43-generic
ii  linux-signatures-nvidia-5.15.0-60-generic  5.15.0-60.66                            amd64        Linux kernel signatures for nvidia modules for version 5.15.0-60-generic
ii  nvidia-compute-utils-470                   470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA compute utilities
ii  nvidia-driver-470                          470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA driver metapackage
ii  nvidia-kernel-common-470                   470.161.03-0ubuntu0.22.04.1             amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-470                   470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA kernel source package
ii  nvidia-prime                               0.8.17.1                                all          Tools to enable NVIDIA's Prime
ii  nvidia-settings                            510.47.03-0ubuntu1                      amd64        Tool for configuring the NVIDIA graphics driver
ii  nvidia-utils-470                           470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA driver support binaries
ii  screen-resolution-extra                    0.18.2                                  all          Extension for the nvidia-settings control panel
ii  xserver-xorg-video-nvidia-470              470.161.03-0ubuntu0.22.04.1             amd64        NVIDIA binary Xorg d
1 Like

Main issue probably stems from interference from two separate sources, both of which could cause trouble: FSL and conda.


First, it’s using the conda compiler, which invariably causes trouble – especially for GUI / OpenGL applications:

I’m not sure why that would be, we normally try to remove anything conda-related from the configuration to avoid these kinds of issues – but I can’t see anything in your PATH that makes any mention of conda, so it’s possible you’ve installed it in a non-standard location where the name ‘conda’ doesn’t feature, which would fool our naive attempts at dealing with this… (?)


Second, you’re using non-system packages installed in /usr/local/fsl.

EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/local/fsl/include/eigen3
>>

I expect the reason these are being included may be because it’s using a version of pkg-config installed in that location, rather than the system-supplied one (you can check with which pkg-configsystem-supplied version should be in /usr/bin).

I’ve no idea whether you installed these packages manually at this location, or whether these came as part of FSL. We’ve not previously come across issues of this sort with FSL, so I suspect the former (?)


To fix both issues, it may be sufficient to set your PATH to a more bare-bones version that doesn’t include any 3rd party packages (at least not FSL or conda). Something like this ought to be enough, which I’ve obtained by stripping out anything non-standard from the PATH reported at the head of your configure.log:

export PATH=/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
./configure

Note that you may now find that some of the packages that you thought were installed are now no longer found, if it was previously relying on the non-standard versions installed in /usr/local/fsl. If that’s the case, it should just be a matter of using apt to install the expected system-supplied version, as suggested in our docs.

Hope this sorts out the problem…
Cheers,
Donald.

1 Like

Hi

Thank you for your assistance. The solution worked.

Regarding FSL:
I did not install it manually, it came as part of FSL itself. I think it might have changed in the recent versions.

Thanks again

1 Like

It have a feeling that current FSL installation instructions/distribution have an issue.

Only yesterday, a colleague of mine freshly installed FSL and ended up with a “broken” compiler because the FSL installation bundles clang++ and adds it to the front of the PATH variable.

Ok, that’s an … interesting decision they made there. I have a feeling they’re going to start getting a fair bit of pushback about this, it’s going to break quite a lot of users’ workflows…

I am facing the problem with linking Qt application. I have installed libqt5-opengl & libqt5-opengl-dev package but still the error persist. I have been trying various solutions from the forums but nothing is working. I tried all the solution as mentioned above but still stuck up with the same error.

REPORT: 
MRtrix build type requested: release version

REPORT: WARNING: anaconda/miniconda detected in PATH ("/usr/local/fsl/condabin") - removed to avoid conflicts
PATH set to: /usr/local/fsl/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
REPORT: WARNING: anaconda/miniconda compiler set by CXX environment variable - ignored to avoid conflicts

REPORT: 
NOTE: if you intend to build with anaconda/miniconda (not recommended), pass the -conda flag to ./configure

REPORT: Detecting OS: linux

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
error invoking command "clang++": No such file or directory
>>


REPORT: not found

REPORT: Looking for compiler [g++]:
EXEC <<
CMD: g++ --version
EXIT: 0
STDOUT:
g++ (conda-forge gcc 12.3.0-11) 12.3.0
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>


REPORT: g++ (conda-forge gcc 12.3.0-11) 12.3.0

REPORT: Checking for C++11 compliance:

COMPILE /tmp/tmpjyv6gsaz.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: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include /tmp/tmpjyv6gsaz.cpp -o /tmp/tmpjyv6gsaz.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpjyv6gsaz.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: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include /tmp/tmpys3l_6j0.cpp -o /tmp/tmpys3l_6j0.o
EXIT: 0
>>

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


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /tmp/tmph7nrsoj5.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include /tmp/tmph7nrsoj5.cpp -o /tmp/tmph7nrsoj5.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmph7nrsoj5.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/tmpe4w22ryh.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 /tmp/tmpe4w22ryh.cpp -o /tmp/tmpe4w22ryh.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpe4w22ryh.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/tmpobq81e7n.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 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 /tmp/tmpobq81e7n.cpp -o /tmp/tmpobq81e7n.o
EXIT: 0
>>

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

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


REPORT: ok

REPORT: Checking for ::max_align_t:

COMPILE /tmp/tmpes83nmk7.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 /tmp/tmpes83nmk7.cpp -o /tmp/tmpes83nmk7.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpes83nmk7.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/tmpgl3lpwm2.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 /tmp/tmpgl3lpwm2.cpp -o /tmp/tmpgl3lpwm2.o
EXIT: 0
>>

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

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


REPORT: 16 bytes
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/local/fsl/include/eigen3
>>


REPORT: Checking for Eigen3 library:

COMPILE /tmp/tmphqbu6azl.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: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -isystem /usr/local/fsl/include/eigen3 /tmp/tmphqbu6azl.cpp -o /tmp/tmphqbu6azl.o
EXIT: 0
>>

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

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


REPORT: 3.4.0

REPORT: Checking for Eigen3 Unsupported:

COMPILE /tmp/tmpc_a0a4o6.cpp:
---

#include <iostream>
#include <Eigen/Core>
#include <unsupported/Eigen/SpecialFunctions>

using array_type = Eigen::Array<double, 1, 1>;

int main (int argc, char* argv[]) {
  auto test = Eigen::betainc (array_type::Constant (10.0), array_type::Constant (0.5), array_type::Constant (1.0));
  std::cout << "Present";
  return (0);
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -isystem /usr/local/fsl/include/eigen3 -DEIGEN_DONT_PARALLELIZE /tmp/tmpc_a0a4o6.cpp -o /tmp/tmpc_a0a4o6.o
EXIT: 0
>>

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

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


REPORT: Present
EXEC <<
CMD: pkg-config --cflags zlib
EXIT: 0
STDOUT:
-I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs zlib
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -lz
>>


REPORT: Checking for zlib compression library:

COMPILE /tmp/tmp796cg7kz.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -isystem /usr/local/fsl/include /tmp/tmp796cg7kz.cpp -o /tmp/tmp796cg7kz.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmp796cg7kz.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -o a.out
EXIT: 0
>>

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


REPORT: 1.2.13

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

COMPILE /tmp/tmpli9c4apv.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -isystem /usr/local/fsl/include -I/home/vboxuser/mrtrix3/core /tmp/tmpli9c4apv.cpp -o /tmp/tmpli9c4apv.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpli9c4apv.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -o a.out
EXIT: 0
>>

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


REPORT: ok
EXEC <<
CMD: pkg-config --cflags libtiff-4
EXIT: 0
STDOUT:
-I/usr/local/fsl/include -I/usr/local/fsl/include/webp -I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs libtiff-4
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -ltiff
>>


REPORT: Checking for TIFF library:

COMPILE /tmp/tmphg3w9p2o.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -isystem /usr/local/fsl/include -isystem /usr/local/fsl/include -isystem /usr/local/fsl/include/webp -isystem /usr/local/fsl/include /tmp/tmphg3w9p2o.cpp -o /tmp/tmphg3w9p2o.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmphg3w9p2o.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -ltiff -o a.out
EXIT: 1
STDERR:
/usr/local/fsl/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/fsl/lib/liblzma.so.5: undefined reference to `memcpy@GLIBC_2.14'
/usr/local/fsl/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/fsl/lib/liblzma.so.5: undefined reference to `clock_gettime@GLIBC_2.17'
collect2: error: ld returned 1 exit status
>>

error deleting temporary file "a.out": No such file or directory
REPORT: not found - TIFF support disabled
EXEC <<
CMD: pkg-config --cflags libpng
EXIT: 0
STDOUT:
-I/usr/local/fsl/include/libpng16 -I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs libpng
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -lpng16
>>


REPORT: Checking for PNG library:

COMPILE /tmp/tmpadtiomy2.cpp:
---

#include <iostream>
#include <png.h>

int main() {
  std::cout << "Header: " << PNG_LIBPNG_VER_STRING << "; library: " << png_libpng_ver;
  return (0);
}

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -isystem /usr/local/fsl/include -isystem /usr/local/fsl/include/libpng16 -isystem /usr/local/fsl/include /tmp/tmpadtiomy2.cpp -o /tmp/tmpadtiomy2.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpadtiomy2.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -lpng16 -o a.out
EXIT: 0
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
Header: 1.6.43; library: 1.6.43
>>


REPORT: Header: 1.6.43; library: 1.6.43
EXEC <<
CMD: pkg-config --cflags fftw3
EXIT: 0
STDOUT:
-I/usr/local/fsl/include
>>

EXEC <<
CMD: pkg-config --libs fftw3
EXIT: 0
STDOUT:
-L/usr/local/fsl/lib -lfftw3
>>


REPORT: Checking for FFTW library:

COMPILE /tmp/tmpvqwrnxa3.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -isystem /usr/local/fsl/include -DMRTRIX_PNG_SUPPORT -isystem /usr/local/fsl/include/libpng16 -isystem /usr/local/fsl/include -isystem /usr/local/fsl/include /tmp/tmpvqwrnxa3.cpp -o /tmp/tmpvqwrnxa3.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpvqwrnxa3.o -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -lpng16 -L/usr/local/fsl/lib -lfftw3 -o a.out
EXIT: 0
>>

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


REPORT: fftw-3.3.10-sse2-avx

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


REPORT: moc (version 5.15.8)

REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 3.1
Using Qt version 5.15.8 in /usr/local/fsl/lib
>>


REPORT: qmake (version 5.15.8)

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


REPORT: rcc (version 5.15.8)

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 network
HEADERS += qt.h
SOURCES += qt.cpp
---
EXEC <<
CMD: qmake
EXIT: 0
STDOUT:
Info: creating stash file /tmp/tmpmow5qyd5/.qmake.stash
>>

reading Qt parameters from file 'Makefile'... ok
  qt_defines: ['-DQT_NO_DEBUG', '-DQT_OPENGL_LIB', '-DQT_SVG_LIB', '-DQT_WIDGETS_LIB', '-DQT_GUI_LIB', '-DQT_NETWORK_LIB', '-DQT_CORE_LIB']
  qt_includes: ['-I.', '-I/usr/local/fsl/include/qt', '-I/usr/local/fsl/include/qt/QtOpenGL', '-I/usr/local/fsl/include/qt/QtSvg', '-I/usr/local/fsl/include/qt/QtWidgets', '-I/usr/local/fsl/include/qt/QtGui', '-I/usr/local/fsl/include/qt/QtNetwork', '-I/usr/local/fsl/include/qt/QtCore', '-I.', '-I/usr/local/fsl/include', '-I/usr/include/libdrm', '-I/usr/local/fsl/mkspecs/linux-g++']
  qt_libs: ['$(SUBLIBS)', '/usr/local/fsl/lib/libQt5OpenGL.so', '/usr/local/fsl/lib/libQt5Svg.so', '/usr/local/fsl/lib/libQt5Widgets.so', '/usr/local/fsl/lib/libQt5Gui.so', '/usr/local/fsl/lib/libQt5Network.so', '/usr/local/fsl/lib/libQt5Core.so', '-L/usr/lib64', '-lGL', '-lpthread']
EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>

EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -isystem /usr/local/fsl/include -DMRTRIX_PNG_SUPPORT -isystem /usr/local/fsl/include/libpng16 -isystem /usr/local/fsl/include -DEIGEN_FFTW_DEFAULT -isystem /usr/local/fsl/include -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -isystem /usr/local/fsl/include/qt -isystem /usr/local/fsl/include/qt/QtOpenGL -isystem /usr/local/fsl/include/qt/QtSvg -isystem /usr/local/fsl/include/qt/QtWidgets -isystem /usr/local/fsl/include/qt/QtGui -isystem /usr/local/fsl/include/qt/QtNetwork -isystem /usr/local/fsl/include/qt/QtCore -isystem /usr/local/fsl/include -isystem /usr/include/libdrm -isystem /usr/local/fsl/mkspecs/linux-g++ qt.cpp -o qt.o
EXIT: 0
>>

EXEC <<
CMD: g++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -pthread -fPIC -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /usr/local/fsl/include -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -isystem /usr/local/fsl/include -DMRTRIX_PNG_SUPPORT -isystem /usr/local/fsl/include/libpng16 -isystem /usr/local/fsl/include -DEIGEN_FFTW_DEFAULT -isystem /usr/local/fsl/include -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -isystem /usr/local/fsl/include/qt -isystem /usr/local/fsl/include/qt/QtOpenGL -isystem /usr/local/fsl/include/qt/QtSvg -isystem /usr/local/fsl/include/qt/QtWidgets -isystem /usr/local/fsl/include/qt/QtGui -isystem /usr/local/fsl/include/qt/QtNetwork -isystem /usr/local/fsl/include/qt/QtCore -isystem /usr/local/fsl/include -isystem /usr/include/libdrm -isystem /usr/local/fsl/mkspecs/linux-g++ qt_moc.cpp -o qt_moc.o
EXIT: 0
>>

EXEC <<
CMD: g++ -Wl,--sort-common,--as-needed -pthread -L/usr/local/fsl/lib -lz -L/usr/local/fsl/lib -lpng16 -L/usr/local/fsl/lib -lfftw3 qt_moc.o qt.o -o qt /usr/local/fsl/lib/libQt5OpenGL.so /usr/local/fsl/lib/libQt5Svg.so /usr/local/fsl/lib/libQt5Widgets.so /usr/local/fsl/lib/libQt5Gui.so /usr/local/fsl/lib/libQt5Network.so /usr/local/fsl/lib/libQt5Core.so -L/usr/lib64 -lGL -lpthread
EXIT: 1
STDERR:
/usr/local/fsl/bin/../lib/gcc/x86_64-conda-linux-gnu/12.3.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lGL: No such file or directory
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.

Hi @raz27289,

This seems like the same issue as in this post:

Try the suggested solution, see if that helps…

Donald