Followed step by step the installation and keep having this problem:
$ ./configure -debug
MRtrix build type requested: debug
Detecting OS: darwin
Checking for C++11 compliant compiler [clang++]: 4.2.1
ERROR: linking error!
Use LD environment variable to set path to compiler, as follows:
LD=/usr/bin/g++-4.8 ./configure
That’s unexpected… Can you post the contents of your configure.log
file?
Also, any reason you’re going for a debug build? You do realise that the -debug
option doesn’t make the configure
script provide more verbose output, it includes the option to generate debugging code when the executables are generated via the build
script. You shouldn’t need to do that unless you’re trying to debug a problem with one of the MRtrix3 commands - indeed, debug code runs generally orders of magnitude slower…
i’ve tried directly $./configure but keep appearing the same error message.
Here find enclosed 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/tmpRlZwTU.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/tmpRlZwTU.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpRlZwTU.o
EXIT: 0
>>
EXEC <<
CMD: /usr/bin/g++-4.8 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpRlZwTU.o -o a.out
error invoking command "/usr/bin/g++-4.8": No such file or directory
>>
error deleting temporary file "a.out": No such file or directory
ERROR: linking error!
Use LD environment variable to set path to compiler, as follows:
LD=/usr/bin/g++-4.8 ./configure
OK, for some reason, the script is (correctly) invoking clang++
for the compile step, but invoking g++-4.8
for the link step. This doesn’t sound right…
One of the reasons why this may be happening is that the LD
environment variable might be set. Try:
$ unset LD
$ ./configure
same error:
$ unset LD
$ ./configure
MRtrix build type requested: release
Detecting OS: darwin
Checking for C++11 compliant compiler [clang++]: 4.2.1
ERROR: linking error!
Use LD environment variable to set path to compiler, as follows:
LD=/usr/bin/g++-4.8 ./configure
here the configure.log file:
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/tmp8XRJX5.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/tmp8XRJX5.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp8XRJX5.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp8XRJX5.o -o a.out
EXIT: 1
STDERR:
ld: library not found for -lgcc_s.10.5
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
ERROR: linking error!
Use LD environment variable to set path to compiler, as follows:
LD=/usr/bin/g++-4.8 ./configure
Right, something is very odd about your setup…
Clearly LD was set, since it’s now correctly invoking clang++
for both compile and link steps. However, it then tries to link against the libgcc_s.10.5
library, which looks very much like a GCC-specific library. I don’t expect clang to rely on this. Do you have gcc installed? Or maybe you had installed it previously and removed it? I’m struggling to understand why it would try so hard to pull in GCC stuff…
Maybe some of the other MacOSX users can shed some light on this? Would installing gcc via macports or homebrew be expected to interfere so badly with clang…?
There the version of gcc installed on my mac:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/local/libexec/gcc/x86_64-apple-darwin15/4.8.5/lto-wrapper
Target: x86_64-apple-darwin15
Configured with: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/gcc48/work/gcc-4.8.5/configure --prefix=/opt/local --build=x86_64-apple-darwin15 --enable-languages=c,c++,objc,obj-c++,lto,fortran,java --libdir=/opt/local/lib/gcc48 --includedir=/opt/local/include/gcc48 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --datarootdir=/opt/local/share/gcc-4.8 --with-local-prefix=/opt/local --with-system-zlib --disable-nls --program-suffix=-mp-4.8 --with-gxx-include-dir=/opt/local/include/gcc48/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --with-mpc=/opt/local --with-isl=/opt/local --disable-isl-version-check --with-cloog=/opt/local --disable-cloog-version-check --enable-stage1-checking --disable-multilib --enable-lto --enable-libstdcxx-time --with-build-config=bootstrap-debug --with-as=/opt/local/bin/as --with-ld=/opt/local/bin/ld --with-ar=/opt/local/bin/ar --with-bugurl=https://trac.macports.org/newticket --with-pkgversion='MacPorts gcc48 4.8.5_0' --with-build-config=bootstrap-debug
Thread model: posix
gcc version 4.8.5 (MacPorts gcc48 4.8.5_0)
Ok, so you have GCC 4.8 installed via macports, and this somehow interferes with clang. You could try to uninstall GCC, see if that solves the problem. But I’m not sure that would necessarily sort things out. Maybe you could look through what set
reports, see if there’s anything in your environment that would interfere with clang…?
Or you could try to compile with g++ directly, using something like:
$ CXX=/opt/local/bin/g++-4.8 ./configure
I’ve installed the latest version of Xcode (7.3.1), and it seems to have gone a step further. I’m now having the same trouble as user zhangyan_yang:
$ export EIGEN_CFLAGS="-isystem /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9"
$ ./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
I’ve tried the solution given on the previous topic but didn’t work
Glad to hear updating XCode was all it took.
As to the Eigen3 issue, can you try installing the pkg-config
package via macports/homebrew (along with the Eigen3
one), and trying again? I’m not sure that’s what the problem is (see this post, where the same issue is cropping up), but I have a feeling that might fix it. If it does, you won’t need the standalone download or setting the EIGEN_CFLAGS
, it should just work.
Clearly, it none of that works, we’ll need to reassess. In that case, I’ll ask you to post your configure.log
output again - that’s the only way we’re going to have any hints as to what the issue might be.
I went through your instruction, but it keeps stopping:
$ sudo port install pkgconfig
---> Computing dependencies for pkgconfig
---> Fetching archive for pkgconfig
---> Attempting to fetch pkgconfig-0.29.1_0.darwin_15.x86_64.tbz2 from https://packages.macports.org/pkgconfig
---> Attempting to fetch pkgconfig-0.29.1_0.darwin_15.x86_64.tbz2.rmd160 from https://packages.macports.org/pkgconfig
---> Installing pkgconfig @0.29.1_0
---> Activating pkgconfig @0.29.1_0
---> Cleaning pkgconfig
---> Updating database of binaries
---> Scanning binaries for linking errors
---> No broken files found.
adriano-3:~ adriano_bernini$ cd mrtrix3/
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
Here my configure.log file:
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/tmpSsUmo_.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/tmpSsUmo_.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpSsUmo_.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpSsUmo_.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/tmpESMflA.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/tmpESMflA.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpESMflA.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpESMflA.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/tmpNPJyUM.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/tmpNPJyUM.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpNPJyUM.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpNPJyUM.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/tmpKMeMZ4.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/tmpKMeMZ4.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpKMeMZ4.o
EXIT: 1
STDERR:
/var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpKMeMZ4.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/tmpKMeMZ4.o": No such file or directory
REPORT: no
REPORT: Checking for zlib compression library:
COMPILE /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp_H9umt.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/tmp_H9umt.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp_H9umt.o
EXIT: 0
>>
EXEC <<
CMD: clang++ /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmp_H9umt.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/tmpWkRdd8.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 /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9 /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpWkRdd8.cpp -o /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpWkRdd8.o
EXIT: 1
STDERR:
In file included from /var/folders/nk/b8yqf2vn2dz71y9xkzxt_0hm0000gn/T/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:288:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:288:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:288:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:288:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:288:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:288:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:288:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:293:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:294:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.cpp:2:
In file included from /Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/Eigen/Core:295:
/Users/adriano_bernini/mrtrix3/eigen-eigen-07105f7124f9/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/tmpWkRdd8.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
OK, I’m a little puzzled here… First off, could I ask you to start a fresh terminal with EIGEN_CFLAGS
left undefined, so we can see whether installing pkg-config
made any difference. Your previous run was clearly still picking up your downloaded version, presumably because you ran export EIGEN_CFLAGS=...
earlier in the same session…
Next, I’m a bit stumped by the actual error produced by the compiler here. This is a bit technical, so feel free to skip ahead - I’m including it here mostly for the benefit of other developers. clang++
complains about not finding std::move()
despite being invoked with the -std=c++11
flag. A quick search suggests that this might happen due to linking against the old gcc libstdc++
library (which has very limited C++11 support), rather than the newer libc++
library. It looks like the fix is to invoke clang++
with the -stdlib=libc++
- for both compile and link stages. I’m assuming this would be the standard setting with XCode, but that this can somehow get messed up on some systems.
So if that’s correct, this should fix it:
$ export CFLAGS=-stdlib=libc++
$ export LDFLAGS=-stdlib=libc++
$ export LDLIB_FLAGS=-stdlib=libc++
$ ./configure
If that works, I think it might be a good idea to make these flags the default on MacOSX to avoid others having to go through this mess…
Well still having some problems, if it continues I might think to reinstall from scratch my OS system. Here the last steps:
$ 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$ ./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
Ah yes, that’s the same one as earlier. You need to
$ unset LD
before invoking
$ ./configure
No idea why your LD
environment variable would be set, by the way. Might be worth looking through your config files to figure out where and why it’s set…
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!