Mrview display problems after Mac Mojave upgrade

Hi there,

I recently updated my Mac OS to Mojave. I reinstalled the dependencies for mrtrix using Homebrew and reinstalled mrtrix. The commandline interface works fine however, mrview does not display the toolbar or images.

See image attached.

I ran a debug and it come up with the following errors:

mrview: [DEBUG] No config file found at "/etc/mrtrix.conf"
mrview: [DEBUG] No config file found at "/Users/kaushikram/.mrtrix.conf"
mrview: [INFO] GL renderer:  Intel Iris OpenGL Engine
mrview: [INFO] GL version:   4.1 INTEL-12.4.7
mrview: [INFO] GL vendor:    Intel Inc.
mrview: [DEBUG] loading font into OpenGL texture...
mrview: [DEBUG] compiling OpenGL vertex shader:
#version 330 core
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 font_pos;
uniform float scale_x;
uniform float scale_y;
out vec2 tex_coord;
void main () {
  gl_Position = vec4 (pos[0]*scale_x-1.0, pos[1]*scale_y-1.0, 0.0, 1.0);
  tex_coord = font_pos;

mrview: [DEBUG] compiling OpenGL fragment shader:
#version 330 core
in vec2 tex_coord;
uniform sampler2D sampler;
uniform float red, green, blue;
out vec4 color;
void main () {
  color.ra = texture (sampler, tex_coord).rg;
  color.rgb = color.r * vec3 (red, green, blue);

mrview: [DEBUG] font loaded

I have searched the forums but have not been able to find a solution. Does anyone know of a solution to this?

Those are not errors, but merely information to help debugging. So everything looks good on that front.

What Qt version are you using? For me, display issues with Mojave were fixed by upgrading Qt to version >= 5.12

Thanks for clarifying. I’m using Qt version 5.12.0 in /usr/local/Cellar/qt/5.12.0

I have tested the path, however still having the same display issues.

This sounds like the issue described here – which we never really got to the bottom of… I think it’s an issue with a conflict between clang and gcc, but I’d need access to a macOS system to investigate (and time…).

I didn’t solve it either… I could use the RC3 installation via homebrew, which downloads the binaries, and that works. BUT: then I found at least one bug in a python script that I solved going to github and copying the latest version.

@jdtournier: as you said this error is related to a conflict between clang and gcc, I found the same problem compiling an atom package later on… I can give you remote access to my machine if you want to run some tests. If I find a room full of time I will hoard all of it for myself though :wink:

Sorry about the previous message, I didn’t read this one:

I did brew uninstall mrtrix3_0rc3 and then followed their indications.

I think I had two problems then:

  1. The gcc problem
  2. The qt problem

I think the first problem was solved when I did mv /usr/local/include ./urs/local/include_old, and the second problem when I followed the indications in the post I referenced above.


Thanks, this information is going to be valuable when we come to fix this up properly. Unfortunately the fixes you’ve come up with are a bit of a hack, and not something we can recommend to all users. We’ll really need to get to the bottom of this… But at least we have a decent idea of what the problem is now.

You’re using macports right? Did you also have this issue at some point? Or were your issues related to the dark mode, as you reported here?

Thanks @Gari, we might need to do this if we don’t find a clean solution soon. As always though, I can’t see how I’m going to find the time in the near future. Especially when you won’t share any of your room-full of it… :stuck_out_tongue_winking_eye:

I followed this exact procedure and it resolved the mrview display issue. Although I did not reinstall mrtrix3. I simply ran the ./configure and ./build again and it worked.

I am using macports, yes, using the following config:

# autogenerated by MRtrix configure script
# configure output:
# MRtrix build type requested: release version
# Detecting OS: darwin
# OS X deployment target: 10.14
# Looking for compiler [clang++]: Apple LLVM version 10.0.0 (clang-1000.11.45.5)
# 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 5.12.0)
# Checking for Qt qmake: qmake (version 5.12.0)
# Checking for Qt rcc: rcc (version 5.12.0)
# Checking for Qt: 5.12.0

PATH = r'/Users/ben/Qt/5.12.0/clang_64/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'
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', '-isystem', '/opt/local/include', '-DMRTRIX_TIFF_SUPPORT', '-isystem', '/opt/local/include', '-DEIGEN_FFTW_DEFAULT', '-isystem', '/opt/local/include', '-Wall', '-O3', '-DNDEBUG' ]
ld = [ 'clang++', 'OBJECTS', 'LDFLAGS', '-o', 'EXECUTABLE' ]
ld_flags = [ '-mmacosx-version-min=10.14', '-L/opt/local/lib', '-lz', '-L/opt/local/lib', '-ltiff', '-L/opt/local/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', '-L/opt/local/lib', '-lz', '-L/opt/local/lib', '-ltiff', '-L/opt/local/lib', '-lfftw3' ]
eigen_cflags = [ '-isystem', '/opt/local/include/eigen3', '-DEIGEN_DONT_PARALLELIZE' ]
moc = 'moc'
rcc = 'rcc'
qt_cflags = [ '-pipe', '-stdlib=libc++', '-std=gnu++11', '-isysroot', '/Applications/', '-mmacosx-version-min=10.14', '-fPIC', '-DQT_NO_DEBUG', '-DQT_OPENGL_LIB', '-DQT_SVG_LIB', '-DQT_WIDGETS_LIB', '-DQT_GUI_LIB', '-DQT_CORE_LIB', '-isystem', '/Users/ben/Qt/5.12.0/clang_64/lib/QtOpenGL.framework/Headers', '-isystem', '/Users/ben/Qt/5.12.0/clang_64/lib/QtSvg.framework/Headers', '-isystem', '/Users/ben/Qt/5.12.0/clang_64/lib/QtWidgets.framework/Headers', '-isystem', '/Users/ben/Qt/5.12.0/clang_64/lib/QtGui.framework/Headers', '-isystem', '/Users/ben/Qt/5.12.0/clang_64/lib/QtCore.framework/Headers', '-isystem', '/Applications/', '-isystem', '/Applications/', '-isystem', '/Users/ben/Qt/5.12.0/clang_64/mkspecs/macx-clang', '-F/Users/ben/Qt/5.12.0/clang_64/lib' ]
qt_ldflags = [ '-stdlib=libc++', '-headerpad_max_install_names', '-Wl,-syslibroot,/Applications/', '-mmacosx-version-min=10.14', '-Wl,-rpath,@executable_path/Frameworks', '-Wl,-rpath,/Users/ben/Qt/5.12.0/clang_64/lib', '-F/Users/ben/Qt/5.12.0/clang_64/lib', '-framework', 'QtOpenGL', '-framework', 'QtWidgets', '-framework', 'QtGui', '-framework', 'QtCore', '-framework', 'DiskArbitration', '-framework', 'IOKit', '-framework', 'QtSvg', '-framework', 'OpenGL', '-framework', 'AGL' ]
nogui = False

so I am using qt from qt-installer and macports for everything else. I switched to qt from the qt-installer to get rid of dark mode issues with Mojave, I did not have any of the problems reported here. I am pretty sure the current macports dependencies will work just fine out-of-the-box as the qt version got updated to 5.12.

Hi All,

I have tried from scratch using homebrew to install MRtrix3’s dependencies on macOS Mojave (version 10.14.3), and I did not encounter any display issue in mrview. Homebrew has now include Qt-5.12.1 as their current formula. So if anyone has the same issue using mrview, there is a simple way to bypass the problem:

First, upgrade your homebrew by:

brew upgrade

and then upgrade your Qt by:

brew update

If you don’t wish to upgrade all homebrew formulae, you could run brew upgrade qt to only have Qt up-to-date. If you’d like to check your Qt version, you can run brew info qt.

After upgrading the Qt, you will also need to re-build MRtrix3 via ./configure and then ./build in your MRtrix3’s directory.

1 Like