Problems updating mrtrix in OS X 10.13


#1

Dear mrtrix experts,

When I try to update mrtrix I get an error with qmake (qt5). I added the qt5 path as suggested but it’s not working… (see the error that it’s giving)

$ export PATH=/opt/local/libexec/qt5/bin:$PATH
_$ ./configure _

MRtrix build type requested: release

Detecting OS: darwin
OS X deployment target: 10.13
Looking for compiler [clang++]: Apple LLVM version 9.0.0 (clang-900.0.39.2)
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.2
Checking for zlib compression library: 1.2.11
Checking for “JSON for Modern C++” requirements: ok
Checking for TIFF library: LIBTIFF, Version 4.0.7
Checking for FFTW library: not found - FFTW support disabled
Checking for Qt moc: moc (version 5.6.2)
Checking for Qt qmake: qmake (version 5.6.2)
Checking for Qt rcc: rcc (version 5.6.2)
_Checking for Qt: _
ERROR: qmake returned with error:

Project ERROR: Could not resolve SDK path for ‘macosx10.12’

ERROR: unexpected exception!

Thank you,
Ane


#2

Unrelated to your question about tckedit, to update, can you try the following in a new terminal window:

xcode-select --install
./configure

#3

I still get the same error…
But apparently I have the last version of mrtrix: 0.3.15… when I tried ‘git pull’, it said that it was up to date…so I guess that’s not the problem…

git pull
Already up-to-date.


#4

git pull gets the last source code. To use it, you’d need to compile it (./configure; ./build), which seems to fail. Could you try this: https://stackoverflow.com/questions/41513456/qt-5-7-xcode-8-1-os-x-el-capitan-could-not-resolve-sdk-path-for-macosx

If you can still not compile it, what version of macOS and Xcode are you using? Can you make sure that both are up to date (via the App Store) and if you updated Xcode, then please follow this with sudo xcodebuild -license accept; xcode-select --install.

If you have homebrew installed, you might be more successful with our homebrew package (see blue note box).


#5

It’s still not working…I checked and in Xcode; Preferences; Location; Command lines Tools, I have Xcode9.3 selected
I am working in macOS 10.13.3 High sierra and Xcode 9.3 (just updated…)

Plus I when I run “sudo xcodebuild -license accept; xcode-select --install”

$ sudo xcodebuild -license accept; xcode-select --install
xcode-select: error: command line tools are already installed, use “Software Update” to install updates

See also the meaningful part of ./configure that is not working (extract from configure.log file):

REPORT: Checking for Qt:

source file “qt.h”:
#include

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
#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
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13

EXEC <<
CMD: qmake
EXIT: 3
STDOUT:
Info: creating stash file /private/var/folders/3f/wkfcgt8s4751t4n_w_hhcskc0000gq/T/tmpDx9WM7/.qmake.stash
STDERR:
Project ERROR: Could not resolve SDK path for ‘macosx10.12’

ERROR: qmake returned with error:

Project ERROR: Could not resolve SDK path for ‘macosx10.12’

ERROR: unexpected exception!

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.


#6

This might be a qt bug. Any change you can update qt5? I tested it successfully with qt 5.9.1 and 5.10.1 using the lastest macOS and Xcode.


#7

I updated qt5 (version 5.10), im using the latest xcode and now the error changed…ERROR: error linking Qt application!

Detecting OS: darwin
OS X deployment target: 10.13
Looking for compiler [clang++]: Apple LLVM version 9.1.0 (clang-902.0.39.1)
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.2
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 FFTW library: not found - FFTW support disabled
Checking for Qt moc: moc (version 5.10.0)
Checking for Qt qmake: qmake (version 5.10.0)
Checking for Qt rcc: rcc (version 5.10.0)
Checking for Qt:
ERROR: error linking Qt application!

Apparently is not able to find TIFF and FFTW libraries (which is not a problem). the part of the configure.log that crashes is the following:

EXEC <<
CMD: clang++ -mmacosx-version-min=10.13 -lz qt_moc.o qt.o -o qt -stdlib=libc++ -fembed-bitcode-marker -Wl,-e,_qt_main_wrapper -Wl,-rpath,@executable_path/Frameworks -L/Users/adminuser/Qt/5.10.0/ios/plugins/platforms -framework Foundation -framework UIKit -framework QuartzCore -framework AudioToolbox -framework AssetsLibrary -L/Users/adminuser/Qt/5.10.0/ios/lib -framework MobileCoreServices -framework CoreFoundation -framework CoreGraphics -framework OpenGLES -framework CoreText -framework ImageIO -lqios -lQt5FontDatabaseSupport -lqtfreetype -lQt5GraphicsSupport -lQt5ClipboardSupport -L/Users/adminuser/Qt/5.10.0/ios/plugins/iconengines -lqsvgicon -L/Users/adminuser/Qt/5.10.0/ios/plugins/imageformats -lqgif -lqicns -lqico -lqjpeg -lqmacjp2 -lqsvg -lqtga -lqtiff -lqwbmp -lqwebp -lQt5OpenGL -lQt5Svg -lQt5Widgets -lQt5Gui -lqtlibpng -lqtharfbuzz -lQt5Core -lm -lz -lqtpcre2
EXIT: 1
STDERR:
ld: framework not found UIKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I read some the posts addressing this issue (https://github.com/MRtrix3/mrtrix3/issues/1094 , https://github.com/MRtrix3/mrtrix3/pull/1090) but dont really get how to fix it. ./configure should be modified? or pkg-config disabled?


#8

I tried downloading the configure file from https://github.com/MRtrix3/mrtrix3/find/8ba55e15b7a9bd9782061298ae84cfbecd250515
and despite this seems an updated version, I get the same errors


#9

You shouldn’t need to modify configure. If you are ok with installing homebrew, I’d suggest using the homebrew way of installing MRtrix or at least its dependencies. In the latter case:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install eigen
brew install qt5
brew install pkg-config
export PATH=`brew --prefix`/opt/qt5/bin:$PATH
cd mrtrix3
git reset --hard HEAD
./configure
./build

#10

Using homebrew solved the problem (and setting the appropriate path for qt)! Thank you very much!! :-))))))


#11

Glad it’s working now. Happy MRtrixing!