compiler errors with intel c++
Hello, When I make the cln lib with Intel C++ compiler, it gives the following error messages: /bin/sh ../libtool --tag=CXX --mode=compile icpc -DHAVE_CONFIG_H -I. -I../autoconf -I../include -I../src -I../include -I../src -O2 -xAVX -axAVX -parallel -vec-report -MT cl_C_cis.lo -MD -MP -MF .deps/cl_C_cis.Tpo -c -o cl_C_cis.lo `test -f 'complex/transcendental/cl_C_cis.cc' || echo './'`complex/transcendental/cl_C_cis.cc libtool: compile: icpc -DHAVE_CONFIG_H -I. - I../autoconf -I../include -I../src -I../include -I../src -O2 -xAVX -axAVX -parallel -vec-report -MT cl_C_cis.lo -MD -MP -MF .deps/cl_C_cis.Tpo -c complex/transcendental/cl_C_cis.cc -fPIC -DPIC -o .libs/cl_C_cis.o complex/transcendental/cl_C_cis.cc(24): error: argument is incompatible with formal parameter var cos_sin_t trig = cos_sin(x); ^ complex/transcendental/cl_C_cis.cc(31): error: argument is incompatible with formal parameter var cos_sin_t trig_a = cos_sin(a); // cos(a), sin(a) errechnen ^ compilation aborted for complex/transcendental/cl_C_cis.cc (code 2) make[1]: *** [cl_C_cis.lo] Error 1 make[1]: Leaving directory `/home/cln-1.3.2/src' make: *** [all-recursive] Error 1 Slackware Linux 64bit Kernel version 2.6.37.6 Intel i5-2400 proc. Intel(R) C++ Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 12.0.4.191 Build 20110427 Copyright (C) 1985-2011 Intel Corporation. Added compiler options: -O2 -xAVX -axAVX -parallel -vec-report What can I do to correct this? Thanks. Tamas Istvan
Hi, On 08/14/2011 03:24 PM, Tamas Istvan wrote:
complex/transcendental/cl_C_cis.cc(24): error: argument is incompatible with formal parameter
var cos_sin_t trig = cos_sin(x);
Indeed. For some obscure reason Intel's compiler seems to dislike functions named cos_sin. Compiling this innocuous little program: int cos_sin(); int main() { int x = cos_sin(); } fails with the same error using ICC 12.0.5.
What can I do to correct this?
Switch to one of the excellent free compilers out there: GCC or CLang! (Please correct me if I'm being unfair to Intel, but GCC and CLang have the added benefit that, unlike Intel, their developers really do care about improving their product: they both have an open bug reporting system and are, in most cases, quite responsive. A bug like this one would be trivial to report and get fixed. I even failed reporting the bug at Intel's site.) -richy. -- Richard B. Kreckel <http://www.ginac.de/~kreckel/>
participants (2)
-
Richard B. Kreckel
-
Tamas Istvan