Hi Mark,
I found in the file
$FSLDIR/src/fslsurface/fslsurface_structs.h
the line
// #include <cmath>
so the include command is commented out. I removed the comment slashes,
and now recompiling works just fine.
I controlled all my workflow, also found a mistake I did when following
the wiki guide (I was compiling with the wrong gcc version, 4.7 instead
of 4.6 in $FSLMACHTYPE). But afterwards I tried it again, to be sure and
still it did not work. As last bug testing step I reset the ARCHFLAGS
(-m64 instead of -march=corei7-avx ) still nope.
So, maybe this problem+solution could be saved somewhere.
I'm to novice to understand this sqrt-gcc-problem, but _maybe_ this
problem was introduced with gcc version 4.6, see
http://gcc.gnu.org/gcc-4.6/porting_to.html
If it would be a bug, you should see it when compiling with gcc version
4.4 (since the configfiles are included in the fsl source tarball).
(I tried testing... but I ran over so much problems :) sorry)
Greetings,
Matthias
> Hi,
>
> It looks like this is a problem with the float sqrt(float ) function. =20
> I would look into whether you need to explicitly use a namespace for this f=
> unction, 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]
> E>
> wrote:
>
> > Hey,
> >=20
> > 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:
> >=20
> > ARCHFLAGS =3D -march=3Dcorei7-avx
> >=20
> > I've added the fslsurface part of build.log below.
> >=20
> > Do you have any ideas?
> >=20
> > Thanks,
> > Matthias
> >=20
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >=20
> >=20
> > Making project src/fslsurface
> >=20
> > /bin/rm -f /tmp/fslgrot *.o *.a *.exe core depend.mk
> > /bin/rm -f /tmp/fslgrot fslsurfacemaths=20
> > /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=3Dcorei7-avx -O3 -fexp=
> ensive-optimizations -march=3Dcorei7-avx -I/home/matthias/fslbuild/fsl/extr=
> as/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/h=
> ome/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/incl=
> ude/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fsl=
> build/fsl/include -c -o fslsurfacefns.o fslsurfacefns.cc
> > fslsurfacefns.cc: In instantiation of =91void 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 =3D float; T2 =3D=
> unsigned int]=92:
> > fslsurfacefns.cc:704:17: required from =91void fslsurface_name::sc_smoo=
> th_gaussian_geodesic(fslsurface_name::fslSurface<T, T2>&, const unsigned in=
> t&, const T&, const T&, bool) [with T =3D float; T2 =3D unsigned int]=92
> > fslsurfacefns.cc:947:173: required from here
> > fslsurfacefns.cc:510:22: warning: variable =91notFoundDup=92 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 =91double fslsurface_name::ve=
> c3<T>::norm() [with T =3D float]=92:
> > fslsurfacefns.cc:1960:36: required from =91void fslsurface_name::writeT=
> imeSeries(const fslsurface_name::fslSurface<T, T2>&, NEWIMAGE::volume4D<S1>=
> &, const string&) [with T =3D float; T2 =3D unsigned int; std::string =3D s=
> td::basic_string<char>]=92
> > fslsurfacefns.cc:1978:185: required from here
> > ./fslsurface_structs.h:141:44: error: =91sqrt=92 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/miscm=
> aths.h:77:0,
> > from /home/matthias/fslbuild/fsl/include/newimage/newimag=
> e.h:81,
> > from /home/matthias/fslbuild/fsl/include/newimage/newimag=
> eall.h:72,
> > from ./fslsurfacefns.h:72,
> > from fslsurfacefns.cc:64:
> > /usr/include/c++/4.7/cmath:485:3: note: =91float std::sqrt(float)=92 decl=
> ared here, later in the translation unit
> > In file included from ./fslsurfacefns.h:70:0,
> > from fslsurfacefns.cc:64:
> > ./fslsurface_structs.h: In instantiation of =91void fslsurface_name::vec3=
> <T>::normalize() [with T =3D float]=92:
> > fslsurfacefns.cc:522:25: required from =91void fslsurface_name::conn2di=
> st(fslsurface_name::fslSurface<T, T2>&, const T2&, std::list<std::pair<T2, =
> T2> >&, std::vector<std::list<std::pair<T2, T> > >&) [with T =3D float; T2 =
> =3D unsigned int]=92
> > fslsurfacefns.cc:704:17: required from =91void fslsurface_name::sc_smoo=
> th_gaussian_geodesic(fslsurface_name::fslSurface<T, T2>&, const unsigned in=
> t&, const T&, const T&, bool) [with T =3D float; T2 =3D unsigned int]=92
> > fslsurfacefns.cc:947:173: required from here
> > ./fslsurface_structs.h:134:9: error: =91sqrt=92 was not declared in this =
> scope, and no declarations were found by argument-dependent lookup at the p=
> oint of instantiation [-fpermissive]
> > In file included from /home/matthias/fslbuild/fsl/include/miscmaths/miscm=
> aths.h:77:0,
> > from /home/matthias/fslbuild/fsl/include/newimage/newimag=
> e.h:81,
> > from /home/matthias/fslbuild/fsl/include/newimage/newimag=
> eall.h:72,
> > from ./fslsurfacefns.h:72,
> > from fslsurfacefns.cc:64:
> > /usr/include/c++/4.7/cmath:485:3: note: =91float std::sqrt(float)=92 decl=
> ared here, later in the translation unit
> > make: *** [fslsurfacefns.o] Fehler 1
> > c++ -Wall -ansi -pedantic -Wno-long-long -march=3Dcorei7-avx -O3 -fexp=
> ensive-optimizations -march=3Dcorei7-avx -I/home/matthias/fslbuild/fsl/extr=
> as/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/h=
> ome/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/incl=
> ude/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fsl=
> build/fsl/include -c -o fslsurfaceio.o fslsurfaceio.cc
> > c++ -Wall -ansi -pedantic -Wno-long-long -march=3Dcorei7-avx -O3 -fexp=
> ensive-optimizations -march=3Dcorei7-avx -I/home/matthias/fslbuild/fsl/extr=
> as/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/h=
> ome/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/incl=
> ude/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fsl=
> build/fsl/include -c -o fslsurface.o fslsurface.cc
> > c++ -Wall -ansi -pedantic -Wno-long-long -march=3Dcorei7-avx -O3 -fexp=
> ensive-optimizations -march=3Dcorei7-avx -I/home/matthias/fslbuild/fsl/extr=
> as/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/h=
> ome/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/incl=
> ude/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fsl=
> build/fsl/include -c -o fslsurface_first.o fslsurface_first.cc
> > c++ -Wall -ansi -pedantic -Wno-long-long -march=3Dcorei7-avx -O3 -fexp=
> ensive-optimizations -march=3Dcorei7-avx -I/home/matthias/fslbuild/fsl/extr=
> as/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/h=
> ome/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/incl=
> ude/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fsl=
> build/fsl/include -c -o fslsurface_dataconv.o fslsurface_dataconv.cpp
> > c++ -Wall -ansi -pedantic -Wno-long-long -march=3Dcorei7-avx -O3 -fexp=
> ensive-optimizations -march=3Dcorei7-avx -I/home/matthias/fslbuild/fsl/extr=
> as/include/newmat -I/home/matthias/fslbuild/fsl/extras/include/libprob -I/h=
> ome/matthias/fslbuild/fsl/extras/include -I/home/matthias/fslbuild/fsl/incl=
> ude/niftiio -I. -I/home/matthias/fslbuild/fsl/include -I/home/matthias/fsl=
> build/fsl/include -c -o fslsurfacemaths.o fslsurfacemaths.cpp
> > make: Das Target =BBall=AB wurde wegen Fehlern nicht aktualisiert.
> >=20
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=20
> > ERROR::Could not make fslsurface successfully
>
|