[Users] Question: odd compilation failure
Erik Schnetter
schnetter at cct.lsu.edu
Fri Oct 15 09:44:23 CDT 2010
Richard
There are several dialects of C, and several common extensions. It
turns out that M_PI is not part of the core C standard, but only of
the POSIX standard. This doesn't mean much in practice, since POSIX
(basically Unix) is available on all common systems. Your problem here
is that your compiler, by default, doesn't enable POSIX.
What compiler and what version are you using? We have figured out what
compiler options enable POSIX for most systems, so this may be easy to
do.
-erik
On Fri, Oct 15, 2010 at 7:03 AM, Richard O'Shaughnessy
<oshaughn at gravity.phys.uwm.edu> wrote:
> Hello,
>
> While setting up a local cluster, I've run into a problem I just don't
> understand when compiling. It seems that the compiler's not finding
> <math.h>! (for one program, at least) To this point, the compilation
> procedure has proceeded without trouble; I've successfully compiled on other
> machines.
>
> Thoughts?
>
> Thanks,
>
> -Richard
>
> PS: for reference, the compilation is below
>
> [oshaughn at hydra Cactus]$ ./simfactory/sim build
> --thornlist=manifest/einsteintoolkit.th
> --optionlist=simfactory/optionlists/hydra.cfg
> </cut>
> Checking status of thorn LoopControl
> ________________________________________________________________________
> Preprocessing
> /home/oshaughn/Numerical/EinsteinToolkit/Cactus/arrangements/Carpet/LoopControl/src/wavetoy-loopcontrol.c
> Compiling
> /home/oshaughn/Numerical/EinsteinToolkit/Cactus/arrangements/Carpet/LoopControl/src/wavetoy-loopcontrol.c
> /home/oshaughn/Numerical/EinsteinToolkit/Cactus/arrangements/Carpet/LoopControl/src/wavetoy-loopcontrol.c:
> In function 'lc_demo':
> /home/oshaughn/Numerical/EinsteinToolkit/Cactus/arrangements/Carpet/LoopControl/src/wavetoy-loopcontrol.c:183:
> error: 'M_PI' undeclared (first use in this function)
> /home/oshaughn/Numerical/EinsteinToolkit/Cactus/arrangements/Carpet/LoopControl/src/wavetoy-loopcontrol.c:183:
> error: (Each undeclared identifier is reported only once
> /home/oshaughn/Numerical/EinsteinToolkit/Cactus/arrangements/Carpet/LoopControl/src/wavetoy-loopcontrol.c:183:
> error: for each function it appears in.)
> Richard O'Shaughnessy oshaughn at gravity.phys.uwm.edu
> 462 Physics Building Phone: 414 229 6674
> Center for Gravitation and Cosmology
> University of Wisconsin, Milwaukee 53211
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>
>
--
Erik Schnetter <schnetter at cct.lsu.edu> http://www.cct.lsu.edu/~eschnett/
More information about the Users
mailing list