Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kimberley_Jarvis
Beginner
59 Views

C++ icpc compiler suite 11.1.072, g++ 4.4.3 and __builtin_isfinite

The problem C++ icpc, g++ 4.3.0 and __builtin_isfinite was apparently fixed by DPD200136852. However, this problem reoccurs with gcc 4.4.3 and causes problems with Boost.

Program:
#include
using namespace std;

int main() {
isfinite(4.0f);
return 0;
}

Console:
Building target: hello
Invoking: Intel Intel 64 C++ Linker
icpc -o"hello" ./src/hello.o
./src/hello.o: In function `main':
../src/hello.cpp:(.text+0x31): undefined reference to `__builtin_isfinite'
make: *** [hello] Error 1

Thread for gcc 4.3.0

http://software.intel.com/en-us/forums/showthread.php?t=64188

The temporary fix last time around was to load libraries for gcc 4.2 and somehow point the compiler to them.
0 Kudos
3 Replies
Kimberley_Jarvis
Beginner
59 Views

As I understand it, this was a problem in gcc 4.3.0 and it was fixed until gcc 4.3.4 but is now broken again in gcc 4.4.3. The problem is related to C99 compliant maths functions in the cmath header supplied with gcc. It is significant because applications using the boost format and the boost graph library do not compile with the latest version of the intel compiler.
gcc 4.4.3 is the default with Ubuntu 10.04 lucid. I installed 4.4.3 and 4.3.4 side by side using update-alternatives as described in this post.
I tried specifying the path to gcc as a compiler option. It didn't seem to make any difference. Then I used update-alternatives to switch the default gcc to 4.3.4 and the program compiled.
So the work around for Ubuntu 10.04 is to to install gcc 4.3.4 and switch using update-alternatives.
cathune2
Beginner
59 Views

A nicer approach than using 'update-alternatives' is passing the option '-gxx-name=' to the intel compiler. is the name of a non-standard g++ version you have installed on your system, e.g. g++-4.3. This informs the intel compiler to use the enviroment of that compiler. You can even get rid of passing this extra compiler option at every call by adding it to the icpc.cfg file which is in the same directory as the icpc executable.
Kimberley_Jarvis
Beginner
59 Views

Supplying the gcc version as a compiler option did not seem to fix the errors. I understand that it should work, it changes the path that the headers are picked up from, and that other users reported success with version 4.3.0. However, it didn't seem to work when I tried it. Anyway; these are just workarounds. The real problem is that build variables have to defined differently before cmath.h is included in order to support gcc 4.4.3.

Apart from posting here are there any other actions I can take which will make Intel aware of this problem?
Reply