Dear All,
I am trying to use and compile GNUlib libraries using the above mentioned compilers (actually, I am trying to comple Octave, but the problem is related to GNULIB.)
Meanwhile I am able to compile with the 2015 compilers, the 2016 compilers give the following error
make[3]: Entering directory `/tmp/hajgato/build/Octave/4.0.0/intel-2016a/octave-4.0.0/liboctave'
CXX array/array_libarray_la-Array-b.lo
icpc: command line warning #10006: ignoring unknown option '-Wold-style-cast'
icpc: command line warning #10006: ignoring unknown option '-Wcast-align'
In file included from /usr/include/sys/types.h(220),
from ../libgnu/sys/types.h(28),
from /usr/include/stdlib.h(320),
from ../libgnu/stdlib.h(36),
from /vsc/apps/brussel/ivybridge/software/GCCcore/4.9.3/bin/../include/c++/4.9.3/cstdlib(72),
from /vsc/apps/brussel/ivybridge/software/GCCcore/4.9.3/bin/../include/c++/4.9.3/bits/stl_algo.h(59),
from /vsc/apps/brussel/ivybridge/software/GCCcore/4.9.3/bin/../include/c++/4.9.3/algorithm(62),
from array/Array.h(32),
from array/Array-b.cc(29):
../libgnu/sys/select.h(598): error: declaration is incompatible with previous "select" (declared at line 109 of "/usr/include/sys/select.h")
_GL_CXXALIAS_SYS (select, int,
^
compilation aborted for array/Array-b.cc (code 2)
make[3]: *** [array/array_libarray_la-Array-b.lo] Error 1
make[3]: Leaving directory `/tmp/hajgato/build/Octave/4.0.0/intel-2016a/octave-4.0.0/liboctave'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/hajgato/build/Octave/4.0.0/intel-2016a/octave-4.0.0/liboctave'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/hajgato/build/Octave/4.0.0/intel-2016a/octave-4.0.0'
make: *** [all] Error 2
The part of the header files where the problem is (after preporcessing):
./libgnu/sys/select.h:
./libgnu/sys/select.h(599): error: declaration is incompatible with previous "select" (declared at line 109 of "/usr/include/sys/select.h")
namespace gnulib { static int (*select) (int, fd_set *, fd_set *, fd_set *, struct timeval *) = ::select; } extern "C" int _gl_cxxalias_dummy;^ compilation aborted for pp.c (code 2)
/usr/include/sys/select.h:
extern "C" { extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); }(line 109 starts with extern int select .....
Is this a bug in the 2016 version of intel compilers or some standard were more precisely implemented? Again version 2015 compilers do not have this error, the code compiles without any problems.
There is a small testporgram (submitted on the Octave bug forum): http://savannah.gnu.org/bugs/index.php?47373