build problems on Ubuntu with gcc 4.6

Create issue
Issue #1122 closed
Roland Haas created an issue

Building ET trunk on a "Linux version 3.2.0-29-generic-pae (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012" Ubuntu virtual machine (32bit) I get:

COMPILING /home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/
In file included from /home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/dist.hh:20:0,
                 from /home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/
/home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/defs.hh: In function ‘int myisinf(double)’:
/home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/defs.hh:234:18: error: call of overloaded ‘isinf(const double&)’ is ambiguous
/home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/defs.hh:234:18: note: candidates are:
/usr/include/i386-linux-gnu/bits/mathcalls.h:203:1: note: int isinf(double)
/usr/include/c++/4.6/cmath:534:3: note: bool std::isinf(long double)
/usr/include/c++/4.6/cmath:530:3: note: bool std::isinf(double)
/usr/include/c++/4.6/cmath:526:3: note: bool std::isinf(float)
/home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/defs.hh: In function ‘int myisnan(double)’:
/home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/defs.hh:249:18: error: call of overloaded ‘isnan(const double&)’ is ambiguous
/home/lovelace/trunk/Cactus/arrangements/Carpet/CarpetLib/src/defs.hh:249:18: note: candidates are:
/usr/include/i386-linux-gnu/bits/mathcalls.h:236:1: note: int isnan(double)
/usr/include/c++/4.6/cmath:552:3: note: bool std::isnan(long double)
/usr/include/c++/4.6/cmath:548:3: note: bool std::isnan(double)
/usr/include/c++/4.6/cmath:544:3: note: bool std::isnan(float)
make[3]: *** [] Error 1
make[2]: *** [make.checked] Error 2
make[1]: *** [/home/lovelace/trunk/Cactus/configs/sim/lib/libthorn_CarpetLib.a] Error 2
make: *** [sim] Error 2

This might be related to . The options list used was the simfactory ubuntu.cfg one.


Comments (6)

  1. Erik Schnetter
    • removed comment

    A slightly unrelated question: Why are you using a 32 bit machine? A 64 bit machine would presumably be faster.

  2. Roland Haas reporter
    • removed comment

    I believe I had trouble getting the 64bit version to install in VirtualBox. This was on my laptop which lacks full hardware (ie. eg HVM does not work) virtualization. It would crash right at the installation menu I think. This might work on my workstation where I have a somewhat more featureful CPU.

  3. Steven R. Brandt
    • removed comment

    My compiler is gnu 4.7.2 on Fedora 17 and it shows the problem. The idiom using namespace std; isnan(x);

    is not handled correctly on my platform. Alas.

    However, this error seems tied to the use of -std=c++0x. If I compile with -std=c++03 everything appears to be fine. Maybe the fix is to remove std=c++0x from simfactory settings?

  4. Log in to comment