Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7957 Discussions

icpc complains over missing gcc __builtin_xxxxx functions

karsten_burger
Beginner
407 Views
Hello,

I had this problem with Mandriva Linux 2006, which ships with a gcc 4.0.1 version:

icpc -static-libcxa -c -g -DLINUX -DDEBUG -DWHOAMI="burger_savitri" -DHOST_TYPE="2.6.12-12mdksmp" -DUSE_LITTLE_ENDIAN -I. -I/mnt/heimann/vsheet2/hitrax/include/ -O0 -ip -DUSE_LIBXML2 -I/usr/include/libxml2/ -I../other -fPIC eigsrt.cpp -o eigsrt.so.o
/usr/include/c++/4.0.1/cmath(361): error: identifier "__builtin_powil" is undefined
{ return __builtin_powil(__x, __n); }
^

/usr/include/c++/4.0.1/complex(566): error: identifier "__builtin_cabsf" is undefined
__complex_abs(__complex__ float __z) { return __builtin_cabsf(__z); }
^

/usr/include/c++/4.0.1/complex(573): error: identifier "__builtin_cabsl" is undefined
{ return __builtin_cabsl(__z); }
^

/usr/include/c++/4.0.1/complex(593): error: identifier "__builtin_cargf" is undefined
__complex_arg(__complex__ float __z) { return __builtin_cargf(__z); }
^
........................


I found the easy solution to tell icc to use its own C++ headers and library:
--> compile/link with options -cxxlib-icc

Yours, Karsten
0 Kudos
6 Replies
John_O_Intel
Employee
407 Views
Hi Karsten,
I'm not sure which icpc version you are using. Have you tested this with -cxxlib-gcc ? The -cxxlib-icc option has been depracated. If it fails with -cxxlib-gcc, I'm curious what version of glibc you have (rpm -q glibc).
regards,
_
_|ohnO
0 Kudos
awinterz
Beginner
407 Views
I too am experiencing this problem when attempting to build KDE4 with icpc 9.0.

I have a Fedora Core 4 system with libstdc++-4.0.2-8.fc4

The -cxxlib-gcc option seems to help.

Also (maybe this belongs in a new thread) later in the build I get the error
undefined reference to `__gthrw_pthread_cancel(unsigned long)'

even with the -cxxlib-gcc option.

Any help you can provide much appreciated.
Regards.
0 Kudos
awinterz
Beginner
407 Views
Whoops. I was wrong, the -cxxlib-gcc doesn't help.




Another KDE dev says this "fabsf is a C99 function, as such not specified in C++ and therefore icc is allowed to not support it." So it may be that the right answer is to include math.h rather than cmath.

??

Message Edited by awinterz on 05-16-200611:27 AM

0 Kudos
TimP
Honored Contributor III
407 Views
Using math.h instead of cmath may get you past some problems with lack of support for g++ 4.0 in icpc 9.0. Generally speaking, upgrading to totally new versions of gcc may require corresponding icc upgrades.
0 Kudos
awinterz
Beginner
407 Views
Thanks for the advice. Yes, I am using gcc 4.0.2.

Do you know if icpc 9.1 will work better with this version of gcc?
0 Kudos
TimP
Honored Contributor III
407 Views
It appears that icpc 9.1 has made progress on compatibility with g++ 4. I don't know about the specifics of cmath.
0 Kudos
Reply