Mac El Capitan: problem with configure the MRtrix install

No idea where to look for it.

Here, i’ve tried once again:

$ sudo port install pkgconfig
Password:
--->  Computing dependencies for pkgconfig
--->  Cleaning pkgconfig
--->  Scanning binaries for linking errors
--->  No broken files found.
adriano-3:mrtrix3 adriano_bernini$ export CFLAGS=-stdlib=libc++
adriano-3:mrtrix3 adriano_bernini$ export LDFLAGS=-stdlib=libc++
adriano-3:mrtrix3 adriano_bernini$ export LDLIB_FLAGS=-stdlib=libc++
adriano-3:mrtrix3 adriano_bernini$ unset LD
adriano-3:mrtrix3 adriano_bernini$ ./configure

MRtrix build type requested: release

Detecting OS: darwin
Checking for C++11 compliant compiler [clang++]: 4.2.1
ERROR: compiler test failed!

Use CXX environment variable to set path to compiler, as follows:
     CXX=/usr/bin/g++-4.8 ./configure

You can also use the CXX_ARGS to set the arguments expected by the 
compiler, in case this differs from gcc, as follows:

     CXX_ARGS="-c CFLAGS SRC -o OBJECT" ./configure

and my configure.log:

REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: darwin

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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp1DrOJn.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 -stdlib=libc++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp1DrOJn.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp1DrOJn.o
EXIT: 1
STDERR:
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
>>

error deleting temporary file "/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp1DrOJn.o": No such file or directory
ERROR: compiler test failed!

Use CXX environment variable to set path to compiler, as follows:
     CXX=/usr/bin/g++-4.8 ./configure

You can also use the CXX_ARGS to set the arguments expected by the 
compiler, in case this differs from gcc, as follows:

     CXX_ARGS="-c CFLAGS SRC -o OBJECT" ./configure

Ok, this is getting weirder still… The unexpected bit is this:

requires OS X 10.7 or later

which would imply you’re running a very old version of MacOSX - earlier than Lion. But the title of your original post is about running on El Capitan - OSX 10.11. MRtrix3 definitely won’t run on anything older than Mavericks (10.9). So I’m really totally confused now. All the troubles we’ve faced so far are consistent with you running an old version of MacOSX - are you sure you’re running El Capitan…?

This is my version:

$ system_profiler SPSoftwareDataType
Software:

System Software Overview:

  System Version: OS X 10.11.5 (15F34)
  Kernel Version: Darwin 15.5.0
  Boot Volume: Macintosh HD
  Boot Mode: Normal

I’m totally confused… The only thing I can recommend is to check what deployment target XCode is set to. This specifies the minimum version of MacOSX the code will run on. There must be some default set somewhere, and it’s probably set to 10.6 or something…

Other than that, I’m out of ideas…

I’ve reinstalled El Capitain and went through the installation. Everything went fine until the ./configure. Here my new error:

./configure

MRtrix build type requested: release

Detecting OS: darwin
Checking for C++11 compliant compiler [clang++]: 4.2.1 - tested 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 Eigen 3 library: ('Unexpected error:', "(<type 'exceptions.TypeError'>, TypeError('execv() arg 2 must contain only strings',), <traceback object at 0x1006d1f80>)")

ERROR: Eigen3 implementation not found!

And my configure.log

REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: darwin

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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpmKNMAR.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 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpmKNMAR.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpmKNMAR.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpmKNMAR.o -o a.out
EXIT: 0
>>

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


REPORT:  - tested ok

REPORT: Detecting pointer size:

COMPILE /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpI88hd9.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpI88hd9.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpI88hd9.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpI88hd9.o -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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp_zyN9B.cpp:
---


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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -DMRTRIX_WORD64 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp_zyN9B.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp_zyN9B.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp_zyN9B.o -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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpZM44pn.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 -DMRTRIX_WORD64 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpZM44pn.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpZM44pn.o
EXIT: 1
STDERR:
/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpZM44pn.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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpZM44pn.o": No such file or directory
REPORT: no

REPORT: Checking for zlib compression library:

COMPILE /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpEPv3z7.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpEPv3z7.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpEPv3z7.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpEPv3z7.o -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/opt/local/include/eigen3
>>


COMPILE /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmphAPvM7.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 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -I/opt/local/include/eigen3 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmphAPvM7.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmphAPvM7.o
error deleting temporary file "/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmphAPvM7.o": No such file or directory
ERROR: Eigen3 implementation not found!

Wow, you’re really not having much luck with this… You get full marks for tenacity though!

So the good news is that whatever was failing before seems to be working fine now. This last issue is different again from the previous ones: it looks like ./configure falls over trying to clean up after itself…

Looking more closely at the log though, I think the issue occurs earlier, probably due to the output of pkg-config - I’ve certainly had issues with it on MacOSX in the past, whereby it would produce its output using a wide-character encoding. This is really difficult to detect, and I’ve no idea why it happens on some systems and not others. My best guess is it’ll depend on your system’s character encoding, and/or your filesystem’s character encoding…

So, two things to try. I’d really like you to at least try the first one, since if that works I’ll amend the configure script and hopefully avoid similar issues for others.

Option 1:

Open the configure script in a text editor, and change line 630 from:

    for entry in shlex.split (execute ([ 'pkg-config', '--cflags', 'eigen3' ], RuntimeError)[1]):

to:

    flags = ''
    for c in execute ([ 'pkg-config', '--cflags', 'eigen3' ], RuntimeError)[1]:
      if c is not 0: 
        flags += c
    for entry in shlex.split (flags):

Save the file, and try running it again…

Option 2:

Provide the path to Eigen3 manually, which bypasses the pkg-config automatic detection step - and so hopefully will avoid the issue:

$ export EIGEN_CFLAGS="-isystem /opt/local/include/eigen3"
$ ./configure

Not ideal, but at least it might allow you to (finally) get MRtrix3 up and running…

And thanks for sticking through it, I appreciate this must be somewhat frustrating…

I’m afraid still not working. I used option 1 and here it crashes again

./configure

MRtrix build type requested: release

Detecting OS: darwin
Checking for C++11 compliant compiler [clang++]: 4.2.1 - tested 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 Eigen 3 library: ('Unexpected error:', "(<type 'exceptions.TypeError'>, TypeError('execv() arg 2 must contain only strings',), <traceback object at 0x100750f80>)")

ERROR: Eigen3 implementation not found!

And with option 2:

$ export EIGEN_CFLAGS="-isystem /opt/local/include/eigen3"
Adriano-3:mrtrix3 adriano_bernini$ ./configure

MRtrix build type requested: release

Detecting OS: darwin
Checking for C++11 compliant compiler [clang++]: 4.2.1 - tested 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 Eigen 3 library: 
ERROR: compiler error!

Use the EIGEN_CFLAGS environment variable to set the path to
the Eigen3 include files and to set any required flags
For example:
     EIGEN_CFLAGS="-isystem /usr/include/eigen3" ./configure

And the configure.log file with option 2:

REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: darwin

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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp8GyyYs.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 -stdlib=libc++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp8GyyYs.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp8GyyYs.o
EXIT: 1
STDERR:
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
>>

error deleting temporary file "/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp8GyyYs.o": No such file or directory
ERROR: compiler test failed!

Use CXX environment variable to set path to compiler, as follows:
     CXX=/usr/bin/g++-4.8 ./configure

You can also use the CXX_ARGS to set the arguments expected by the 
compiler, in case this differs from gcc, as follows:

     CXX_ARGS="-c CFLAGS SRC -o OBJECT" ./configure

Right. No joy with the first option, that’s a shame.

As to your second option, are you sure you’re posting the correct configure.log? This one seems identical to your previous one where the script failed much earlier, at the compiler detection stage. However, in this case the failure occurs much later, at the Eigen3 detection stage…?

sorry, forgot to update the configure.log. Here the new one:

REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: darwin

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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpv0oh0g.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 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpv0oh0g.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpv0oh0g.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpv0oh0g.o -o a.out
EXIT: 0
>>

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


REPORT:  - tested ok

REPORT: Detecting pointer size:

COMPILE /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpNo892K.cpp:
---

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpNo892K.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpNo892K.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpNo892K.o -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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp7P_Clz.cpp:
---


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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -DMRTRIX_WORD64 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp7P_Clz.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp7P_Clz.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp7P_Clz.o -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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpPK2NRL.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 -DMRTRIX_WORD64 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpPK2NRL.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpPK2NRL.o
EXIT: 1
STDERR:
/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpPK2NRL.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/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpPK2NRL.o": No such file or directory
REPORT: no

REPORT: Checking for zlib compression library:

COMPILE /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpSVs_nY.cpp:
---

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

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

---
EXEC <<
CMD: clang++ -c -std=c++11 -DMRTRIX_MACOSX -fPIC -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpSVs_nY.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpSVs_nY.o
EXIT: 0
>>

EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpSVs_nY.o -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:

COMPILE /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.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 -DMRTRIX_WORD64 -DMRTRIX_NO_NON_POD_VLA -isystem /opt/local/include/eigen3 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.o
EXIT: 1
STDERR:
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:288:
/opt/local/include/eigen3/Eigen/src/Core/DenseStorage.h:277:21: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      : m_data(std::move(other.m_data))
               ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:288:
/opt/local/include/eigen3/Eigen/src/Core/DenseStorage.h:278:21: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      , m_rows(std::move(other.m_rows))
               ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:288:
/opt/local/include/eigen3/Eigen/src/Core/DenseStorage.h:279:21: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      , m_cols(std::move(other.m_cols))
               ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:288:
/opt/local/include/eigen3/Eigen/src/Core/DenseStorage.h:336:21: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      : m_data(std::move(other.m_data))
               ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:288:
/opt/local/include/eigen3/Eigen/src/Core/DenseStorage.h:337:21: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      , m_cols(std::move(other.m_cols))
               ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:288:
/opt/local/include/eigen3/Eigen/src/Core/DenseStorage.h:390:21: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      : m_data(std::move(other.m_data))
               ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:288:
/opt/local/include/eigen3/Eigen/src/Core/DenseStorage.h:391:21: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      , m_rows(std::move(other.m_rows))
               ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:293:
/opt/local/include/eigen3/Eigen/src/Core/PlainObjectBase.h:442:25: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      : m_storage( std::move(other.m_storage) )
                   ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:294:
/opt/local/include/eigen3/Eigen/src/Core/Matrix.h:216:19: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      : Base(std::move(other))
             ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.cpp:2:
In file included from /opt/local/include/eigen3/Eigen/Core:295:
/opt/local/include/eigen3/Eigen/src/Core/Array.h:129:19: error: no member named 'move' in namespace 'std'; did you mean 'modf'?
      : Base(std::move(other))
             ~~~~~^
/usr/include/math.h:407:15: note: 'modf' declared here
extern double modf(double, double *);
              ^
10 errors generated.
>>

error deleting temporary file "/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpN4Zp1p.o": No such file or directory
ERROR: compiler error!

Use the EIGEN_CFLAGS environment variable to set the path to
the Eigen3 include files and to set any required flags
For example:
     EIGEN_CFLAGS="-isystem /usr/include/eigen3" ./configure

Right, if this is correct, this is the same as one of your earlier problems: clang isn’t accepting C++11 code. Unfortunately, it looks like reinstalling the OS wasn’t the answer…

So this very much suggests that the issue is local to your account - I’m assuming that you kept your account unmodified? So things to try:

  • create a fresh account and run the install in there, just to avoid any issues that might be related to the settings in your account.

  • try to figure out where the deployment target is set in XCode. This is likely to be a setting local to your account, which may explain why it’s still affecting things.

  • Also, if you type set and post the output, we might be able to spot something that might interfere in your environment…

here the output in the meanwhile, I’ll creat a new account.

$ set
Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.6ZqtYs9VXc/Render
BASH=/bin/bash
BASH_ARGC=()
BASH_ARGV=()
BASH_LINENO=()
BASH_REMATCH=([0]="3")
BASH_SOURCE=()
BASH_VERSINFO=([0]="3" [1]="2" [2]="57" [3]="1" [4]="release" [5]="x86_64-apple-darwin15")
BASH_VERSION='3.2.57(1)-release'
COLUMNS=80
DBUS_LAUNCHD_SESSION_BUS_SOCKET=/private/tmp/com.apple.launchd.TEOddqaxgn/unix_domain_listener
DIRSTACK=()
DISPLAY=/private/tmp/com.apple.launchd.m6ga20haW9/org.macosforge.xquartz:0
EIGEN_CFLAGS='-isystem /opt/local/include/eigen3'
EUID=501
GROUPS=()
HISTFILE=/Users/adriano_bernini/.bash_sessions/0A096E77-9B6A-4E0F-9D3C-BBAF149F7CB5.historynew
HISTFILESIZE=500
HISTSIZE=500
HOME=/Users/adriano_bernini
HOSTNAME=Adriano-3.local
HOSTTYPE=x86_64
IFS=$' \t\n'
LC_CTYPE=UTF-8
LINES=24
LOGNAME=adriano_bernini
MACHTYPE=x86_64-apple-darwin15
MAILCHECK=60
OLDPWD=/Users/adriano_bernini
OPTERR=1
OPTIND=1
OSTYPE=darwin15
PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/TeX/texbin
PIPESTATUS=([0]="1")
PPID=1648
PROMPT_COMMAND=update_terminal_cwd
PS1='\h:\W \u\$ '
PS2='> '
PS4='+ '
PWD=/Users/adriano_bernini/mrtrix3
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHELL_SESSION_DID_HISTORY_CHECK=1
SHELL_SESSION_DID_INIT=1
SHELL_SESSION_DIR=/Users/adriano_bernini/.bash_sessions
SHELL_SESSION_FILE=/Users/adriano_bernini/.bash_sessions/0A096E77-9B6A-4E0F-9D3C-BBAF149F7CB5.session
SHELL_SESSION_HISTFILE=/Users/adriano_bernini/.bash_sessions/0A096E77-9B6A-4E0F-9D3C-BBAF149F7CB5.history
SHELL_SESSION_HISTFILE_NEW=/Users/adriano_bernini/.bash_sessions/0A096E77-9B6A-4E0F-9D3C-BBAF149F7CB5.historynew
SHELL_SESSION_HISTFILE_SHARED=/Users/adriano_bernini/.bash_history
SHELL_SESSION_HISTORY=1
SHELL_SESSION_TIMESTAMP_FILE=/Users/adriano_bernini/.bash_sessions/_expiration_check_timestamp
SHLVL=1
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.hYdDAZq5HP/Listeners
TERM=xterm-256color
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=361.1
TERM_SESSION_ID=0A096E77-9B6A-4E0F-9D3C-BBAF149F7CB5
TMPDIR=/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/
UID=501
USER=adriano_bernini
XPC_FLAGS=0x0
XPC_SERVICE_NAME=0
_=./configure
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
shell_session_delete_expired () 
{ 
    if ( [ ! -e "$SHELL_SESSION_TIMESTAMP_FILE" ] || [ -z $(find "$SHELL_SESSION_TIMESTAMP_FILE" -mtime -1d) ] ); then
        local expiration_lock_file="$SHELL_SESSION_DIR/_expiration_lockfile";
        if shlock -f "$expiration_lock_file" -p $$; then
            echo -n 'Deleting expired sessions...';
            local delete_count=$(find "$SHELL_SESSION_DIR" -type f -mtime +2w -print -delete | wc -l);
            [ "$delete_count" -gt 0 ] && echo $delete_count' completed.' || echo 'none found.';
            touch "$SHELL_SESSION_TIMESTAMP_FILE";
            rm "$expiration_lock_file";
        fi;
    fi
}
shell_session_history_allowed () 
{ 
    if [ -n "$HISTFILE" ]; then
        local allowed=0;
        if shopt -q histappend || [ -n "$HISTTIMEFORMAT" ]; then
            allowed=${SHELL_SESSION_HISTORY:-0};
        else
            allowed=${SHELL_SESSION_HISTORY:=1};
        fi;
        if [ $allowed -eq 1 ]; then
            return 0;
        fi;
    fi;
    return 1
}
shell_session_history_check () 
{ 
    if [ ${SHELL_SESSION_DID_HISTORY_CHECK:-0} -eq 0 ]; then
        SHELL_SESSION_DID_HISTORY_CHECK=1;
        if shell_session_history_allowed; then
            shell_session_history_enable;
        fi;
        if [ "$PROMPT_COMMAND" = "shell_session_history_check" ]; then
            unset PROMPT_COMMAND;
        else
            if [[ $PROMPT_COMMAND =~ (.*)(; *shell_session_history_check *| *shell_session_history_check *; *)(.*) ]]; then
                PROMPT_COMMAND="${BASH_REMATCH[1]}${BASH_REMATCH[3]}";
            fi;
        fi;
    fi
}
shell_session_history_enable () 
{ 
    touch "$SHELL_SESSION_HISTFILE_NEW";
    HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
    SHELL_SESSION_HISTORY=1
}
shell_session_save () 
{ 
    if [ -n "$SHELL_SESSION_FILE" ]; then
        echo -n 'Saving session...';
        echo echo Restored session: $(date) >|"$SHELL_SESSION_FILE";
        declare -F shell_session_save_user_state > /dev/null && shell_session_save_user_state;
        shell_session_history_allowed && shell_session_save_history;
        echo 'completed.';
    fi
}
shell_session_save_history () 
{ 
    shell_session_history_enable;
    history -a;
    if [ -f "$SHELL_SESSION_HISTFILE_SHARED" ] && [ ! -s "$SHELL_SESSION_HISTFILE" ]; then
        echo -ne '\n...copying shared history...';
        cp "$SHELL_SESSION_HISTFILE_SHARED" "$SHELL_SESSION_HISTFILE";
    fi;
    echo -ne '\n...saving history...';
    cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE_SHARED";
    cat "$SHELL_SESSION_HISTFILE_NEW" >> "$SHELL_SESSION_HISTFILE";
    : >|"$SHELL_SESSION_HISTFILE_NEW";
    if [ -n "$HISTFILESIZE" ]; then
        echo -n 'truncating history files...';
        HISTFILE="$SHELL_SESSION_HISTFILE_SHARED";
        HISTFILESIZE="$HISTFILESIZE";
        HISTFILE="$SHELL_SESSION_HISTFILE";
        HISTFILESIZE="$size";
        HISTFILE="$SHELL_SESSION_HISTFILE_NEW";
    fi;
    echo -ne '\n...'
}
shell_session_update () 
{ 
    shell_session_save && shell_session_delete_expired
}
update_terminal_cwd () 
{ 
    local url_path='';
    { 
        local i ch hexch LC_CTYPE=C LC_ALL=;
        for ((i = 0; i < ${#PWD}; ++i))
        do
            ch="${PWD:i:1}";
            if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
                url_path+="$ch";
            else
                printf -v hexch "%02X" "'$ch";
                url_path+="%${hexch: -2:2}";
            fi;
        done
    };
    printf '\e]7;%s\a' "file://$HOSTNAME$url_path"
}

Nope, looks clean. Maybe it’s set via some config file in your account. If you issue:

$ ls -a

you might be able to spot a folder called .xcode or something - but this is just a guess, I can’t find any information as to where XCode might store its settings… But if you do find a file or folder that looks promising, you could try just moving or renaming it, see if that solves the problem.

But really at this stage, trying from a new clean user account would at least answer the question as to whether there is something conflicting in your local user settings.

According to the clang manual page, you can try setting the MACOSX_DEPLOYMENT_TARGET environment variable to force clang++ to assume a particular target. So this would mean trying something like:

$ export MACOSX_DEPLOYMENT_TARGET=10.9
$ export EIGEN_CFLAGS="-isystem /opt/local/include/eigen3"
$ ./configure

You could also try different version numbers, e.g. 10.10, 10.11 - you never know, one of them might work…

Alternatively, you could also add the -mmacosx-version-min command line option to clang++. You’d use this by adding it to your CFLAGS environment variable:

$ export CFLAGS=-mmacosx-version-min=10.9
$ export EIGEN_CFLAGS="-isystem /opt/local/include/eigen3"
$ ./configure

Hopefully one of these suggestions will work…

I’ve tried both suggestions but it comes across the same new problem:

./configure 

MRtrix build type requested: release

Detecting OS: darwin
Checking for C++11 compliant compiler [clang++]: 4.2.1 - tested 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 Eigen 3 library: 3.2.8
Checking shared library generation: yes
Checking for Qt moc: 
ERROR:  Qt moc not found!

  Use the MOC environment variable to specify the Qt meta-object compiler,
  or set PATH to include its location

BUT, I followed your precious help and created a new account user, and everything went fine and I’m able to finish the installation and open mrview :slight_smile:

Thanks a lot for your patience

Finally! So this was indeed related to some funny configuration in your account? That’s a relief…

By the way, that last configure output was already looking promising, it got past the Eigen3 stage to the Qt stage. So there was some progress… it would have been good to truly get to the bottom of what the problem actually was, in case someone else has a similar issue - but I think you’ve suffered enough already…

Well, now that I can finally you use the soft, we can still dig into it if you wish in the meantime.

FYI here is how to reset your Xcode settings. This might help in sorting out the issue.

Hi there,

had the same issues in a macOS Sierra installation and turns out that the default (at least in my installation) locations when installing Qt and Eigen using homebrew are different than specified in the Mac OS X install tutorial (http://mrtrix.readthedocs.io/en/latest/installation/mac_install.html).

On my mac, brew installed Qt to: /usr/local/Cellar/qt5/
and Eigen to /usr/local/Cellar/eigen/3.3.1

Setting
export EIGEN_CFLAGS="-isystem /usr/local/Cellar/eigen/3.3.1"

did not help but instead had to manually download eigen, in my case put it into
/usr/local/eigen3

and set
export EIGEN_CFLAGS="-isystem /usr/local/eigen3"

then it all worked.

Could be only a problem of my specific homebrew installation / setting (I’m no expert in these things and probably migrated with homebrew installed from two generations of Macs, i.e. could be my whole command line setup is a bit weird) but I thought to share this in case helpful to anyone else.

Best, Andy

Hello Andy,

Did you install pkg-config (brew install pkg-config)? If not you can use homebrew’s eigen package with

export EIGEN_CFLAGS="-isystem /usr/local/Cellar/eigen/3.3.0/include/eigen3"

before

./configure. However, if you install pkg-config, you should not need that.

Cheers,
Max

I did… Still had to do similar to what you said – in any way it all works nice on my side. Just thought to share in case helpful. Also no prob if you think the comment is confusing/wrong for others to delete it :slight_smile: