<p dir="ltr">Hi Stephan,</p>
<p dir="ltr">Sounds like your compiler is stricter than most... Can I ask what version of g++ you're running (g++ --version), and if this is the latest version of macosx? Is this version of g++ the standard one that was installed along with xcode? </p>
<p dir="ltr">The reason I ask is that solving this problem is going to require some changes to the code. I wanted to know whether this is specific to your installation, or whether a lot of users will soon be affected by the same problem...</p>
<p dir="ltr">I'll start making the required changes in the meantime. </p>
<p dir="ltr">Cheers,<br>
Donald.<br></p>
<p dir="ltr">--<br>
Dr J-Donald Tournier (PhD)</p>
<p dir="ltr">Senior Lecturer, Biomedical Engineering<br>
Division of Imaging Sciences & Biomedical Engineering<br>
King's College London</p>
<p dir="ltr">A: Department of Perinatal Imaging & Health, 1st Floor South Wing, St Thomas' Hospital, London. SE1 7EH<br>
T: +44 (0)20 7188 7118 ext 53613<br>
W:Â <a href="http://www.kcl.ac.uk/medicine/research/divisions/imaging/departments/biomedengineering">http://www.kcl.ac.uk/medicine/research/divisions/imaging/departments/biomedengineering</a><br>
   </p>
<div class="gmail_quote">On 4 Oct 2013 15:20, <<a href="mailto:s070439@student.dtu.dk">s070439@student.dtu.dk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I have some problems at "The compilation step" and "Installation of<br>
executables" step. Could you possibly help?<br>
<br>
In Installing dependencies step:<br>
First I tried installing dependencies with MacPorts (recommended) method<br>
as on <a href="http://www.brain.org.au/software/mrtrix/install/macosx.html" target="_blank">http://www.brain.org.au/software/mrtrix/install/macosx.html</a>, but it<br>
failed.<br>
<br>
So I tried Homebrew method and succeeded in Get and build the<br>
dependencies, i.e.<br>
when I typed in "brew install python glib gtk+ glibmm gtkmm gtkglext gsl".<br>
I got:<br>
Warning: python-2.7.5 already installed<br>
Warning: glib-2.38.0 already installed<br>
Warning: gtk+-2.24.21 already installed<br>
Warning: glibmm-2.36.2 already installed<br>
Warning: gtkmm-2.24.4 already installed<br>
Warning: gtkglext-1.2.0 already installed<br>
Warning: gsl-1.16 already installed<br>
<br>
In Compile MRtrix step:<br>
1. $ cd /Users/Stephan/Documents/MSc_Thesis/mrtrix-0.2.11<br>
2. then when I tried: "./build"<br>
and I got:<br>
-bash: ./build: /usr/bin/python2: bad interpreter: No such file or directory<br>
<br>
so I tried: "python2.7 ./build" and got:<br>
Package xcb-shm was not found in the pkg-config search path.<br>
Perhaps you should add the directory containing `xcb-shm.pc'<br>
to the PKG_CONFIG_PATH environment variable<br>
Package 'xcb-shm', required by 'cairo', not found<br>
WARNING: unable to find gtkmm-2.4 configuration<br>
Package xcb-shm was not found in the pkg-config search path.<br>
Perhaps you should add the directory containing `xcb-shm.pc'<br>
to the PKG_CONFIG_PATH environment variable<br>
Package 'xcb-shm', required by 'cairo', not found<br>
WARNING: unable to find gtkmm-2.4 configuration<br>
Traceback (most recent call last):<br>
 File "./build", line 980, in <module><br>
  [ Entry(item) for item in targets ]<br>
 File "./build", line 253, in __init__<br>
  [ Entry(item) for item in self.deps ]<br>
 File "./build", line 250, in __init__<br>
  elif is_object (<a href="http://self.name" target="_blank">self.name</a>): self.set_object()<br>
 File "./build", line 305, in set_object<br>
  '$src$': [ cc_file ] })<br>
 File "./build", line 379, in fillin<br>
  if item in keyvalue: cmd += keyvalue[item]<br>
TypeError: 'NoneType' object is not iterable<br>
<br>
So, I read some discussions on your forum and tried:<br>
i. export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig<br>
ii. python2.7 ./build<br>
and I got:<br>
[CC] cmd/gen_ROI.o[CC] cmd/mradd.o<br>
<br>
<br>
ERROR: [CC] cmd/gen_ROI.o<br>
<br>
g++ -c -Wall -mtune=native -fPIC -fno-strict-aliasing<br>
-DGL_GLEXT_PROTOTYPES -DUSE_TR1 -O2 -D_REENTRANT<br>
-I/usr/local/Cellar/glibmm/2.36.2/include/glibmm-2.4<br>
-I/usr/local/Cellar/glibmm/2.36.2/lib/glibmm-2.4/include<br>
-I/usr/local/Cellar/libsigc++/2.2.11/include/sigc++-2.0<br>
-I/usr/local/Cellar/libsigc++/2.2.11/lib/sigc++-2.0/include<br>
-I/usr/local/Cellar/glib/2.38.0/include/glib-2.0<br>
-I/usr/local/Cellar/glib/2.38.0/lib/glib-2.0/include<br>
-I/usr/local/opt/gettext/include -Ilib -Isrc cmd/gen_ROI.cpp -o<br>
cmd/gen_ROI.o<br>
<br>
failed with output:<br>
<br>
cmd/gen_ROI.cpp:89:23: error: variable length array of non-POD element<br>
type 'std::vector<int>'<br>
 std::vector<int> pos[in_obj.ndim()];<br>
           ^<br>
1 error generated.<br>
<br>
STOP<br>
<br>
ERROR: [CC] cmd/mradd.o<br>
<br>
g++ -c -Wall -mtune=native -fPIC -fno-strict-aliasing<br>
-DGL_GLEXT_PROTOTYPES -DUSE_TR1 -O2 -D_REENTRANT<br>
-I/usr/local/Cellar/glibmm/2.36.2/include/glibmm-2.4<br>
-I/usr/local/Cellar/glibmm/2.36.2/lib/glibmm-2.4/include<br>
-I/usr/local/Cellar/libsigc++/2.2.11/include/sigc++-2.0<br>
-I/usr/local/Cellar/libsigc++/2.2.11/lib/sigc++-2.0/include<br>
-I/usr/local/Cellar/glib/2.38.0/include/glib-2.0<br>
-I/usr/local/Cellar/glib/2.38.0/lib/glib-2.0/include<br>
-I/usr/local/opt/gettext/include -Ilib -Isrc cmd/mradd.cpp -o cmd/mradd.o<br>
<br>
failed with output:<br>
<br>
cmd/mradd.cpp:56:27: error: variable length array of non-POD element type<br>
'RefPtr<Image::Object>'<br>
 RefPtr<Image::Object> in[num_images];<br>
             ^<br>
1 error generated.<br>
<br>
STOP<br>
<br>
I also tried:<br>
1. export PATH=/Users/Stephan/Documents/MSc_Thesis/mrtrix-0.2.11/bin:$PATH<br>
2. export<br>
LD_LIBRARY_PATH=/Users/Stephan/Documents/MSc_Thesis/mrtrix-0.2.11/lib<br>
3. python2.7 ./build install<br>
and I got:<br>
installing executables to "/usr/local/mrtrix/bin" and dynamic library to<br>
"/usr/local/mrtrix/lib"...<br>
Traceback (most recent call last):<br>
 File "./build", line 925, in <module><br>
  apply_recursive (install, os.path.join (lib_dir, libname),<br>
os.path.join (dest_lib, libname))<br>
 File "./build", line 747, in apply_recursive<br>
  action (source, destination)<br>
 File "./build", line 764, in install<br>
  shutil.copy (source, destination)<br>
 File<br>
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",<br>
line 116, in copy<br>
  copyfile(src, dst)<br>
 File<br>
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",<br>
line 81, in copyfile<br>
  with open(src, 'rb') as fsrc:<br>
IOError: [Errno 2] No such file or directory: 'lib/libmrtrix-0_2_11.dylib'<br>
<br>
Best,<br>
Stephan<br>
<br>
<br>
<br>
_______________________________________________<br>
Mrtrix-discussion mailing list<br>
<a href="mailto:Mrtrix-discussion@www.nitrc.org">Mrtrix-discussion@www.nitrc.org</a><br>
<a href="http://www.nitrc.org/mailman/listinfo/mrtrix-discussion" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><br>
</blockquote></div>