Dear Erika,
You will also need to rebuild the core FSL libraries ( as they were build with a different compiler ). To do this you just need to run
./build utils znzlib niftiio fslio miscmaths newimage
In $FSLDIR, if this works, then the resulting libraries should be compatible with your system and you can retry the source compilation.
Kind Regards
Matthew
--------------------------------
Dr Matthew Webster
FMRIB Centre
John Radcliffe Hospital
University of Oxford
> On 9 May 2018, at 11:27, Erika Molteni <[log in to unmask]> wrote:
>
> Dear Matthew,
> thank you very much for your support.
> After implementing your suggestion,
> this is (the first and last bits of) what I obtain:
>
> Undefined symbols for architecture x86_64:
> "NEWIMAGE::fslbasename(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
> int NEWIMAGE::save_volume<float>(NEWIMAGE::volume<float> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in gifbased_siena-0410b3.o
> "int NEWIMAGE::read_volumeROI<float>(NEWIMAGE::volume<float>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, short&, bool, int, int, int, int, int, int, bool)", referenced from:
> int NEWIMAGE::read_volume<float>(NEWIMAGE::volume<float>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, short&, bool) in gifbased_siena-0410b3.o
> "NEWIMAGE::handle_read_error(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
> int NEWIMAGE::read_volume<float>(NEWIMAGE::volume<float>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in gifbased_siena-0410b3.o
> int NEWIMAGE::read_volume<float>(NEWIMAGE::volume<float>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, short&, bool) in gifbased_siena-0410b3.o
> "int NEWIMAGE::save_basic_volume<float>(NEWIMAGE::volume<float> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, bool)", referenced from:
> int NEWIMAGE::save_volume<float>(NEWIMAGE::volume<float> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in gifbased_siena-0410b3.o
> "std::string::compare(char const*) const", referenced from:
> NEWIMAGE::dimarg(std::string const&) in libnewimage.a(newimage.o)
> NEWIMAGE::volume<double>::cog(std::string const&) const in libnewimage.a(newimage.o)
> NEWIMAGE::volume<float>::cog(std::string const&) const in libnewimage.a(newimage.o)
> NEWIMAGE::volume<int>::cog(std::string const&) const in libnewimage.a(newimage.o)
> NEWIMAGE::volume<short>::cog(std::string const&) const in libnewimage.a(newimage.o)
> NEWIMAGE::volume<char>::cog(std::string const&) const in libnewimage.a(newimage.o)
> MISCMATHS::get_sortindex(NEWMAT::Matrix const&, std::string const&, int) in libmiscmaths.a(miscmaths.o)
> ...
> "std::basic_ios<char, std::char_traits<char> >::widen(char) const", referenced from:
> MISCMATHS::skip_alpha(std::basic_ifstream<char, std::char_traits<char> >&) in libmiscmaths.a(miscmaths.o)
> MISCMATHS::read_ascii_matrix(std::basic_ifstream<char, std::char_traits<char> >&, int, int) in libmiscmaths.a(miscmaths.o)
> MISCMATHS::read_ascii_matrix(std::basic_ifstream<char, std::char_traits<char> >&) in libmiscmaths.a(miscmaths.o)
> std::string MISCMATHS::num2str<int>(int, int) in libmiscmaths.a(miscmaths.o)
> "std::istream& std::istream::_M_extract<double>(double&)", referenced from:
> MISCMATHS::read_ascii_matrix(std::basic_ifstream<char, std::char_traits<char> >&, int, int) in libmiscmaths.a(miscmaths.o)
> MISCMATHS::read_vest(std::string) in libmiscmaths.a(miscmaths.o)
> "std::istream::read(char*, long)", referenced from:
> MISCMATHS::read_binary_matrix(NEWMAT::Matrix&, std::basic_ifstream<char, std::char_traits<char> >&) in libmiscmaths.a(miscmaths.o)
> "std::istream::seekg(std::fpos<__mbstate_t>)", referenced from:
> MISCMATHS::skip_alpha(std::basic_ifstream<char, std::char_traits<char> >&) in libmiscmaths.a(miscmaths.o)
>
> [...MUCH MORE...]
>
> NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
> ld: symbol(s) not found for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
>
> At the beginning of the C++ code, these two lines are present:
> using namespace MISCMATHS;
> using namespace NEWIMAGE;
> but apparently this was not handled correctly for "round".
>
> In the case I add "MISCMATHS::round" to single commands, the output becomes much more verbose, as indicated above, but still dealing with MISCMATHS and NEWIMAGE. No executable is generated.
>
> Kind regards,
> Erika
>
>
> On Tue, May 8, 2018 at 4:56 PM, Matthew Webster <[log in to unmask]> wrote:
> Dear Erika,
> Can you try replacing all references to “round” in the file with "MISCMATHS::round” and then recompile?
>
> Kind Regards
> Matthew
> --------------------------------
> Dr Matthew Webster
> FMRIB Centre
> John Radcliffe Hospital
> University of Oxford
>
> > On 8 May 2018, at 14:06, Erika Molteni <[log in to unmask]> wrote:
> >
> > Thank you, Matthew, for your kind reply.
> > Here is the output:
> >
> > clang: warning: optimization flag '-fexpensive-optimizations' is not supported
> >
> > Though, afterwards, I get a long list of errors on the "round" function.
> > Here one example of many (12, all related to "round"):
> >
> > /Applications/fsl/include/miscmaths/miscmaths.h:143:7: note: candidate function
> > int round(int x);
> > ^
> > gifbased_siena.cc:403:27: error: call to 'round' is ambiguous
> > d=1; X=round(x+d*ex); Y=round(y+d*ey); Z=round(z+d*ez);
> > ^~~~~
> > Kind Regards,
> > Erika
> >
> > On Tue, May 8, 2018 at 1:39 PM, Matthew Webster <[log in to unmask]> wrote:
> > Hello,
> > Can you let me know the full output of the c++ command?
> >
> > Kind Regards
> > Matthew
> > --------------------------------
> > Dr Matthew Webster
> > FMRIB Centre
> > John Radcliffe Hospital
> > University of Oxford
> >
> >> On 4 May 2018, at 11:39, Erika Molteni <[log in to unmask]> wrote:
> >>
> >> Hello,
> >> I need to compile SIENA on a OS X Yosemite version 10.10.5 MacBookPro.
> >> I was given this line of code by a linux user
> >>
> >> c++ -Wall -ansi -pedantic -O3 -fexpensive-optimizations -I/Applications/fsl/extras/include/newmat -I/Applications/fsl/extras/include -I. -I/Applications/fsl/include -I/Applications/fsl/include -L/Applications/fsl/extras/lib -L/Applications/fsl/extras/lib -L. -L/Applications/fsl/lib -L/Applications/fsl/lib -O0 -o gifbased_siena gifbased_siena.cc -lnewimage -lmiscmaths -lfslio -lniftiio -lznz -lnewmat -lutils -lm -lz
> >>
> >> where the path to fsl is obviously the one set on my Mac.
> >> Unfortunately, though, while compiling I get errors on the "round" command, and the procedure aborts. This seems to be rather "Mac" specific.
> >>
> >> Any suggestion about how to proceed? I would be grateful for any hint.
> >> Regards,
> >> Erika
> >
> >
>
|