[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Intel Compiler] Optimisation flag does not like __va_arg_pack / und
From: |
Vincent Letocart |
Subject: |
Re: [Intel Compiler] Optimisation flag does not like __va_arg_pack / undefined reference to __builtin_is(finite|nan|inf) |
Date: |
Wed, 21 Apr 2010 09:17:13 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On 21 April 2010, at 06:51:43 (Epoch+1271829103 sec), Jaroslav Hajek wrote :
> On Tue, Apr 20, 2010 at 3:07 PM, Vincent Letocart
> <address@hidden> wrote:
> >
> >
> > I'm struggling to get octave compiled with the Intel Compiler
> > Suite (11.1-069) on a Linux SLES 11.0.
> >
> > Here is the context:
> >
> > > uname -a
> > Linux tethys 2.6.27.45-0.1-default #1 SMP 2010-02-22 16:49:47 +0100
> > x86_64 x86_64 x86_64 GNU/Linux
> >
> > > icc --version
> > icc (ICC) 11.1 20100203
> > Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
> >
> > > ifort --version
> > ifort (IFORT) 11.1 20100203
> > Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
> >
> > > icpc --version
> > icpc (ICC) 11.1 20100203
> > Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
> >
> > > gcc --version
> > gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
> > Copyright (C) 2008 Free Software Foundation, Inc.
> > This is free software; see the source for copying conditions. There
> > is NO
> > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> > PURPOSE.
> >
> >
> > I have actually two sort of errors. I also chosed for reproducing the
> > errors with a very minimal
> > set of flags activated:
> >
> > ./configure CPP=cpp CC=icc F77=ifort CXX=icpc CPPFLAGS='-w' CFLAGS='-w'
> > FFLAGS='-w' CXXFLAGS='-w'
> > then
> > make [or make -j 8, whatever]
> >
> >
> >
> >
> > An error is related to something called __va_arg_pack. Executing the
> > command by hand reproduces the
> > error [here for instance, with octave-3.2.4]:
> >
> > src> icpc -c -w -I/usr/include/freetype2 -fPIC -I. -I..
> > -I../liboctave -I../src -I../libcruft/misc -DHAVE_CONFIG_H -Wall -W
> > -Wshadow -Wold-style-cast -Wformat -w -I/usr/include/freetype2 -pthread
> > -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector
> > -funwind-tables -fasynchronous-unwind-tables -g -fno-strict-aliasing
> > -D_THREAD_SAFE -D_REENTRANT ./DLD-FUNCTIONS/fltk_backend.cc -o
> > pic/fltk_backend.o
> > /usr/include/bits/wchar2.h(290): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __fmt, __va_arg_pack ());
> > ^
> > /usr/include/bits/wchar2.h(291): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > return __swprintf_alias (__s, __n, __fmt, __va_arg_pack ());
> > ^
> > /usr/include/bits/wchar2.h(340): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > return __wprintf_chk (__USE_FORTIFY_LEVEL - 1, __fmt,
> > __va_arg_pack ());
> > ^
> > /usr/include/bits/wchar2.h(347): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __va_arg_pack ());
> > ^
> > /usr/include/bits/stdio2.h(35): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __bos (__s), __fmt, __va_arg_pack
> > ());
> > ^
> > /usr/include/bits/stdio2.h(66): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __bos (__s), __fmt, __va_arg_pack
> > ());
> > ^
> > /usr/include/bits/stdio2.h(99): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __va_arg_pack ());
> > ^
> > /usr/include/bits/stdio2.h(105): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt,
> > __va_arg_pack ());
> > ^
> > /usr/include/bits/stdio2.h(159): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __va_arg_pack ());
> > ^
> > /usr/include/bits/stdio2.h(167): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __va_arg_pack ());
> > ^
> > /usr/include/bits/stdio2.h(174): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __va_arg_pack ());
> > ^
> > /usr/include/bits/stdio2.h(182): error: identifier
> > "__builtin_va_arg_pack" is undefined
> > __va_arg_pack ());
> > ^
> > compilation aborted for ./DLD-FUNCTIONS/fltk_backend.cc (code 2)
> >
> >
> > Strangely, replacing '-O2' by '-O0' in the command line above causes the
> > compilation of that
> > file to succeed.
> >
> > Another error involves some of the "builtin functions"" coming with the
> > last gcc versions.
> > Again the octave version does not matter: 3.2.2, 3.2.4 or 3.3.51, I see no
> > way to
> > bypass the problem.
> >
> >
> > icpc -w -I/usr/include/freetype2 -I. -I.. -I../liboctave -I../src
> > -I../libcruft/misc -DHAVE_CONFIG_H -Wall -W -Wshadow -Wold-style-cast
> > -Wformat -w -I/usr/include/freetype2 -pthread -rdynamic \
> > -L.. -fPIC -o octave \
> > main.o \
> > -L../liboctave -L../libcruft -L../src -Wl,-rpath
> > -Wl,/usr/local/lib/octave-3.2.4 \
> > -loctinterp -loctave -lcruft \
> > \
> > \
> > -lfftw3 -lfftw3f -L/usr/X11R6/lib -lGL -lGLU \
> > -lX11 -lreadline -lncurses -ldl -lz -lm -lfreetype -lz
> > -L/usr/X11R6/lib -lGL -lGLU -lz -L/opt/intel/Compiler/11.1/069/lib/intel64
> > -limf -lm -lfreetype -L/usr/X11R6/lib -lGL -lGLU
> > -L/opt/intel/Compiler/11.1/069/mkl/lib/em64t -L/usr/local/lib64
> > -L/usr/local/lib64/../lib64 -L/usr/lib64/gcc/x86_64-suse-linux/4.3
> > -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../lib64 -L/lib/../lib64
> > -L/usr/lib/../lib64
> > -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/lib
> > -L/usr/lib64/gcc/x86_64-suse-linux/4.3/../../.. -L/lib64 -L/lib
> > -L/usr/lib64 -L/usr/lib -lifport -lifcore -lsvml -lipgo -lirc -lpthread
> > -lirc_s -ldl
> > ../src/liboctinterp.so: undefined reference to `__builtin_isfinite'
> > ../src/liboctinterp.so: undefined reference to `__builtin_isnan'
> > ../src/liboctinterp.so: undefined reference to `__builtin_isinf'
> > make[2]: *** [octave] Error 1
> > make[2]: Leaving directory `/usr/local/src/octave-3.2.4/src'
> >
> >
> > In the list of alternatives, I made an attempt to set optimization flag to
> > -O0, an attempt
> > to redefine those __builtin* symbols at link time, but I got no optimistic
> > result (other
> > symbols not found, or an usable octave binary).
> >
> >
> >
> > Does anyone know a way to avoid those problems ? Magic flag, or even some
> > substitution
> > to apply to the configure/Makefile ? What other information should be
> > useful ?
> >
> >
> > Thanks for your time
> >
> > VincneT.
> >
> > --
>
> Intel C++ is designed to work with gcc's headers, so it's supposed to
> either recognize gcc's builtins, or use a replacement header. So I
> think it's a problem in Intel C++. A quick search turned this up:
> http://software.intel.com/en-us/forums/showthread.php?t=64188
> it seems to confirm it's an Intel C++ bug. However, there's no
> definite hint of a working version.
>
> The only advice I can give you is to compile gcc 4.1.x, that works for
> me with Intel C++ 11.0.
>
> hth
I agree with your relevant remark: they aim at making compatible compilers.
However, that problem would have been fixed since 11.1-057:
http://software.intel.com/en-us/articles/intel-professional-edition-compilers-111-fixes-list/
On the other side, I feel a bit screwed by the SLES 11, as the
default gcc version coming with that release is 4.3.3.
I have two other options: a guru tells me some tricky tips to get
it working with gcc 4.3.x (flag, change in config/Makefile), or
I pray a lot again and substitue the "compiler-triplet" (icc,ifort,icpc)
by (gcc,ifort,g++) version 4.3.3 ?
Vincent.
--
Military secrets are the most fleeting of all.
-- Spock, "The Enterprise Incident", stardate 5027.4