dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #00042
Re: a bug in building dolfin
It seems that Function.cpp needs an #include <cmath>. I have added this to
the latest cvs version (will propagate to anonymous cvs within 30
minutes).
Which other files need and #include <cmath>? For some reason it works
without including cmath on our system (Debian GNU/Linux). Other systems
seem to be somewhat more picky (which is good).
Please reply to the mailing list at dolfin-dev@xxxxxxxxxxxxxxxxxxxxxx. You
can find info on how to join the mailing list on the web page.
/Anders
> Dear Anders,
>
> I tried to build the library and I got the following error:
> make[4]: Entering directory
> `/usr/local/src/dolfin-0.4.11/src/kernel/function'
> g++-3.4.1 -DPACKAGE_NAME=\"dolfin\" -DPACKAGE_TARNAME=\"dolfin\"
> -DPACKAGE_VERSION=\"0.4.11\" -DPACKAGE_STRING=\"dolfin\ 0.4.11\"
> -DPACKAGE_BUGREPORT=\"dolfin@xxxxxxxxxxxxxxxx\" -DSTDC_HEADERS=1
> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1
> -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1
> -DHAVE_STDINT_H=1
> -DHAVE_UNISTD_H=1 -I. -I. -I../../../src/kernel/main
> -I../../../src/kernel/common -I../../../src/kernel/element
> -I../../../src/kernel/fem -I../../../src/kernel/form
> -I../../../src/kernel/function -I../../../src/kernel/io
> -I../../../src/kernel/la -I../../../src/kernel/log
> -I../../../src/kernel/main
> -I../../../src/kernel/map -I../../../src/kernel/math
> -I../../../src/kernel/mesh
> -I../../../src/kernel/ode -I../../../src/kernel/quadrature
> -I../../../src/kernel/settings -I../../../src/kernel/common
> -I../../../src/kernel/element -I../../../src/kernel/fem
> -I../../../src/kernel/form -I../../../src/kernel/function
> -I../../../src/kernel/io -I../../../src/kernel/la
> -I../../../src/kernel/log
> -I../../../src/kernel/main -I../../../src/kernel/map
> -I../../../src/kernel/math
> -I../../../src/kernel/mesh -I../../../src/kernel/ode
> -I../../../src/kernel/quadrature -I../../../src/kernel/settings
> -I../../../src/kernel/common -I../../../src/kernel/element
> -I../../../src/kernel/fem -I../../../src/kernel/form
> -I../../../src/kernel/function -I../../../src/kernel/io
> -I../../../src/kernel/la -I../../../src/kernel/log
> -I../../../src/kernel/main
> -I../../../src/kernel/map -I../../../src/kernel/math
> -I../../../src/kernel/mesh
> -I../../../src/kernel/ode -I../../../src/kernel/quadrature
> -I../../../src/kernel/settings -I../../../src/kernel/common
> -I../../../src/kernel/element -I../../../src/kernel/fem
> -I../../../src/kernel/form -I../../../src/kernel/function
> -I../../../src/kernel/io -I../../../src/kernel/la
> -I../../../src/kernel/log
> -I../../../src/kernel/main -I../../../src/kernel/map
> -I../../../src/kernel/math
> -I../../../src/kernel/mesh -I../../../src/kernel/ode
> -I../../../src/kernel/quadrature -I../../../src/kernel/settings -O3
> -funroll-loops -fomit-frame-pointer -march=athlon-xp -c DofFunction.cpp
> ....
> ....
> ...
>
>
>
> Function.cpp: In member function `dolfin::real
> dolfin::Function::abs(const
> dolfin::Node&, dolfin::real)':
> Function.cpp:133: error: `fabs' undeclared (first use this function)
> Function.cpp:133: error: (Each undeclared identifier is reported only
> once
> for
> each function it appears in.)
> Function.cpp: In member function `dolfin::real
> dolfin::Function::abs(const
> dolfin::Point&, dolfin::real)':
> Function.cpp:138: error: `fabs' undeclared (first use this function)
> Function.cpp: In member function `dolfin::real
> dolfin::Function::abs(dolfin::real, dolfin::real, dolfin::real,
> dolfin::real)':
> Function.cpp:143: error: `fabs' undeclared (first use this function)
> Function.cpp: In member function `dolfin::real
> dolfin::Function::abs(unsigned
> int, dolfin::real)':
> Function.cpp:148: error: `fabs' undeclared (first use this function)
> make[4]: *** [Function.o] Error 1
> make[4]: Leaving directory
> `/usr/local/src/dolfin-0.4.11/src/kernel/function'
> make[3]: *** [all-recursive] Error 1
> make[3]: Leaving directory
> `/usr/local/src/dolfin-0.4.11/src/kernel/function'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/usr/local/src/dolfin-0.4.11/src/kernel'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/src/dolfin-0.4.11/src'
> make: *** [all-recursive] Error 1
>
>
> with the new compiler g++-3.4.1
>
> I had to add
> #include <cmath>
>
> to the above .h file and another one in the ode directory!
> Then it compiled succesfuly!
>
> Best Regards!
> Drosos.
>
>
>