Error during compilation: "error linking Qt application"

Hi all,

I tried to build MRtrix3 on OSX 10.11.6 with Xcode 8.2.1 and qt5.9.1 (via homebrew).

I run into the following problem:

MRtrix build type requested: release

Detecting OS: darwin
OS X deployment target: 10.11
Looking for compiler [clang++]: Apple LLVM version 8.0.0 (clang-800.0.42.1)
Checking for C++11 compliance: ok
Checking for ::max_align_t: ok
Checking for std::max_align_t: ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: yes
Checking for non-POD variable-length array support: no
Checking for zlib compression library: 1.2.5
Checking for TIFF library: LIBTIFF, Version 4.0.8
Checking for Eigen 3 library: 3.3.4
Checking JSON for Modern C++ requirements: OK
Checking shared library generation: yes
Checking for Qt moc: moc (version 5.9.1)
Checking for Qt qmake: qmake (version 5.9.1)
Checking for Qt rcc: rcc (version 5.9.1)
Checking for Qt:
ERROR: error linking Qt application!

How can I resolve this issue?

Thanks!

-Vincent


Full log:

REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: darwin
EXEC <<
CMD: sw_vers -productVersion
EXIT: 0
STDOUT:
10.11.6
>>


REPORT: OS X deployment target: 10.11

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
EXIT: 0
STDOUT:
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>>


REPORT: Apple LLVM version 8.0.0 (clang-800.0.42.1)

REPORT: Checking for C++11 compliance:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpPVyuJU.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_MACOSX -fPIC -mmacosx-version-min=10.11 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpPVyuJU.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpPVyuJU.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpPVyuJU.o -mmacosx-version-min=10.11 -o a.out
EXIT: 0
>>

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


REPORT: ok

REPORT: Checking for ::max_align_t:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpFPAqL2.cpp:
---

#include <cstddef>
using ::max_align_t;
int main() {
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpFPAqL2.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpFPAqL2.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpFPAqL2.o -mmacosx-version-min=10.11 -o a.out
EXIT: 0
>>

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


REPORT: ok

REPORT: Checking for std::max_align_t:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmphgsOZu.cpp:
---

#include <cstddef>
using std::max_align_t;
int main() {
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmphgsOZu.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmphgsOZu.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmphgsOZu.o -mmacosx-version-min=10.11 -o a.out
EXIT: 0
>>

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


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJ1js7c.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJ1js7c.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJ1js7c.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJ1js7c.o -mmacosx-version-min=10.11 -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 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpYzxOod.cpp:
---


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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpYzxOod.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpYzxOod.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpYzxOod.o -mmacosx-version-min=10.11 -o a.out
EXIT: 0
>>

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


REPORT: yes

REPORT: Checking for non-POD variable-length array support:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpkygoej.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: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpkygoej.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpkygoej.o
EXIT: 1
STDERR:
/var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpkygoej.cpp:11:6: error: variable length array of non-POD element type 'X'
  X x[argc];
     ^
1 error generated.
>>

error deleting temporary file "/var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpkygoej.o": No such file or directory
REPORT: no

REPORT: Checking for zlib compression library:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpCbdHyG.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpCbdHyG.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpCbdHyG.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpCbdHyG.o -mmacosx-version-min=10.11 -lz -o a.out
EXIT: 0
>>

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


REPORT: 1.2.5

REPORT: Checking for TIFF library:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpr_1hqW.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpr_1hqW.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpr_1hqW.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpr_1hqW.o -mmacosx-version-min=10.11 -lz -ltiff -o a.out
EXIT: 0
>>

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


REPORT: LIBTIFF, Version 4.0.8

REPORT: Checking for Eigen 3 library:
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/local/Cellar/eigen/3.3.4/include/eigen3
>>


COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJLIYxO.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: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_TIFF_SUPPORT -isystem /usr/local/Cellar/eigen/3.3.4/include/eigen3 /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJLIYxO.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJLIYxO.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpJLIYxO.o -mmacosx-version-min=10.11 -lz -ltiff -o a.out
EXIT: 0
>>

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


REPORT: 3.3.4

REPORT: Checking JSON for Modern C++ requirements:

COMPILE /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpEyXt3P.cpp:
---

#include "file/json.h"

int main (int argc, char* argv[])
{
  nlohmann::json json;
  json["key"] = "value";
}


---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_TIFF_SUPPORT -I/Applications/MRtrix3/mrtrix3/core /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpEyXt3P.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpEyXt3P.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpEyXt3P.o -mmacosx-version-min=10.11 -lz -ltiff -o a.out
EXIT: 0
>>

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


REPORT: OK

REPORT: Checking shared library generation:
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_TIFF_SUPPORT /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpee77Wh.cpp -o /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpee77Wh.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpee77Wh.o -dynamiclib -install_name @rpath/LIBNAME -mmacosx-version-min=10.11 -mmacosx-version-min=10.11 -lz -ltiff -o libtest.dylib
EXIT: 0
>>


REPORT: yes

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


REPORT: moc (version 5.9.1)

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


REPORT: qmake (version 5.9.1)

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


REPORT: rcc (version 5.9.1)

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
HEADERS += qt.h
SOURCES += qt.cpp
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11
---
EXEC <<
CMD: qmake
EXIT: 0
STDOUT:
Info: creating stash file /private/var/folders/g8/t1dn3g655c58zh3qkbryc84c0000gn/T/tmpR4T6e4/.qmake.stash
>>

EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_TIFF_SUPPORT -pipe -stdlib=libc++ -std=gnu++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /usr/local/Cellar/qt/5.9.1/lib/QtOpenGL.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtSvg.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtWidgets.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtGui.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtCore.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.9.1/lib qt.cpp -o qt.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.11 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -DMRTRIX_TIFF_SUPPORT -pipe -stdlib=libc++ -std=gnu++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /usr/local/Cellar/qt/5.9.1/lib/QtOpenGL.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtSvg.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtWidgets.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtGui.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/lib/QtCore.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -isystem /usr/local/Cellar/qt/5.9.1/mkspecs/macx-clang -F/usr/local/Cellar/qt/5.9.1/lib qt_moc.cpp -o qt_moc.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -mmacosx-version-min=10.11 -lz -ltiff qt_moc.o qt.o -o qt -stdlib=libc++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.11 -Wl,-rpath,@executable_path/Frameworks -F/usr/local/Cellar/qt/5.9.1/lib -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSvg -framework OpenGL -framework AGL
EXIT: 1
STDERR:
ld: library not found for -ltiff
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>


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 Vincent,

The important line is this one near the end:

ld: library not found for -ltiff

This has to do with the recent addition of support for reading TIFF images directly as though they were MR images. For some reason, the earlier test for TIFF support succeeds:

Checking for TIFF library: LIBTIFF, Version 4.0.8

; yet then when compiling a test Qt application, the compiler is no longer able to find this library. Given this addition survived testing by myself and @jdtournier, I suspect it may be a weird complication to do with Mac; hopefully one of the devs with such a machine can look into it.

In the meantime, you may have more success by checking out a version of the code that does not contain these additions:

git checkout bbc5ec1
./configure
./build

Git will give you some warnings about being in a “detached HEAD state”; this just reflects that your code will no longer “follow” any code updates, until you explicitly tell it to (after the issue is sorted) by doing:

git checkout master
git pull

Cheers
Rob

I think the issue is that Qt decides to add this to the linker command invocation:

This seems to override the linker’s default search path for these libraries, and maybe the 10.12 SDK doesn’t come with libTIFF by default.

Any chance you could run:

 LDFLAGS=-v configure

and post the resulting output and configure.log file?

Hi Rob,

Thank you for your reply. This solved my issue and allowed me to build MRtrix3.

  • Vincent

@jdtournier, I think you are right about that MacOSX10.12.sdk does not have libtiff by default. So as long as I install libtiff (via homebrew), I get an error in the configure process. Please have a look at the output configure.log file as you suggested. Also, the same issue would occur for the fftw library.

Cheers.


REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: darwin
EXEC <<
CMD: sw_vers -productVersion
EXIT: 0
STDOUT:
10.12.6
>>


REPORT: OS X deployment target: 10.12

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
EXIT: 0
STDOUT:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>>


REPORT: Apple LLVM version 8.1.0 (clang-802.0.42)

REPORT: Checking for C++11 compliance:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmplVuEhD.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_MACOSX -fPIC -mmacosx-version-min=10.12 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmplVuEhD.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmplVuEhD.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmplVuEhD.o -mmacosx-version-min=10.12 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmplVuEhD.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: ok

REPORT: Checking for ::max_align_t:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpVHStXs.cpp:
---

#include <cstddef>
using ::max_align_t;
int main() {
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpVHStXs.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpVHStXs.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpVHStXs.o -mmacosx-version-min=10.12 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpVHStXs.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: ok

REPORT: Checking for std::max_align_t:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPehof2.cpp:
---

#include <cstddef>
using std::max_align_t;
int main() {
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPehof2.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPehof2.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPehof2.o -mmacosx-version-min=10.12 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPehof2.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPzEnhx.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPzEnhx.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPzEnhx.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPzEnhx.o -mmacosx-version-min=10.12 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpPzEnhx.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQBBetx.cpp:
---


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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQBBetx.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQBBetx.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQBBetx.o -mmacosx-version-min=10.12 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQBBetx.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: yes

REPORT: Checking for non-POD variable-length array support:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpewClAR.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: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpewClAR.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpewClAR.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpewClAR.o -mmacosx-version-min=10.12 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpewClAR.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: yes

REPORT: Checking for zlib compression library:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpESUiKo.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpESUiKo.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpESUiKo.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpESUiKo.o -mmacosx-version-min=10.12 -v -lz -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpESUiKo.o -lz -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: 1.2.8

REPORT: Checking for TIFF library:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpV3MCDH.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpV3MCDH.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpV3MCDH.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpV3MCDH.o -mmacosx-version-min=10.12 -v -lz -ltiff -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpV3MCDH.o -lz -ltiff -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: LIBTIFF, Version 4.0.8

REPORT: Checking for Eigen 3 library:
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/opt/local/include/eigen3
>>


COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp0Q63pX.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: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -isystem /opt/local/include/eigen3 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp0Q63pX.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp0Q63pX.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp0Q63pX.o -mmacosx-version-min=10.12 -v -lz -ltiff -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp0Q63pX.o -lz -ltiff -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: 3.3.4

REPORT: Checking for FFTW library:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp_RJra8.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp_RJra8.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp_RJra8.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp_RJra8.o -mmacosx-version-min=10.12 -v -lz -ltiff -lfftw3 -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp_RJra8.o -lz -ltiff -lfftw3 -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
fftw-3.3.6-pl2-sse2
>>


REPORT: fftw-3.3.6-pl2-sse2

REPORT: Checking JSON for Modern C++ requirements:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpFE4xlK.cpp:
---

#include "file/json.h"

int main (int argc, char* argv[])
{
  nlohmann::json json;
  json["key"] = "value";
}


---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -I/Users/chyeh/Toolkit/mrtrix3.master/core /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpFE4xlK.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpFE4xlK.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpFE4xlK.o -mmacosx-version-min=10.12 -v -lz -ltiff -lfftw3 -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.12.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpFE4xlK.o -lz -ltiff -lfftw3 -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: OK

REPORT: Checking shared library generation:
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpMTM0XG.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpMTM0XG.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpMTM0XG.o -dynamiclib -install_name @rpath/LIBNAME -mmacosx-version-min=10.12 -mmacosx-version-min=10.12 -v -lz -ltiff -lfftw3 -o libtest.dylib
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -dylib -arch x86_64 -dylib_install_name @rpath/LIBNAME -macosx_version_min 10.12.0 -o libtest.dylib /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpMTM0XG.o -lz -ltiff -lfftw3 -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>


REPORT: yes

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


REPORT: moc (version 5.8.0)

REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 3.1
Using Qt version 5.8.0 in /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib
>>


REPORT: qmake (version 5.8.0)

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


REPORT: rcc (version 5.8.0)

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
HEADERS += qt.h
SOURCES += qt.cpp
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12
---
EXEC <<
CMD: qmake
EXIT: 0
STDOUT:
Info: creating stash file /private/var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpDRSPb8/.qmake.stash
>>

EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -pipe -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9 -std=gnu++11 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtOpenGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtSvg.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtWidgets.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtGui.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtCore.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/mkspecs/macx-clang -F/Users/chyeh/Toolkit/Qt/5.8/clang_64/lib qt.cpp -o qt.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.12 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -pipe -stdlib=libc++ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9 -std=gnu++11 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtOpenGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtSvg.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtWidgets.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtGui.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib/QtCore.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.8/clang_64/mkspecs/macx-clang -F/Users/chyeh/Toolkit/Qt/5.8/clang_64/lib qt_moc.cpp -o qt_moc.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -mmacosx-version-min=10.12 -v -lz -ltiff -lfftw3 qt_moc.o qt.o -o qt -headerpad_max_install_names -stdlib=libc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9 -Wl,-rpath,/Users/chyeh/Toolkit/Qt/5.8/clang_64/lib -F/Users/chyeh/Toolkit/Qt/5.8/clang_64/lib -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSvg -framework OpenGL -framework AGL
EXIT: 1
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -headerpad_max_install_names -macosx_version_min 10.9.0 -o qt -lz -ltiff -lfftw3 qt_moc.o qt.o -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -rpath /Users/chyeh/Toolkit/Qt/5.8/clang_64/lib -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSvg -framework OpenGL -framework AGL -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a -F/Users/chyeh/Toolkit/Qt/5.8/clang_64/lib
ld: library not found for -ltiff
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>


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.

OK, sounds like a bug introduced by Qt5 trying to be too prescriptive about things or something. Presumably you’ve installed libTIFFF, FFTW and Qt5 all via HomeBrew? If so, it’s a clear bug that they need to fix. In the meantime, a quick look through the code suggests that requesting a lower version of macos as the deployment target might fix the issue - @maxpietsch might be able to comment here. To check this, try setting the environment variable MACOSX_DEPLOYMENT_TARGET to something lower like 10.10, e.g.:

$ export MACOSX_DEPLOYMENT_TARGET=10.10
$ ./configure

See if that allows things to run OK. Note that you might also need to unset QMAKE_MACOSX_DEPLOYMENT_TARGET if it’s already set to something else.

If this works, I suggest that we default to a lower version like 10.10 when this variable is not set, rather than the currently running version (at this line in the code).

If it doesn’t work, there are other things to try, but they’re messier…

I installed libtiff and fftw via Homebrew. Qt5 was installed manually.

Just tested and it turned out the same configuration error. For completeness sake, here is the output of configure.log:


REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: darwin

REPORT: OS X deployment target: 10.10

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
EXIT: 0
STDOUT:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
>>


REPORT: Apple LLVM version 8.1.0 (clang-802.0.42)

REPORT: Checking for C++11 compliance:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpEpNQCH.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_MACOSX -fPIC -mmacosx-version-min=10.10 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpEpNQCH.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpEpNQCH.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpEpNQCH.o -mmacosx-version-min=10.10 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpEpNQCH.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: ok

REPORT: Checking for ::max_align_t:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCBE6Pj.cpp:
---

#include <cstddef>
using ::max_align_t;
int main() {
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCBE6Pj.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCBE6Pj.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCBE6Pj.o -mmacosx-version-min=10.10 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCBE6Pj.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: ok

REPORT: Checking for std::max_align_t:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpRtKx9u.cpp:
---

#include <cstddef>
using std::max_align_t;
int main() {
  return 0;
}

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpRtKx9u.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpRtKx9u.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpRtKx9u.o -mmacosx-version-min=10.10 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpRtKx9u.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp8w2TRv.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp8w2TRv.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp8w2TRv.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp8w2TRv.o -mmacosx-version-min=10.10 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp8w2TRv.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCDLkDp.cpp:
---


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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCDLkDp.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCDLkDp.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCDLkDp.o -mmacosx-version-min=10.10 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpCDLkDp.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: yes

REPORT: Checking for non-POD variable-length array support:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp89IRRj.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: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp89IRRj.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp89IRRj.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp89IRRj.o -mmacosx-version-min=10.10 -v -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmp89IRRj.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: yes

REPORT: Checking for zlib compression library:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpaS5iDn.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpaS5iDn.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpaS5iDn.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpaS5iDn.o -mmacosx-version-min=10.10 -v -lz -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpaS5iDn.o -lz -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: 1.2.8

REPORT: Checking for TIFF library:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQN7EDH.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQN7EDH.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQN7EDH.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQN7EDH.o -mmacosx-version-min=10.10 -v -lz -ltiff -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpQN7EDH.o -lz -ltiff -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: LIBTIFF, Version 4.0.8

REPORT: Checking for Eigen 3 library:
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/opt/local/include/eigen3
>>


COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpG4lkYD.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: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -isystem /opt/local/include/eigen3 /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpG4lkYD.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpG4lkYD.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpG4lkYD.o -mmacosx-version-min=10.10 -v -lz -ltiff -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpG4lkYD.o -lz -ltiff -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: 3.3.4

REPORT: Checking for FFTW library:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpxqetYY.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpxqetYY.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpxqetYY.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpxqetYY.o -mmacosx-version-min=10.10 -v -lz -ltiff -lfftw3 -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpxqetYY.o -lz -ltiff -lfftw3 -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
fftw-3.3.6-pl2-sse2
>>


REPORT: fftw-3.3.6-pl2-sse2

REPORT: Checking JSON for Modern C++ requirements:

COMPILE /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpsmDbGe.cpp:
---

#include "file/json.h"

int main (int argc, char* argv[])
{
  nlohmann::json json;
  json["key"] = "value";
}


---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -I/Users/chyeh/Toolkit/mrtrix3.master/core /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpsmDbGe.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpsmDbGe.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpsmDbGe.o -mmacosx-version-min=10.10 -v -lz -ltiff -lfftw3 -o a.out
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpsmDbGe.o -lz -ltiff -lfftw3 -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>

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


REPORT: OK

REPORT: Checking shared library generation:
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpLhGY7G.cpp -o /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpLhGY7G.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpLhGY7G.o -dynamiclib -install_name @rpath/LIBNAME -mmacosx-version-min=10.10 -mmacosx-version-min=10.10 -v -lz -ltiff -lfftw3 -o libtest.dylib
EXIT: 0
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -dylib -arch x86_64 -dylib_install_name @rpath/LIBNAME -macosx_version_min 10.10.0 -o libtest.dylib /var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpLhGY7G.o -lz -ltiff -lfftw3 -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a
>>


REPORT: yes

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


REPORT: moc (version 5.9.1)

REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 3.1
Using Qt version 5.9.1 in /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib
>>


REPORT: qmake (version 5.9.1)

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


REPORT: rcc (version 5.9.1)

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
HEADERS += qt.h
SOURCES += qt.cpp
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10
---
EXEC <<
CMD: qmake
EXIT: 0
STDOUT:
Info: creating stash file /private/var/folders/j7/pqtdjgfj0kb0rfl1kmz08njh0000gn/T/tmpcJ3vtr/.qmake.stash
>>

EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -pipe -stdlib=libc++ -std=gnu++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtOpenGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtSvg.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtWidgets.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtGui.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtCore.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/mkspecs/macx-clang -F/Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib qt.cpp -o qt.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=10.10 -DMRTRIX_WORD64 -DMRTRIX_TIFF_SUPPORT -DEIGEN_FFTW_DEFAULT -pipe -stdlib=libc++ -std=gnu++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtOpenGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtSvg.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtWidgets.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtGui.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib/QtCore.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -isystem /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/mkspecs/macx-clang -F/Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib qt_moc.cpp -o qt_moc.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -mmacosx-version-min=10.10 -v -lz -ltiff -lfftw3 qt_moc.o qt.o -o qt -stdlib=libc++ -headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wl,-rpath,@executable_path/Frameworks -Wl,-rpath,/Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib -F/Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSvg -framework OpenGL -framework AGL
EXIT: 1
STDERR:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -headerpad_max_install_names -macosx_version_min 10.10.0 -o qt -lz -ltiff -lfftw3 qt_moc.o qt.o -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -rpath @executable_path/Frameworks -rpath /Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib -framework QtOpenGL -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework QtSvg -framework OpenGL -framework AGL -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a -F/Users/chyeh/Toolkit/Qt/5.9.1/clang_64/lib
ld: library not found for -ltiff
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>


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.

Linking also fails for qt5 installed via homebrew. I don’t know what is going on but I supect a PATH issue. In the meantime, you have two options: Either unlink libtiff and fftw and use mrtrix3 without tiff support:

brew unlink libtiff
brew unlink fftw
./configure

or install it with our homebrew tap:

brew tap MRtrix3/mrtrix3
brew install mrtrix3
....

Detecting OS: darwin
OS X deployment target: 10.12
Looking for compiler [clang++]: Apple LLVM version 8.1.0 (clang-802.0.42)
Checking for C++11 compliance: ok
Checking for ::max_align_t: ok
Checking for std::max_align_t: ok
Detecting pointer size: 64 bit
Detecting byte order: little-endian
Checking for variable-length array support: yes
Checking for non-POD variable-length array support: yes
Checking for zlib compression library: 1.2.8
Checking for TIFF library: LIBTIFF, Version 4.0.8
Checking for Eigen 3 library: 3.3.4
Checking for FFTW library: fftw-3.3.6-pl2-sse2
Checking JSON for Modern C++ requirements: OK
Checking shared library generation: yes
Checking for Qt moc: moc (version 5.9.1)
Checking for Qt qmake: qmake (version 5.9.1)
Checking for Qt rcc: rcc (version 5.9.1)
Checking for Qt: 5.9.1

writing configuration to file './config': ok
...

@jdtournier

I tried the libtiff which comes pre-compiled in homebrew and recompiled it myself (brew install libtiff --c++11 --with-xz) to no avail.

Here is the configure.log using the standard installation. Here is the log after unlinking.

Using the tap (TIFF working): config and log.

Here is what unlinking does:

brew unlink -v libtiff
# rm /usr/local/bin/fax2ps
# rm /usr/local/bin/fax2tiff
# rm /usr/local/bin/pal2rgb
# rm /usr/local/bin/ppm2tiff
# rm /usr/local/bin/raw2tiff
# rm /usr/local/bin/tiff2bw
# rm /usr/local/bin/tiff2pdf
# rm /usr/local/bin/tiff2ps
# rm /usr/local/bin/tiff2rgba
# rm /usr/local/bin/tiffcmp
# rm /usr/local/bin/tiffcp
# rm /usr/local/bin/tiffcrop
# rm /usr/local/bin/tiffdither
# rm /usr/local/bin/tiffdump
# rm /usr/local/bin/tiffinfo
# rm /usr/local/bin/tiffmedian
# rm /usr/local/bin/tiffset
# rm /usr/local/bin/tiffsplit
# rm /usr/local/include/tiff.h
# rm /usr/local/include/tiffconf.h
# rm /usr/local/include/tiffio.h
# rm /usr/local/include/tiffio.hxx
# rm /usr/local/include/tiffvers.h
# rm /usr/local/lib/libtiff.5.dylib
# rm /usr/local/lib/libtiff.a
# rm /usr/local/lib/libtiff.dylib
# rm /usr/local/lib/libtiffxx.5.dylib
# rm /usr/local/lib/libtiffxx.a
# rm /usr/local/lib/libtiffxx.dylib
# rm /usr/local/lib/pkgconfig/libtiff-4.pc
# rm /usr/local/share/doc/tiff-4.0.8
# rm /usr/local/share/man/man1/fax2ps.1
# rm /usr/local/share/man/man1/fax2tiff.1
# rm /usr/local/share/man/man1/pal2rgb.1
# rm /usr/local/share/man/man1/ppm2tiff.1
# rm /usr/local/share/man/man1/raw2tiff.1
# rm /usr/local/share/man/man1/tiff2bw.1
# rm /usr/local/share/man/man1/tiff2pdf.1
# rm /usr/local/share/man/man1/tiff2ps.1
# rm /usr/local/share/man/man1/tiff2rgba.1
# rm /usr/local/share/man/man1/tiffcmp.1
# rm /usr/local/share/man/man1/tiffcp.1
# rm /usr/local/share/man/man1/tiffcrop.1
# rm /usr/local/share/man/man1/tiffdither.1
# rm /usr/local/share/man/man1/tiffdump.1
# rm /usr/local/share/man/man1/tiffgt.1
# rm /usr/local/share/man/man1/tiffinfo.1
# rm /usr/local/share/man/man1/tiffmedian.1
# rm /usr/local/share/man/man1/tiffset.1
# rm /usr/local/share/man/man1/tiffsplit.1
# rm /usr/local/share/man/man3/TIFFClose.3tiff
# rm /usr/local/share/man/man3/TIFFDataWidth.3tiff
# rm /usr/local/share/man/man3/TIFFError.3tiff
# rm /usr/local/share/man/man3/TIFFFieldDataType.3tiff
# rm /usr/local/share/man/man3/TIFFFieldName.3tiff
# rm /usr/local/share/man/man3/TIFFFieldPassCount.3tiff
# rm /usr/local/share/man/man3/TIFFFieldReadCount.3tiff
# rm /usr/local/share/man/man3/TIFFFieldTag.3tiff
# rm /usr/local/share/man/man3/TIFFFieldWriteCount.3tiff
# rm /usr/local/share/man/man3/TIFFFlush.3tiff
# rm /usr/local/share/man/man3/TIFFGetField.3tiff
# rm /usr/local/share/man/man3/TIFFOpen.3tiff
# rm /usr/local/share/man/man3/TIFFPrintDirectory.3tiff
# rm /usr/local/share/man/man3/TIFFRGBAImage.3tiff
# rm /usr/local/share/man/man3/TIFFReadDirectory.3tiff
# rm /usr/local/share/man/man3/TIFFReadEncodedStrip.3tiff
# rm /usr/local/share/man/man3/TIFFReadEncodedTile.3tiff
# rm /usr/local/share/man/man3/TIFFReadRGBAImage.3tiff
# rm /usr/local/share/man/man3/TIFFReadRGBAStrip.3tiff
# rm /usr/local/share/man/man3/TIFFReadRGBATile.3tiff
# rm /usr/local/share/man/man3/TIFFReadRawStrip.3tiff
# rm /usr/local/share/man/man3/TIFFReadRawTile.3tiff
# rm /usr/local/share/man/man3/TIFFReadScanline.3tiff
# rm /usr/local/share/man/man3/TIFFReadTile.3tiff
# rm /usr/local/share/man/man3/TIFFSetDirectory.3tiff
# rm /usr/local/share/man/man3/TIFFSetField.3tiff
# rm /usr/local/share/man/man3/TIFFWarning.3tiff
# rm /usr/local/share/man/man3/TIFFWriteDirectory.3tiff
# rm /usr/local/share/man/man3/TIFFWriteEncodedStrip.3tiff
# rm /usr/local/share/man/man3/TIFFWriteEncodedTile.3tiff
# rm /usr/local/share/man/man3/TIFFWriteRawStrip.3tiff
# rm /usr/local/share/man/man3/TIFFWriteRawTile.3tiff
# rm /usr/local/share/man/man3/TIFFWriteScanline.3tiff
# rm /usr/local/share/man/man3/TIFFWriteTile.3tiff
# rm /usr/local/share/man/man3/TIFFbuffer.3tiff
# rm /usr/local/share/man/man3/TIFFcodec.3tiff
# rm /usr/local/share/man/man3/TIFFcolor.3tiff
# rm /usr/local/share/man/man3/TIFFmemory.3tiff
# rm /usr/local/share/man/man3/TIFFquery.3tiff
# rm /usr/local/share/man/man3/TIFFsize.3tiff
# rm /usr/local/share/man/man3/TIFFstrip.3tiff
# rm /usr/local/share/man/man3/TIFFswab.3tiff
# rm /usr/local/share/man/man3/TIFFtile.3tiff
# rm /usr/local/share/man/man3/libtiff.3tiff

brew unlink -v fftw
# rm /usr/local/bin/fftw-wisdom
# rm /usr/local/bin/fftw-wisdom-to-conf
# rm /usr/local/bin/fftwf-wisdom
# rm /usr/local/bin/fftwl-wisdom
# rm /usr/local/include/fftw3.f
# rm /usr/local/include/fftw3.f03
# rm /usr/local/include/fftw3.h
# rm /usr/local/include/fftw3l.f03
# rm /usr/local/include/fftw3q.f03
# rm /usr/local/lib/libfftw3.3.dylib
# rm /usr/local/lib/libfftw3.a
# rm /usr/local/lib/libfftw3.dylib
# rm /usr/local/lib/libfftw3_threads.3.dylib
# rm /usr/local/lib/libfftw3_threads.a
# rm /usr/local/lib/libfftw3_threads.dylib
# rm /usr/local/lib/libfftw3f.3.dylib
# rm /usr/local/lib/libfftw3f.a
# rm /usr/local/lib/libfftw3f.dylib
# rm /usr/local/lib/libfftw3f_threads.3.dylib
# rm /usr/local/lib/libfftw3f_threads.a
# rm /usr/local/lib/libfftw3f_threads.dylib
# rm /usr/local/lib/libfftw3l.3.dylib
# rm /usr/local/lib/libfftw3l.a
# rm /usr/local/lib/libfftw3l.dylib
# rm /usr/local/lib/libfftw3l_threads.3.dylib
# rm /usr/local/lib/libfftw3l_threads.a
# rm /usr/local/lib/libfftw3l_threads.dylib
# rm /usr/local/lib/pkgconfig/fftw3.pc
# rm /usr/local/lib/pkgconfig/fftw3f.pc
# rm /usr/local/lib/pkgconfig/fftw3l.pc
# uninfo /usr/local/share/info/fftw3.info
# rm /usr/local/share/info/fftw3.info
# rm /usr/local/share/info/fftw3.info-1
# rm /usr/local/share/info/fftw3.info-2
# rm /usr/local/share/man/man1/fftw-wisdom-to-conf.1
# rm /usr/local/share/man/man1/fftw-wisdom.1
# rm /usr/local/share/man/man1/fftwf-wisdom.1
# rm /usr/local/share/man/man1/fftwl-wisdom.1

./configure

@maxpietsch: OK, I’m stumped - all compiler invocations are essentially the same at this point, yet your tap version works, the standalone version doesn’t… I don’t know what the difference is, presumably running within the homebrew environment is different? I also note that the configure script is running slightly differently - did you add the -v option yourself, or are the versions being compiled somehow different?

One of the first things to show up differently is the explicitly sw_vers -productVersion check in the run that errors out. Looking at the code, this seems to relate to whether the MACOSX_DEPLOYMENT_TARGET environment variable is set (along with the related QMAKE_MACOSX_DEPLOYMENT_TARGET). Can you try setting these explicitly in your manual run? Maybe this means our script should also set these variables explicitly right after those tests…?

Otherwise, the only things I can think of that might conceivably make a difference is indeed the PATH. What is your PATH when you invoke ./configure manually? I can see from your tap config that under homebrew, it’s running with:

PATH = r'/usr/local/opt/python/libexec/bin:/usr/local/opt/python/bin:/usr/local/Homebrew/Library/Homebrew/shims/super:/usr/local/opt/pkg-config/bin:/usr/local/opt/qt/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/qt5/bin'

How does your default PATH compare with that…?

I also note the temporary files are named differently for some odd reason… I have no idea why that would be the case, maybe homebrew also sets this up differently…?

In any case, I think this is probably getting a little bit too technical for the forum - let’s move the discussion over to GitHub and stop clogging up people’s inboxes…

Just to tie this off: we’ve figured out what the problem was. It’s now been rectified as of Aug 24 (since this pull request was merged).

@vkoppel: thanks for the bug report. You should now be able to build successfully after a git pull, e.g.:

$ git pull 
$ ./configure
$ ./build

Hi - sorry to reopen a silent thread. I am just having the same issue when trying to install mrtrix3 on my new mac (M1 pro).

I installed libpng, libtiff fftw and qt5 through homebrew

however when I configure mrtrix3 it doesn’t find them and will not complete the install. I am aware this was a common issue a will back and should now be resolved, however I have followed the advice I can find and I am still getting the same issue.

I am just wondering if I am missing something fundamental. I have installed mrtrix3 on a mac system before (not M1 chip) and on a linux shell on windows without any issues.

Please find attached my configure log:

REPORT: 
MRtrix build type requested: release version
PATH set to: /opt/homebrew/opt/qt@5/bin:/opt/homebrew/opt/qt@5/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/fsl/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/binEXEC <<
CMD: sw_vers -productVersion
EXIT: 0
STDOUT:
12.3
>>


REPORT: OS X deployment target: 12.3

REPORT: Detecting OS: darwin

REPORT: Looking for compiler [clang++]:
EXEC <<
CMD: clang++ --version
EXIT: 0
STDOUT:
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
>>


REPORT: Apple clang version 13.1.6 (clang-1316.0.21.2)

REPORT: Checking for C++11 compliance:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpOVoTBK.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" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpOVoTBK.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpOVoTBK.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpOVoTBK.o -mmacosx-version-min=12.3 -o a.out
EXIT: 0
>>

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


REPORT: ok

REPORT: Checking shared library generation:
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpregjCL.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpregjCL.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpregjCL.o -dynamiclib -install_name @rpath/LIBNAME -mmacosx-version-min=12.3 -o libtest.dylib
EXIT: 0
>>


REPORT: ok

REPORT: Detecting pointer size:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpKmJzZK.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpKmJzZK.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpKmJzZK.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpKmJzZK.o -mmacosx-version-min=12.3 -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 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpVfPJT8.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpVfPJT8.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpVfPJT8.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpVfPJT8.o -mmacosx-version-min=12.3 -o a.out
EXIT: 0
>>

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


REPORT: ok

REPORT: Checking for non-POD variable-length array support:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNY7paC.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: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNY7paC.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNY7paC.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNY7paC.o -mmacosx-version-min=12.3 -o a.out
EXIT: 0
>>

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


REPORT: ok

REPORT: Checking for ::max_align_t:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpYTpWuu.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpYTpWuu.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpYTpWuu.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpYTpWuu.o -mmacosx-version-min=12.3 -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 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmprmtdnm.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmprmtdnm.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmprmtdnm.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmprmtdnm.o -mmacosx-version-min=12.3 -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/opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3
>>


REPORT: Checking for Eigen3 library:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpq9sNXn.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: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpq9sNXn.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpq9sNXn.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpq9sNXn.o -mmacosx-version-min=12.3 -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 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNhZrKj.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: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -idirafter /opt/homebrew/Cellar/eigen/3.4.0_1/include/eigen3 -DEIGEN_DONT_PARALLELIZE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNhZrKj.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNhZrKj.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNhZrKj.o -mmacosx-version-min=12.3 -o a.out
EXIT: 0
>>

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


REPORT: Present
EXEC <<
CMD: pkg-config --cflags zlib
EXIT: 0
>>

EXEC <<
CMD: pkg-config --libs zlib
EXIT: 0
STDOUT:
-lz
>>


REPORT: Checking for zlib compression library:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpy_SQSt.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpy_SQSt.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpy_SQSt.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpy_SQSt.o -mmacosx-version-min=12.3 -lz -o a.out
EXIT: 0
>>

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


REPORT: 1.2.11

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

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNFZ2hX.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -I/Users/joelysmith/mrtrix3/core /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNFZ2hX.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNFZ2hX.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpNFZ2hX.o -mmacosx-version-min=12.3 -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/opt/homebrew/Cellar/libtiff/4.3.0/include
>>

EXEC <<
CMD: pkg-config --libs libtiff-4
EXIT: 0
STDOUT:
-L/opt/homebrew/Cellar/libtiff/4.3.0/lib -ltiff
>>


REPORT: Checking for TIFF library:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpdyF1sQ.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /opt/homebrew/Cellar/libtiff/4.3.0/include /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpdyF1sQ.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpdyF1sQ.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpdyF1sQ.o -mmacosx-version-min=12.3 -lz -L/opt/homebrew/Cellar/libtiff/4.3.0/lib -ltiff -o a.out
EXIT: 1
STDERR:
ld: warning: ignoring file /opt/homebrew/Cellar/libtiff/4.3.0/lib/libtiff.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_TIFFGetVersion", referenced from:
      _main in tmpdyF1sQ.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>

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/opt/homebrew/Cellar/libpng/1.6.37/include/libpng16
>>

EXEC <<
CMD: pkg-config --libs libpng
EXIT: 0
STDOUT:
-L/opt/homebrew/Cellar/libpng/1.6.37/lib -lpng16 -lz
>>


REPORT: Checking for PNG library:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpsHNEIm.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /opt/homebrew/Cellar/libpng/1.6.37/include/libpng16 /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpsHNEIm.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpsHNEIm.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpsHNEIm.o -mmacosx-version-min=12.3 -lz -L/opt/homebrew/Cellar/libpng/1.6.37/lib -lpng16 -lz -o a.out
EXIT: 1
STDERR:
ld: warning: ignoring file /opt/homebrew/Cellar/libpng/1.6.37/lib/libpng16.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_png_get_header_ver", referenced from:
      _main in tmpsHNEIm.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>

error deleting temporary file "a.out": No such file or directory
REPORT: not found - PNG support disabled
EXEC <<
CMD: pkg-config --cflags fftw3
EXIT: 0
STDOUT:
-I/opt/homebrew/Cellar/fftw/3.3.10/include
>>

EXEC <<
CMD: pkg-config --libs fftw3
EXIT: 0
STDOUT:
-L/opt/homebrew/Cellar/fftw/3.3.10/lib -lfftw3
>>


REPORT: Checking for FFTW library:

COMPILE /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpCwDN5H.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -idirafter /opt/homebrew/Cellar/fftw/3.3.10/include /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpCwDN5H.cpp -o /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpCwDN5H.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpCwDN5H.o -mmacosx-version-min=12.3 -lz -L/opt/homebrew/Cellar/fftw/3.3.10/lib -lfftw3 -o a.out
EXIT: 1
STDERR:
ld: warning: ignoring file /opt/homebrew/Cellar/fftw/3.3.10/lib/libfftw3.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "_fftw_version", referenced from:
      _main in tmpCwDN5H.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>

error deleting temporary file "a.out": No such file or directory
REPORT: not found - FFTW support disabled

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


REPORT: moc (version 5.15.3)

REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 3.1
Using Qt version 5.15.3 in /opt/homebrew/Cellar/qt@5/5.15.3/lib
>>


REPORT: qmake (version 5.15.3)

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


REPORT: rcc (version 5.15.3)

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
QMAKE_MACOSX_DEPLOYMENT_TARGET = 12.3
---
EXEC <<
CMD: qmake
EXIT: 0
STDOUT:
Info: creating stash file /private/var/folders/sl/dzv4sst15d9_77kv36d0rtj40000gn/T/tmpXa5C6c/.qmake.stash
STDERR:
Project WARNING: Qt has only been tested with version 11.0 of the platform SDK, you're using .
Project WARNING: This is an unsupported configuration. You may experience build issues, and by using
Project WARNING: the 12.3 SDK you are opting in to new features that Qt has not been prepared for.
Project WARNING: Please downgrade the SDK you use to build your app to version 11.0, or configure
Project WARNING: with CONFIG+=sdk_no_version_check when running qmake to silence this warning.
>>

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/opt/homebrew/Cellar/qt@5/5.15.3/lib/QtOpenGL.framework/Headers', '-I/opt/homebrew/Cellar/qt@5/5.15.3/lib/QtSvg.framework/Headers', '-I/opt/homebrew/Cellar/qt@5/5.15.3/lib/QtWidgets.framework/Headers', '-I/opt/homebrew/Cellar/qt@5/5.15.3/lib/QtGui.framework/Headers', '-I/opt/homebrew/Cellar/qt@5/5.15.3/lib/QtNetwork.framework/Headers', '-I/opt/homebrew/Cellar/qt@5/5.15.3/lib/QtCore.framework/Headers', '-I.', '-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers', '-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers', '-I/opt/homebrew/Cellar/qt@5/5.15.3/mkspecs/macx-clang-arm64', '-F/opt/homebrew/Cellar/qt@5/5.15.3/lib']
  qt_libs: ['$(SUBLIBS)', '-F/opt/homebrew/Cellar/qt@5/5.15.3/lib', '-framework', 'QtOpenGL', '-framework', 'QtSvg', '-framework', 'QtWidgets', '-framework', 'QtGui', '-framework', 'AppKit', '-framework', 'Metal', '-framework', 'QtNetwork', '-framework', 'QtCore', '-framework', 'DiskArbitration', '-framework', 'IOKit', '-framework', 'OpenGL', '-framework', 'AGL']
EXEC <<
CMD: moc qt.h -o qt_moc.cpp
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtOpenGL.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtSvg.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtWidgets.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtGui.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtNetwork.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtCore.framework/Headers -idirafter /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -idirafter /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/mkspecs/macx-clang-arm64 -F/opt/homebrew/Cellar/qt@5/5.15.3/lib qt.cpp -o qt.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_BUILD_TYPE="release version" -DMRTRIX_MACOSX -fPIC -mmacosx-version-min=12.3 -DMRTRIX_WORD64 -DMRTRIX_HAVE_EIGEN_UNSUPPORTED_SPECIAL_FUNCTIONS -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtOpenGL.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtSvg.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtWidgets.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtGui.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtNetwork.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtCore.framework/Headers -idirafter /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers -idirafter /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AGL.framework/Headers -idirafter /opt/homebrew/Cellar/qt@5/5.15.3/mkspecs/macx-clang-arm64 -F/opt/homebrew/Cellar/qt@5/5.15.3/lib qt_moc.cpp -o qt_moc.o
EXIT: 0
>>

EXEC <<
CMD: clang++ -mmacosx-version-min=12.3 -lz qt_moc.o qt.o -o qt -F/opt/homebrew/Cellar/qt@5/5.15.3/lib -framework QtOpenGL -framework QtSvg -framework QtWidgets -framework QtGui -framework AppKit -framework Metal -framework QtNetwork -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
EXIT: 1
STDERR:
ld: warning: ignoring file /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtOpenGL.framework/QtOpenGL, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtSvg.framework/QtSvg, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtWidgets.framework/QtWidgets, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtGui.framework/QtGui, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtNetwork.framework/QtNetwork, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file /opt/homebrew/Cellar/qt@5/5.15.3/lib/QtCore.framework/QtCore, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
Undefined symbols for architecture x86_64:
  "QMetaObject::Connection::~Connection()", referenced from:
      Foo::Foo() in qt.o
  "QMetaObject::activate(QObject*, QMetaObject const*, int, void**)", referenced from:
      Foo::valueChanged(int) in qt_moc.o
  "QObject::childEvent(QChildEvent*)", referenced from:
      vtable for Foo in qt_moc.o
  "QObject::timerEvent(QTimerEvent*)", referenced from:
      vtable for Foo in qt_moc.o
  "QObject::customEvent(QEvent*)", referenced from:
      vtable for Foo in qt_moc.o
  "QObject::eventFilter(QObject*, QEvent*)", referenced from:
      vtable for Foo in qt_moc.o
  "QObject::qt_metacall(QMetaObject::Call, int, void**)", referenced from:
      Foo::qt_metacall(QMetaObject::Call, int, void**) in qt_moc.o
  "QObject::qt_metacast(char const*)", referenced from:
      Foo::qt_metacast(char const*) in qt_moc.o
  "QObject::connectNotify(QMetaMethod const&)", referenced from:
      vtable for Foo in qt_moc.o
  "QObject::disconnectNotify(QMetaMethod const&)", referenced from:
      vtable for Foo in qt_moc.o
  "QObject::staticMetaObject", referenced from:
      Foo::staticMetaObject in qt_moc.o
  "QObject::event(QEvent*)", referenced from:
      vtable for Foo in qt_moc.o
  "QObject::connect(QObject const*, char const*, QObject const*, char const*, Qt::ConnectionType)", referenced from:
      Foo::Foo() in qt.o
  "QObject::QObject(QObject*)", referenced from:
      Foo::Foo() in qt.o
  "QObject::~QObject()", referenced from:
      Foo::Foo() in qt.o
      Foo::~Foo() in qt.o
  "QObjectData::dynamicMetaObject() const", referenced from:
      Foo::metaObject() const in qt_moc.o
  "typeinfo for QObject", referenced from:
      typeinfo for Foo in qt_moc.o
  "_qVersion", referenced from:
      Foo::~Foo() in qt.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
>>


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.

Thanks for all the support,
Joely

The problematic line in the log is this:

Target: x86_64-apple-darwin21.4.0

For some reason you are trying to cross-compile for x86_64 instead of natively for arm64. This line should be reading instead:

Target: arm64-apple-darwin21.4.0

I have a feeling you have somehow launched an x86_64 shell instead of a arm64 one.

Can you launch a terminal and type arch? This should be outputting arm64. If not, you might be launching Terminal through rosetta instead of natively.

1 Like

Hi,

Thank you for your response !

I believe I am running Terminal natively… when I typed ‘arch’ I got ‘arm64’ as the output.

1 Like