Hi,
It looks like this is a problem with the float sqrt(float ) function.
I would look into whether you need to explicitly use a namespace for this function, or whether you need to change the includes appropriately.
All the best,
Mark
On 22 Jan 2014, at 21:49, Matthias Heil <[log in to unmask]>
wrote:
> Hey,
>
> I tried to compile fsl from source to optimize it for our "super"computer. Most of it did work fine, except that it didnt work for
> fslsurface and (probably depend) film/ptx2. I followed the guide from the wiki and only changed one compiler option in
> systemvars.mk:
>
> ARCHFLAGS = -march=corei7-avx
>
> I've added the fslsurface part of build.log below.
>
> Do you have any ideas?
>
> Thanks,
> Matthias
>
> ===========
>
>
> Making project src/fslsurface
>
> /bin/rm -f /tmp/fslgrot *.o *.a *.exe core depend.mk
> /bin/rm -f /tmp/fslgrot fslsurfacemaths
> /home/matthias/fslbuild/fsl/config/common/rules.mk:320: depend.mk: Datei oder Verzeichnis nicht gefunden
> Building dependency file depend.mk
> c++ -Wall -ansi -pedantic -Wno-long-long -march=corei7-avx -O3 -fexpensive-optimizations -march=corei7-avx -I/home/matthias/fslbuild/fsl/extras/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/home/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/include/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fslbuild/fsl/include -c -o fslsurfacefns.o fslsurfacefns.cc
> fslsurfacefns.cc: In instantiation of ‘void fslsurface_name::conn2dist(fslsurface_name::fslSurface<T, T2>&, const T2&, std::list<std::pair<T2, T2> >&, std::vector<std::list<std::pair<T2, T> > >&) [with T = float; T2 = unsigned int]’:
> fslsurfacefns.cc:704:17: required from ‘void fslsurface_name::sc_smooth_gaussian_geodesic(fslsurface_name::fslSurface<T, T2>&, const unsigned int&, const T&, const T&, bool) [with T = float; T2 = unsigned int]’
> fslsurfacefns.cc:947:173: required from here
> fslsurfacefns.cc:510:22: warning: variable ‘notFoundDup’ set but not used [-Wunused-but-set-variable]
> In file included from ./fslsurfacefns.h:70:0,
> from fslsurfacefns.cc:64:
> ./fslsurface_structs.h: In instantiation of ‘double fslsurface_name::vec3<T>::norm() [with T = float]’:
> fslsurfacefns.cc:1960:36: required from ‘void fslsurface_name::writeTimeSeries(const fslsurface_name::fslSurface<T, T2>&, NEWIMAGE::volume4D<S1>&, const string&) [with T = float; T2 = unsigned int; std::string = std::basic_string<char>]’
> fslsurfacefns.cc:1978:185: required from here
> ./fslsurface_structs.h:141:44: error: ‘sqrt’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
> In file included from /home/matthias/fslbuild/fsl/include/miscmaths/miscmaths.h:77:0,
> from /home/matthias/fslbuild/fsl/include/newimage/newimage.h:81,
> from /home/matthias/fslbuild/fsl/include/newimage/newimageall.h:72,
> from ./fslsurfacefns.h:72,
> from fslsurfacefns.cc:64:
> /usr/include/c++/4.7/cmath:485:3: note: ‘float std::sqrt(float)’ declared here, later in the translation unit
> In file included from ./fslsurfacefns.h:70:0,
> from fslsurfacefns.cc:64:
> ./fslsurface_structs.h: In instantiation of ‘void fslsurface_name::vec3<T>::normalize() [with T = float]’:
> fslsurfacefns.cc:522:25: required from ‘void fslsurface_name::conn2dist(fslsurface_name::fslSurface<T, T2>&, const T2&, std::list<std::pair<T2, T2> >&, std::vector<std::list<std::pair<T2, T> > >&) [with T = float; T2 = unsigned int]’
> fslsurfacefns.cc:704:17: required from ‘void fslsurface_name::sc_smooth_gaussian_geodesic(fslsurface_name::fslSurface<T, T2>&, const unsigned int&, const T&, const T&, bool) [with T = float; T2 = unsigned int]’
> fslsurfacefns.cc:947:173: required from here
> ./fslsurface_structs.h:134:9: error: ‘sqrt’ was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
> In file included from /home/matthias/fslbuild/fsl/include/miscmaths/miscmaths.h:77:0,
> from /home/matthias/fslbuild/fsl/include/newimage/newimage.h:81,
> from /home/matthias/fslbuild/fsl/include/newimage/newimageall.h:72,
> from ./fslsurfacefns.h:72,
> from fslsurfacefns.cc:64:
> /usr/include/c++/4.7/cmath:485:3: note: ‘float std::sqrt(float)’ declared here, later in the translation unit
> make: *** [fslsurfacefns.o] Fehler 1
> c++ -Wall -ansi -pedantic -Wno-long-long -march=corei7-avx -O3 -fexpensive-optimizations -march=corei7-avx -I/home/matthias/fslbuild/fsl/extras/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/home/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/include/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fslbuild/fsl/include -c -o fslsurfaceio.o fslsurfaceio.cc
> c++ -Wall -ansi -pedantic -Wno-long-long -march=corei7-avx -O3 -fexpensive-optimizations -march=corei7-avx -I/home/matthias/fslbuild/fsl/extras/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/home/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/include/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fslbuild/fsl/include -c -o fslsurface.o fslsurface.cc
> c++ -Wall -ansi -pedantic -Wno-long-long -march=corei7-avx -O3 -fexpensive-optimizations -march=corei7-avx -I/home/matthias/fslbuild/fsl/extras/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/home/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/include/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fslbuild/fsl/include -c -o fslsurface_first.o fslsurface_first.cc
> c++ -Wall -ansi -pedantic -Wno-long-long -march=corei7-avx -O3 -fexpensive-optimizations -march=corei7-avx -I/home/matthias/fslbuild/fsl/extras/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/home/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/include/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fslbuild/fsl/include -c -o fslsurface_dataconv.o fslsurface_dataconv.cpp
> c++ -Wall -ansi -pedantic -Wno-long-long -march=corei7-avx -O3 -fexpensive-optimizations -march=corei7-avx -I/home/matthias/fslbuild/fsl/extras/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/home/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/include/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fslbuild/fsl/include -c -o fslsurfacemaths.o fslsurfacemaths.cpp
> make: Das Target »all« wurde wegen Fehlern nicht aktualisiert.
>
> =========================
> ERROR::Could not make fslsurface successfully
|