[Mrtrix-discussion] Mac OS build error

Daan Christiaens Daan.Christiaens at esat.kuleuven.be
Tue Jan 14 09:12:05 PST 2014


Michael,

Try adding "-stdlib=libstdc++" and "-mmacosx-version-min=10.6" to the list of cpp_flags, ld_flags and ld_lib_flags in the file sysconf/darwin.py.

Best,

Daan


On 14 Jan 2014, at 18:01, Michael Schirner <m.schirner at fu-berlin.de> wrote:

> Hi,
> 
> it seems like the clang compiler shipped with newer versions of XCode is
> too restrictive and doesn't allow variable length arrays of non-POD
> element type.
> Upon running ./build I get the following messages:
> 
> mrtrix-0.2.11$ ./build
> [CC] cmd/dir2amp.o
> [CC] lib/file/dicom/quick_scan.o
> [CC] cmd/streamtrack.o
> [CC] lib/file/dicom/study.o
> [CC] cmd/gen_unit_warp.o
> [CC] src/dwi/tractography/tracker/sd_prob.o
> [CC] cmd/import_tracks.o
> [CC] src/dwi/tractography/tracker/base.o
> [CC] src/mrview/sidebar/orientation_plot.o
> [CC] lib/file/dicom/patient.o
> [CC] lib/image/header.o
> [CC] cmd/mrabs.o
> [CC] src/mrview/sidebar/overlay.o
> [CC] src/mrview/dialog/opengl.o
> [CC] cmd/gendir.o
> [CC] src/mrview/sidebar/screen_capture.o
> [CC] src/dwi/tractography/file.o
> [CC] src/dwi/SH.o
> [CC] cmd/tensor2ADC.o
> [CC] lib/image/format/mri.o
> [CC] cmd/dwi2tensor.o
> [CC] src/mrview/sidebar/tractography.o
> [CC] src/mrview/display_area.o
> [CC] src/icon.o
> [CC] src/mrview/image.o
> [CC] lib/math/vector.o
> [CC] src/mrview/mode/base.o
> [CC] lib/image/format/list.o
> [CC] lib/image/format/xds.o
> [CC] src/mrview/texture.o
> [CC] lib/file/dicom/dict.o
> [CC] src/histogram.o
> [CC] lib/image/axis.o
> [CC] lib/file/dicom/series.o
> [CC] src/mrview/sidebar/tractography/track_list.o
> [CC] src/mrview/slice.o
> [CC] cmd/disp_profile.o
> [CC] lib/file/dicom/mapper.o
> [CC] cmd/resample_tracks.o
> [CC] lib/file/dicom/select_cmdline.o
> [CC] cmd/tracks2prob.o
> [CC] lib/image/object.o
> [CC] src/mrview/dialog/error.o
> [CC] cmd/dwi2SH.o
> [CC] lib/image/name_parser.o
> [CC] src/dwi/sdeconv/constrained.o
> [CC] lib/math/matrix.o
> [CC] lib/file/key_value.o
> STDERR: [CC] lib/image/name_parser.o
> lib/image/name_parser.cpp:35:19: warning: unused function 'is_seq_char'
> [-Wunused-function]
>      inline bool is_seq_char (gchar c) { return (g_ascii_isdigit (c) || c
> == ',' || c == ':' || c == '%'); }
>                  ^
> lib/image/name_parser.cpp:37:18: warning: unused function 'last_bracket'
> [-Wunused-function]
>      inline int last_bracket (const String& str, int from, gchar c)
>                 ^
> 2 warnings generated.
> 
> [CC] cmd/mrtransform.o
> [CC] src/dwi/gradient.o
> [CC] cmd/gen_ROI.o
> 
> ERROR: [CC] cmd/gen_ROI.o
> 
> g++ -c -Wall -mtune=native -fPIC -fno-strict-aliasing
> -DGL_GLEXT_PROTOTYPES -DUSE_TR1 -I/opt/local/include -O2 -D_REENTRANT
> -I/opt/local/include/glibmm-2.4 -I/opt/local/lib/glibmm-2.4/include
> -I/opt/local/include/sigc++-2.0 -I/opt/local/lib/sigc++-2.0/include
> -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include
> -I/opt/local/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
> 
> 
> Is there any workaround for that problem?
> 
> Thanks,
> Michael
> 
> 
> 
> 
> _______________________________________________
> Mrtrix-discussion mailing list
> Mrtrix-discussion at www.nitrc.org
> http://www.nitrc.org/mailman/listinfo/mrtrix-discussion



More information about the Mrtrix-discussion mailing list