[Mrtrix-discussion] Linking error

Jon Clayden jon.clayden at gmail.com
Mon Oct 28 08:11:44 PDT 2013


Dear all,

I know this is tedious--sorry--but I've been struggling to get MRtrix installed on a new computer (Mac OS X Mavericks + Homebrew) and can't find my way past this problem.

The MRtrix build script fails at link time (see output below). But the library paths look fine, the appropriate libraries are listed in the link command generated by the script, and I see no evidence that the functions in question have moved or been removed in recent versions of glibmm (I'm using 2.38.0).

Am I missing something obvious here?

Thanks in advance,
Jon

--
[LD] lib/libmrtrix-0_2_11.dylib

ERROR: [LD] lib/libmrtrix-0_2_11.dylib

g++-4.8 -shared lib/math/vector.o lib/math/matrix.o lib/image/format/analyse.o lib/file/dicom/quick_scan.o lib/image/format/list.o lib/file/dicom/image.o lib/file/config.o lib/point.o lib/image/name_parser.o lib/image/format/xds.o lib/data_type.o lib/args.o lib/file/dicom/patient.o lib/file/dicom/tree.o lib/image/fft.o lib/image/header.o lib/file/dicom/mapper.o lib/file/dicom/select_cmdline.o lib/math/linalg.o lib/file/dicom/study.o lib/file/dicom/element.o lib/file/mmap.o lib/image/format/nifti1.o lib/file/dicom/dict.o lib/image/format/mrtrix.o lib/image/format/base.o lib/image/axis.o lib/image/interp.o lib/image/mapper.o lib/file/dicom/series.o lib/mrtrix.o lib/image/format/mri.o lib/image/object.o lib/image/format/dicom.o lib/app.o lib/file/key_value.o -L/usr/local/Cellar/glibmm/2.38.0/lib -L/usr/local/Cellar/glib/2.38.1/lib -L/usr/local/Cellar/libsigc++/2.3.1/lib -L/usr/local/Cellar/glib/2.38.1/lib -L/usr/local/opt/gettext/lib -lglibmm-2.4 -lgobject-2.0 -lsigc-2.0 -lgthread-2.0 -lglib-2.0 -lintl -lgsl -lgslcblas -lz -o lib/libmrtrix-0_2_11.dylib

failed with output:

Undefined symbols for architecture x86_64:
 "Glib::build_filename(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
     MR::File::Config::init()   in config.o
     MR::Image::NameParser::name(std::vector<int, std::allocator<int> > const&) in name_parser.o
     MR::Image::NameParser::get_next_match(std::vector<int, std::allocator<int> >&, bool) in name_parser.o
     MR::File::Dicom::Tree::read_dir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in tree.o
     MR::Image::Format::MRtrix::read(MR::Image::Mapper&, MR::Image::Header&) const in mrtrix.o
 "Glib::str_has_suffix(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
     MR::Image::Format::Analyse::check(MR::Image::Header&, int) const in analyse.o
     MR::Image::Format::Analyse::read(MR::Image::Mapper&, MR::Image::Header&) const in analyse.o
     MR::Image::Format::XDS::check(MR::Image::Header&, int) const in xds.o
     MR::Image::Format::XDS::read(MR::Image::Mapper&, MR::Image::Header&) const in xds.o
     MR::File::Dicom::Element::set(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in element.o
     MR::Image::Format::NIfTI::check(MR::Image::Header&, int) const in nifti1.o
     MR::Image::Format::NIfTI::create(MR::Image::Mapper&, MR::Image::Header const&) const in nifti1.o
     ...
 "Glib::path_get_dirname(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
     MR::Image::NameParser::parse(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) in name_parser.o
     MR::Image::Format::MRtrix::read(MR::Image::Mapper&, MR::Image::Header&) const in mrtrix.o
 "Glib::path_get_basename(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
     MR::Image::NameParser::parse(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) in name_parser.o
     MR::Image::Format::MRtrix::create(MR::Image::Mapper&, MR::Image::Header const&) const in mrtrix.o
     MR::Image::Object::open(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool) in object.o
     MR::Image::Object::create(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, MR::Image::Header&) in object.o
     MR::App::App(int, char**, char const**, MR::Argument const*, MR::Option const*, unsigned int const*, char const*, char const*) in app.o
     MR::App::App(int, char**, char const**, MR::Argument const*, MR::Option const*, unsigned int const*, char const*, char const*) in app.o
 "Glib::Dir::Dir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
     MR::Image::NameParser::get_next_match(std::vector<int, std::allocator<int> >&, bool) in name_parser.o
     MR::File::Dicom::Tree::read_dir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in tree.o
 "Glib::ustring::ustring(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
     MR::Math::Vector::save(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const in vector.o
     MR::Math::Vector::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in vector.o
     MR::Math::Matrix::save(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const in matrix.o
     MR::Math::Matrix::load(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in matrix.o
     MR::Image::NameParser::get_next_match(std::vector<int, std::allocator<int> >&, bool) in name_parser.o
     MR::Image::Format::XDS::read(MR::Image::Mapper&, MR::Image::Header&) const in xds.o
     MR::Image::Format::XDS::create(MR::Image::Mapper&, MR::Image::Header const&) const in xds.o
     ...
 "Glib::file_test(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Glib::FileTest)", referenced from:
     MR::File::Config::init()   in config.o
     MR::Image::NameParser::parse(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int) in name_parser.o
     MR::File::Dicom::Tree::read_dir(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in tree.o
     MR::File::Dicom::Tree::read(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in tree.o
     MR::Image::Format::MRtrix::create(MR::Image::Mapper&, MR::Image::Header const&) const in mrtrix.o
 "Glib::operator<<(std::basic_ostream<char, std::char_traits<char> >&, Glib::ustring const&)", referenced from:
     MR::cmdline_info(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in app.o
     MR::cmdline_error(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in app.o
     MR::cmdline_debug(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in app.o
     MR::operator<<(std::basic_ostream<char, std::char_traits<char> >&, MR::App const&) in app.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status

STOP


More information about the Mrtrix-discussion mailing list