When I get to the .configure step I get an Xcode-related error:
ERROR: qmake returned with error:
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
ERROR: unexpected exception!
When I run the xcodebuilt as suggested it says:
jfh$ /usr/bin/xcodebuild
xcodebuild: error: The directory /Users/jfh/mrtrix3/mrtrix3 does not contain an Xcode project.
I’m not familiar with setting up an Xcode project and I see there are many options as to project choice.
Below I’ve copied the full configure.log file
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: Checking for C++11 compliant compiler [clang++]:
EXEC <<
CMD: clang++ -dumpversion
EXIT: 0
STDOUT:
4.2.1
>>
REPORT: 4.2.1
COMPILE /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp3252b2j8.cpp:
---
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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp3252b2j8.cpp -o /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp3252b2j8.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp3252b2j8.o -mmacosx-version-min=10.11 -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
>>
REPORT: - tested ok
REPORT: Detecting pointer size:
COMPILE /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpcws418mo.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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpcws418mo.cpp -o /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpcws418mo.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpcws418mo.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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp06mxhjee.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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp06mxhjee.cpp -o /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp06mxhjee.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp06mxhjee.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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpvhum2edy.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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpvhum2edy.cpp -o /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpvhum2edy.o
EXIT: 1
STDERR:
/var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpvhum2edy.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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmpvhum2edy.o": No such file or directory
REPORT: no
REPORT: Checking for zlib compression library:
COMPILE /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp0ergl94a.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/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp0ergl94a.cpp -o /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp0ergl94a.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmp0ergl94a.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 Eigen 3 library:
EXEC <<
CMD: pkg-config --cflags eigen3
EXIT: 0
STDOUT:
-I/usr/local/Cellar/eigen/3.2.9/include/eigen3
>>
COMPILE /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmprcuz60ka.cpp:
---
#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 -isystem /usr/local/Cellar/eigen/3.2.9/include/eigen3 /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmprcuz60ka.cpp -o /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmprcuz60ka.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmprcuz60ka.o -mmacosx-version-min=10.11 -lz -o a.out
EXIT: 0
>>
EXEC <<
CMD: ./a.out
EXIT: 0
STDOUT:
3.2.9
>>
REPORT: 3.2.9
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 -isystem /usr/local/Cellar/eigen/3.2.9/include/eigen3 /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmptkf82_7u.cpp -o /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmptkf82_7u.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/m8/r202cc_d2m5cdz_9_11d6tr80000gn/T/tmptkf82_7u.o -dynamiclib -install_name @rpath/LIBNAME -mmacosx-version-min=10.11 -mmacosx-version-min=10.11 -lz -o libtest.dylib
EXIT: 0
>>
REPORT: yes
REPORT: Checking for Qt moc:
EXEC <<
CMD: moc -v
EXIT: 0
STDOUT:
moc 5.6.1
>>
REPORT: moc (version 5.6.1)
REPORT: Checking for Qt qmake:
EXEC <<
CMD: qmake -v
EXIT: 0
STDOUT:
QMake version 3.0
Using Qt version 5.6.1 in /usr/local/Cellar/qt5/5.6.1-1/lib
>>
REPORT: qmake (version 5.6.1)
REPORT: Checking for Qt rcc:
EXEC <<
CMD: rcc -v
EXIT: 0
STDOUT:
rcc 5.6.1
>>
REPORT: rcc (version 5.6.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: 3
STDERR:
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
>>
ERROR: qmake returned with error:
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
ERROR: unexpected exception!
See the file 'configure.log' for details. If this doesn't help and you need
further assistance, please post on the MRtrix3 community forum
(http://community.mrtrix.org/), and make sure to include the full contents of
the 'configure.log' file.
jfh$ /usr/bin/xcodebuild
xcodebuild: error: The directory /Users/jfh/mrtrix3/mrtrix3 does not contain an Xcode project.
It looks like you haven’t accepted XCode’s licence agreement. Just start the XCode application itself, it should pop up a notice asking you to agree to their terms and conditions. You can quit XCode as soon as you’ve done that, and then try ./configure again…
Im getting the same error and I have installed and uninstalled Xcode and I still get this error message. I have used the following commands in to try to get around it and was successful once but then still generated a Qt moc compiler error. Since then I have not been able to get around this Xcode issue again, even after reinstalling it. Xcode opens fine and I have accepted the license agreement. It’s quite the challenge to get this software package to install.
I’ve even tried the following which allows me to accept the license from the shell:
OK, you’re right, this looks like a different error - if there had been issues with the licence, errors would have been produced much earlier in the process. Only when it runs Qt’s qmake command does it produce this error:
A quick search for this error shows that this is a problem with Qt when building with XCode 8, as reported here and here - nothing to do with XCode as such. There are suggestions on how to fix this on these posts, hopefully they will sort out the problem.
I’m afraid there is nothing we can do to avoid such issues in packages we depend on, unfortunately. It seems Apple have changed the way XCode behaves, and Qt hasn’t been updated to match (although I guess that will be fixed pretty quickly). The one thing we could do is provide pre-compiled packages, which is something we’ve been talking about doing for some time. Maybe we’ll look into it if we find the time. Of course, if anyone is willing to help out on this front, I’m sure there’ll be lots of very grateful users out there…