[Mrtrix-discussion] MRtrix building issue Mac OS X 10.8.5

s070439 at student.dtu.dk s070439 at student.dtu.dk
Fri Oct 4 07:19:59 PDT 2013


Hi,

I have some problems at "The compilation step" and "Installation of
executables" step. Could you possibly help?

In Installing dependencies step:
First I tried installing dependencies with MacPorts (recommended) method
as on http://www.brain.org.au/software/mrtrix/install/macosx.html, but it
failed.

So I tried Homebrew method and succeeded in Get and build the
dependencies, i.e.
when I typed in "brew install python glib gtk+ glibmm gtkmm gtkglext gsl".
I got:
Warning: python-2.7.5 already installed
Warning: glib-2.38.0 already installed
Warning: gtk+-2.24.21 already installed
Warning: glibmm-2.36.2 already installed
Warning: gtkmm-2.24.4 already installed
Warning: gtkglext-1.2.0 already installed
Warning: gsl-1.16 already installed

In Compile MRtrix step:
1. $ cd /Users/Stephan/Documents/MSc_Thesis/mrtrix-0.2.11
2. then when I tried: "./build"
and I got:
-bash: ./build: /usr/bin/python2: bad interpreter: No such file or directory

so I tried: "python2.7 ./build" and got:
Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found
WARNING: unable to find gtkmm-2.4 configuration
Package xcb-shm was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb-shm.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xcb-shm', required by 'cairo', not found
WARNING: unable to find gtkmm-2.4 configuration
Traceback (most recent call last):
  File "./build", line 980, in <module>
    [ Entry(item) for item in targets ]
  File "./build", line 253, in __init__
    [ Entry(item) for item in self.deps ]
  File "./build", line 250, in __init__
    elif is_object (self.name): self.set_object()
  File "./build", line 305, in set_object
    '$src$': [ cc_file ] })
  File "./build", line 379, in fillin
    if item in keyvalue: cmd += keyvalue[item]
TypeError: 'NoneType' object is not iterable

So, I read some discussions on your forum and tried:
i. export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig
ii. python2.7 ./build
and I got:
[CC] cmd/gen_ROI.o[CC] cmd/mradd.o


ERROR: [CC] cmd/gen_ROI.o

g++ -c -Wall -mtune=native -fPIC -fno-strict-aliasing
-DGL_GLEXT_PROTOTYPES -DUSE_TR1 -O2 -D_REENTRANT
-I/usr/local/Cellar/glibmm/2.36.2/include/glibmm-2.4
-I/usr/local/Cellar/glibmm/2.36.2/lib/glibmm-2.4/include
-I/usr/local/Cellar/libsigc++/2.2.11/include/sigc++-2.0
-I/usr/local/Cellar/libsigc++/2.2.11/lib/sigc++-2.0/include
-I/usr/local/Cellar/glib/2.38.0/include/glib-2.0
-I/usr/local/Cellar/glib/2.38.0/lib/glib-2.0/include
-I/usr/local/opt/gettext/include -Ilib -Isrc cmd/gen_ROI.cpp -o
cmd/gen_ROI.o

failed with output:

cmd/gen_ROI.cpp:89:23: error: variable length array of non-POD element
type 'std::vector<int>'
  std::vector<int> pos[in_obj.ndim()];
                      ^
1 error generated.

STOP

ERROR: [CC] cmd/mradd.o

g++ -c -Wall -mtune=native -fPIC -fno-strict-aliasing
-DGL_GLEXT_PROTOTYPES -DUSE_TR1 -O2 -D_REENTRANT
-I/usr/local/Cellar/glibmm/2.36.2/include/glibmm-2.4
-I/usr/local/Cellar/glibmm/2.36.2/lib/glibmm-2.4/include
-I/usr/local/Cellar/libsigc++/2.2.11/include/sigc++-2.0
-I/usr/local/Cellar/libsigc++/2.2.11/lib/sigc++-2.0/include
-I/usr/local/Cellar/glib/2.38.0/include/glib-2.0
-I/usr/local/Cellar/glib/2.38.0/lib/glib-2.0/include
-I/usr/local/opt/gettext/include -Ilib -Isrc cmd/mradd.cpp -o cmd/mradd.o

failed with output:

cmd/mradd.cpp:56:27: error: variable length array of non-POD element type
'RefPtr<Image::Object>'
  RefPtr<Image::Object> in[num_images];
                          ^
1 error generated.

STOP

I also tried:
1. export PATH=/Users/Stephan/Documents/MSc_Thesis/mrtrix-0.2.11/bin:$PATH
2. export
LD_LIBRARY_PATH=/Users/Stephan/Documents/MSc_Thesis/mrtrix-0.2.11/lib
3. python2.7 ./build install
and I got:
installing executables to "/usr/local/mrtrix/bin" and dynamic library to
"/usr/local/mrtrix/lib"...
Traceback (most recent call last):
  File "./build", line 925, in <module>
    apply_recursive (install, os.path.join (lib_dir, libname),
os.path.join (dest_lib, libname))
  File "./build", line 747, in apply_recursive
    action (source, destination)
  File "./build", line 764, in install
    shutil.copy (source, destination)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 116, in copy
    copyfile(src, dst)
  File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",
line 81, in copyfile
    with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'lib/libmrtrix-0_2_11.dylib'

Best,
Stephan





More information about the Mrtrix-discussion mailing list