Error running ./configure


#1

I’m getting the following error:


./configure

MRtrix build type requested: release

Detecting OS: linux
Checking for C++11 compliant compiler [g++]: 4.8.2 - 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: yes
Checking for zlib compression library: 1.2.3
Checking for Eigen 3 library: ('Unexpected error:', "(<type 'exceptions.TypeError'>, TypeError('execv() arg 2 must contain only strings',), <traceback object at 0x9f5b00>)")

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.

According to instructions, I started with the following command:

yum install git g++ python numpy eigen3-devel zlib-devel libqt4-devel libgl1-mesa-dev

But I still lacked the proper g++ (4.4.7 is sstandard)

rpm --import http://ftp.scientificlinux.org/linux/scientific/5x/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern
wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
yum install devtoolset-2
scl enable devtoolset-2 bash

g++ --version
g++ (GCC) 4.8.2 20140120 (Red Hat 4.8.2-15)
configure.log
REPORT: 
MRtrix build type requested:

REPORT: release

REPORT: 

REPORT: Detecting OS: linux

REPORT: Checking for C++11 compliant compiler [g++]:
EXEC <<
CMD: g++ -dumpversion
EXIT: 0
STDOUT:
4.8.2
>>


REPORT: 4.8.2

COMPILE /tmp/tmpGw4LE2.cpp:
---

struct Base {
    Base (int);
};
struct Derived : Base {
    using Base::Base;
};

int main() {
  Derived D (int); // check for contructor inheritance
  return (0);
}

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native /tmp/tmpGw4LE2.cpp -o /tmp/tmpGw4LE2.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpGw4LE2.o -pthread -o a.out
EXIT: 0
>>

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


REPORT:  - tested ok

REPORT: Detecting pointer size:

COMPILE /tmp/tmpboSmLV.cpp:
---

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

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native /tmp/tmpboSmLV.cpp -o /tmp/tmpboSmLV.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpboSmLV.o -pthread -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 /tmp/tmpg5J6lY.cpp:
---


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

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 /tmp/tmpg5J6lY.cpp -o /tmp/tmpg5J6lY.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpg5J6lY.o -pthread -o a.out
EXIT: 0
>>

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

REPORT: yes

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

COMPILE /tmp/tmpvYU3JY.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: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 /tmp/tmpvYU3JY.cpp -o /tmp/tmpvYU3JY.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpvYU3JY.o -pthread -o a.out
EXIT: 0
>>

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


REPORT: yes

REPORT: Checking for zlib compression library:

COMPILE /tmp/tmpkYgWcE.cpp:
---

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

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

---
EXEC <<
CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 /tmp/tmpkYgWcE.cpp -o /tmp/tmpkYgWcE.o
EXIT: 0
>>

EXEC <<
CMD: g++ /tmp/tmpkYgWcE.o -pthread -lz -o a.out
EXIT: 0
>>

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


REPORT: 1.2.3

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


COMPILE /tmp/tmp2BZ5pA.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: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -I/usr/include/eigen3 /tmp/tmp2BZ5pA.cpp -o /tmp/tmp2BZ5pA.o
error deleting temporary file "/tmp/tmp2BZ5pA.o": No such file or directory
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.

When I compile the Eigen test code manually, it compiles/runs fine and returns “3.2.5”.

One odd thing is that viewing configure.log with less, looks like this:

CMD: g++ -c -std=c++11 -pthread -fPIC -march=native -DMRTRIX_WORD64 -^@^@^@I^@^@^@/^@^@^@u^@^@^@s^@^@^@r^@^@^@/^@^@^@i^@^@^@n^@^@^@c^@^@^@l^@^@^@u^@^@^@d^@^@^@e^@^@^@/^@^@^@e^@^@^@i^@^@^@g^@
^@^@e^@^@^@n^@^@^@3^@^@^@ /tmp/tmp2BZ5pA.cpp -o /tmp/tmp2BZ5pA.o

Are those NULL characters? They are not in any of the other compile commands.
The only modifications I made to ./configure was to remove the arguments to encode and decode. (lines 182, 192, 196, 409 and 411). The arguments caused immediate failure: “TypeError: encode() takes no keyword arguments”

Any help is appreciated.

Thanks,
Brian.


#2

At first, this looks similar to issues we’ve had in the past with the output of pkg-config being encoded or interpreted wrong, given the strange @ symbols everywhere (which looks like some kind of 4-byte character encoding, maybe UTF-32). But given that you needed to modify the python encode/decode lines, I’m guessing you’ll be running python version 2.6? Python needs to be version 2.7 or above to work, as far as I can remember. And these encode/decode lines may very well have influenced this.

But given that you can run the code manually, you might get away with simply bypassing the pkg-config auto-detection, like this:

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

If that doesn’t work, and you have a more up to date version of python installed (it’s just not the default), then you can invoke the relevant python executable with the script as an argument, like so:

python3 ./configure
python3 ./build

Hopefully one of these options will help…


Dwipreproc - eddy ERROR
#3

The only modifications I made to ./configure was to remove the arguments to encode and decode. (lines 182, 192, 196, 409 and 411). The arguments caused immediate failure: “TypeError: encode() takes no keyword arguments”

But given that you needed to modify the python encode/decode lines, I’m guessing you’ll be running python version 2.6? Python needs to be version 2.7 or above to work, as far as I can remember. And these encode/decode lines may very well have influenced this.

Yep: This would definitely indicate Python version 2.6. I only recently incremented the documentation to reflect that Python >= 2.7 is in fact required: I tried to modify the build and configure scripts to detect Python version 2.6 and modify use of the encode() method appropriately, but it seems the encode() method wasn’t the only problem with running under that version. Hopefully explicitly using Python version 3 (and reverting your manual changes to the configure script) will get you going.

It should also be possible for build and configure to check the Python version, and immediately cease if it doesn’t satisfy this requirement: that should save anybody else from falling down the same rabbit hole. :thumbsup:


#4

That was it! It’s building now.
Thanks to both of you and apologies for the oversight.
The python 2.7 installed in /opt/rh/ .

Thanks,
Brian.