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.