help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Intel Compiler] Optimisation flag does not like __va_arg_pack / undefin


From: Vincent Letocart
Subject: [Intel Compiler] Optimisation flag does not like __va_arg_pack / undefined reference to __builtin_is(finite|nan|inf)
Date: Tue, 20 Apr 2010 15:07:45 +0200
User-agent: Mutt/1.5.20 (2009-06-14)


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.

-- 
... The prejudices people feel about each other disappear when they get
to know each other.
                -- Kirk, "Elaan of Troyius", stardate 4372.5


reply via email to

[Prev in Thread] Current Thread [Next in Thread]