Mrview error after re-uploading and addind MRtrix3tissue

Hello,

I am having issues running mrview.

I get the following problem

mrview: [WARNING] unable to determine OpenGL version - operation may be unstable if actual version is less than 3.3

mrview: [ERROR] GLSL log [vertex shader]: ERROR: 0:1: ‘’ : version ‘330’ is not supported

ERROR: 0:1: ‘’ : syntax error: #version

ERROR: 0:2: ‘layout’ : syntax error: syntax error

mrview: [ERROR] error compiling OpenGL vertex shader ID 1

QWidget: Must construct a QApplication before a QPaintDevice

Abort trap: 6

I recently added mrtrix3tissue and tried to reinstall mrtrix3 as well. I still am having trouble figuring out how to know if I am using mrtrix3 commands or mrtrix3tissue commands.

Thanks for any advice you can provide!

Best,
Daniel

1 Like

Hi Daniel,

I can’t help you with mrview; OpenGL isn’t really my expertise. I think @jdtournier is likely the expert here.

About this bit:

If you want to use both interchangeably, I would recommend to e.g. put one of them in your PATH variable and call specific commands from the other one directly by specifying the full path to the command. Does that make sense? That’s the safest way to make sure you’re always fully aware and in control of what you run, in my experience. All MRtrix commands also list their version at the first/top line of the command line information, which you get by just typing the command name without other parameters. E.g. if you just type dwi2response and hit enter, you should see at the top which version or installation is being run. As mentioned above, run the command via its complete path if you want to absolutely make sure you’re running the one you want to run. The version at the command line should then confirm this is positively the case.

All the best,
Thijs

Alright, for now I can just use different software to visualize the data.

And thank you for the confirmation. I have been doing just that and wanted to make sure I was okay doing it this way. Also, thank you for the tip on how to check the version being called!

1 Like

No worries!

On that specific issue, it’s hard to know what the problem is, especially if was working before… But the message very clearly says it’s not finding an OpenGL implementation that fits the requirements. This could be due to many reasons, many of which our outside our control (e.g. you might need to simply update the drivers for your graphics card). The one possibility that might explain this is if you’re running on macOS and compiling against Qt <5.1 – otherwise, please post the full contents of your config file, that’ll give us most of the information required to figure this out…

Thank you for the reply!

Below is the contents of my config file.

#!/usr/bin/python
#
# autogenerated by MRtrix configure script
#
# configure output:
# 
# MRtrix build type requested: release version
# 
# WARNING: Anaconda removed from PATH to avoid conflicts
# 
# Detecting OS: darwin
# OS X deployment target: 10.14
# Looking for compiler [clang++]: Apple LLVM version 10.0.1 (clang-1001.0.46.4)
# 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.7
# Checking for zlib compression library: 1.2.11
# Checking for "JSON for Modern C++" requirements: ok
# Checking for TIFF library: LIBTIFF, Version 4.0.10
# Checking for FFTW library: fftw-3.3.8-sse2-avx
# 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: 4.8.7


PATH = r'/Applications/MRtrix3Tissue/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/amos/bin/ants/bin/:/usr/local/fsl/bin:/Users/amos/.local/bin/fmriprep-docker:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/amos/.local/bin/fmriprep-docker:/Applications/fmriprep-docker:/Users/amos/.local/bin:/opt/X11/bin:/Users/amos/abin'
obj_suffix = '.o'
exe_suffix = ''
lib_prefix = 'lib'
lib_suffix = '.dylib'
cpp = [ 'clang++', '-c', 'CFLAGS', 'SRC', '-o', 'OBJECT' ]
cpp_flags = [ '-std=c++11', '-DMRTRIX_BUILD_TYPE="release version"', '-DMRTRIX_MACOSX', '-fPIC', '-mmacosx-version-min=10.14', '-DMRTRIX_WORD64', '-DMRTRIX_TIFF_SUPPORT', '-idirafter', '/usr/local/Cellar/libtiff/4.0.10_1/include', '-DEIGEN_FFTW_DEFAULT', '-idirafter', '/usr/local/Cellar/fftw/3.3.8_1/include', '-Wall', '-O3', '-DNDEBUG' ]
ld = [ 'clang++', 'OBJECTS', 'LDFLAGS', '-o', 'EXECUTABLE' ]
ld_flags = [ '-mmacosx-version-min=10.14', '-lz', '-L/usr/local/Cellar/libtiff/4.0.10_1/lib', '-ltiff', '-L/usr/local/Cellar/fftw/3.3.8_1/lib', '-lfftw3' ]
runpath = '-Wl,-rpath,@loader_path/'
ld_enabled = True
ld_lib = [ 'clang++', 'OBJECTS', 'LDLIB_FLAGS', '-o', 'LIB' ]
ld_lib_flags = [ '-dynamiclib', '-install_name', '@rpath/LIBNAME', '-mmacosx-version-min=10.14', '-lz', '-L/usr/local/Cellar/libtiff/4.0.10_1/lib', '-ltiff', '-L/usr/local/Cellar/fftw/3.3.8_1/lib', '-lfftw3' ]
eigen_cflags = [ '-idirafter', '/usr/local/Cellar/eigen/3.3.7/include/eigen3', '-DEIGEN_DONT_PARALLELIZE' ]
moc = 'moc'
rcc = 'rcc'
qt_cflags = [ '-pipe', '-stdlib=libc++', '-mmacosx-version-min=10.9', '-arch', 'x86_64', '-DQT_NO_DEBUG', '-DQT_SVG_LIB', '-DQT_OPENGL_LIB', '-DQT_GUI_LIB', '-DQT_CORE_LIB', '-DQT_SHARED', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/etc/qt4/mkspecs/unsupported/macx-clang-libc++', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtCore.framework/Versions/4/Headers', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtCore.framework/Versions/4/Headers', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtGui.framework/Versions/4/Headers', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtGui.framework/Versions/4/Headers', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtOpenGL.framework/Versions/4/Headers', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtOpenGL.framework/Versions/4/Headers', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtSvg.framework/Versions/4/Headers', '-idirafter', '/usr/local/Cellar/qt@4/4.8.7_5/lib/QtSvg.framework/Versions/4/Headers', '-idirafter', '/usr/local/include', '-idirafter', '/System/Library/Frameworks/OpenGL.framework/Headers', '-idirafter', '/System/Library/Frameworks/AGL.framework/Headers/', '-F/usr/local/lib' ]
qt_ldflags = [ '-headerpad_max_install_names', '-stdlib=libc++', '-mmacosx-version-min=10.9', '-arch', 'x86_64', '-F/usr/local/lib', '-L/usr/local/lib', '-framework', 'QtSvg', '-L/usr/local/opt/openssl/lib', '-L/usr/local/Cellar/qt@4/4.8.7_5/lib', '-F/usr/local/Cellar/qt@4/4.8.7_5/lib', '-framework', 'QtGui', '-framework', 'QtCore', '-framework', 'QtOpenGL', '-framework', 'OpenGL', '-framework', 'AGL' ]
nogui = False

Based on what you previously stated I assume this is because of Qt being version 4.8.7?

Yes, that’ll definitely be it. On macOS, only Qt version 5.1 or above will work – as stated in the documentation.

It looks like you’re using the homebrew version of Qt. See if you can install Qt5 via homebrew: brew install qt5, then try again.

Thank you for the help jdtournier. I was able to use brew install qt5 however, supposedly I already have qt 5+.

See
(base) 255a-280:~ amos$ brew info qt

qt: stable 5.14.1 (bottled), HEAD [keg-only]

Cross-platform application and UI framework

/usr/local/Cellar/qt/5.14.1 (10,389 files, 363.0MB)

Poured from bottle on 2020-01-31 at 14:07:14

From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/qt.rb

==> Dependencies

Build: pkg-config :heavy_check_mark:

==> Requirements

Build: xcode :heavy_check_mark:

Required: macOS >= 10.12 :heavy_check_mark:

==> Options

–HEAD

Install HEAD version

==> Caveats

We agreed to the Qt open source license for you.

If this is unacceptable you should uninstall.

qt is keg-only, which means it was not symlinked into /usr/local,

because Qt 5 has CMake issues when linked.

If you need to have qt first in your PATH run:

echo ‘export PATH="/usr/local/opt/qt/bin:$PATH"’ >> ~/.bash_profile

For compilers to find qt you may need to set:

export LDFLAGS="-L/usr/local/opt/qt/lib"

export CPPFLAGS="-I/usr/local/opt/qt/include"

For pkg-config to find qt you may need to set:

export PKG_CONFIG_PATH="/usr/local/opt/qt/lib/pkgconfig"

==> Analytics

install: 61,607 (30 days), 184,141 (90 days), 690,940 (365 days)

install-on-request: 17,199 (30 days), 51,429 (90 days), 189,541 (365 days)

build-error: 0 (30 days)

However, the configure file when I update mrtrix3 and run ./configure I still get the following.

(base) 255a-280:mrtrix3 amos$ ./configure

MRtrix build type requested: release version

WARNING: Anaconda removed from PATH to avoid conflicts

Detecting OS: darwin

OS X deployment target: 10.14

Looking for compiler [clang++]: Apple LLVM version 10.0.1 (clang-1001.0.46.4)

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

Checking for zlib compression library: 1.2.11

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

Checking for TIFF library: LIBTIFF, Version 4.1.0

Checking for FFTW library: fftw-3.3.8-sse2-avx

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: 4.8.7

writing configuration to file './config': ok

Is it possible I have 2 Qt versions somehow?

Thank you for any help you can provide.

I was able to get rid of other qt version with sudo apt purge qt4*. Now mrview works. Thanks for your help!

2 Likes