[Users] CarpetMask compilation errors

Erik Schnetter schnetter at cct.lsu.edu
Thu Jun 16 12:20:48 CDT 2011


Joshua

Can you check that the option -std=gnu++0x is part of CXXFLAGS in your
fedora.cfg?

Did you install gcc46 yourself, or as Fedora package?

It is difficult to debug this remotely. Your problem seems to be that
both the C and the C++ versions of isnan are visible at the same time,
the C version in the global namespace and the C++ version in the std
namespace.

A quick work-around would be to commend out the calls to isnan in this
file. These calls to isnan check only for errors, so you should be
fine.

-erik

On Thu, Jun 16, 2011 at 10:34 AM,  <jhar131 at cct.lsu.edu> wrote:
>  Erik,
>
>  I am using a 64 bit intel dual core laptop, with fedora 15 as the OS, I
>  am compiling with gcc version 4.6.; and I am attempting to build a
> simulation
>  with fedora.cfg.
>
>
>  Sincerely,
>
>  Joshua Harris
>
>
>
>
>
>
> Quoting Erik Schnetter <schnetter at cct.lsu.edu>:
>
>> Joshua
>>
>> C++ compilers differ in their ways in which they make C functions such
>> as isnan available. There is a standard way, but there are often also
>> additional "backward compatible" ways, and this can sometimes lead to
>> confusion. In your case, the C++ compiler sees two "different"
>> versions of isnan and thus reports an error.
>>
>> We have determined compiler options and header flags that make things
>> work for almost all standard operating systems and standard compilers.
>> We have documented these in the simulation factory
>> <http://simfactory.org>, which can also be directly accessed at
>>
>> <https://svn.cct.lsu.edu/repos/numrel/simfactory/branches/PYSIM_DEV/mdb/optionlists/>.
>>
>> What machine, operating system, and compiler are you using? Your best
>> bet is probably to start with the options for a machine most closely
>> to your setup.
>>
>> -erik
>>
>> On Wed, Jun 15, 2011 at 4:58 PM,  <jhar131 at cct.lsu.edu> wrote:
>>>
>>> Hello,
>>>
>>> I'm having problems with CarpetMask when I attempt to build a
>>> simulation. Included are my error messages. Does anyone have any
>>> suggestions?
>>>
>>>
>>> Preprocessing
>>> /home/joshua/Cactus/arrangements/Carpet/CarpetMask/src/mask_surface.cc
>>> Compiling
>>> /home/joshua/Cactus/arrangements/Carpet/CarpetMask/src/mask_surface.cc
>>> /home/joshua/Cactus/arrangements/Carpet/CarpetMask/src/mask_surface.cc:
>>> In
>>> function ?void CarpetMask::CarpetSurfaceSetup(cGH*)?:
>>>
>>> /home/joshua/Cactus/arrangements/Carpet/CarpetMask/src/mask_surface.cc:111:19:
>>> error: call of overloaded ?isnan(double&)? is ambiguous
>>>
>>> /home/joshua/Cactus/arrangements/Carpet/CarpetMask/src/mask_surface.cc:111:19:
>>> note: candidates are:
>>> /usr/include/bits/mathcalls.h:235:1: note: int isnan(double)
>>>
>>> /usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/cmath:558:3:
>>> note: bool  std::isnan(long
>>> double)
>>>
>>> /usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/cmath:554:3:
>>> note:  bool
>>> std::isnan(double)
>>>
>>> /usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/cmath:550:3:
>>> note:  bool
>>> std::isnan(float)
>>>
>>> /home/joshua/Cactus/arrangements/Carpet/CarpetMask/src/mask_surface.cc:128:19:
>>> error: call of overloaded ?isnan(double&)? is ambiguous
>>>
>>> /home/joshua/Cactus/arrangements/Carpet/CarpetMask/src/mask_surface.cc:128:19:
>>> note: candidates are:
>>> /usr/include/bits/mathcalls.h:235:1: note: int isnan(double)
>>>
>>> /usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/cmath:558:3:
>>> note: bool  std::isnan(long
>>> double)
>>>
>>> /usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/cmath:554:3:
>>> note:  bool
>>> std::isnan(double)
>>>
>>> /usr/lib/gcc/x86_64-redhat-linux/4.6.0/../../../../include/c++/4.6.0/cmath:550:3:
>>> note:  bool
>>> std::isnan(float)
>>> make[3]: *** [mask_surface.cc.o] Error 1
>>> make[2]: *** [make.checked] Error 2
>>> make[1]: ***
>>> [/home/joshua/Cactus/configs/ConfigName/lib/libthorn_CarpetMask.a]
>>> Error 2
>>> make[1]: *** Waiting for unfinished jobs....
>>>
>>>
>>>
>>> Sincerely,
>>>
>>> Joshua Harris
>>>
>>> _______________________________________________
>>> 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/
>>
>
>
>
>



-- 
Erik Schnetter <schnetter at cct.lsu.edu>   http://www.cct.lsu.edu/~eschnett/


More information about the Users mailing list