Skip Menu |
 

Subject: Problems using Intel C compiler on trunk builds
Download (untitled) / with headers
text/plain 1.2KiB
There are several issues in using Intel's C compiler in building krb5.
The compiler is "interesting" in that it pretends to look like the GNU
compiler - by defining __GCC__ and other version specific defines.
Therefore, for the source tree configuration, it believes it is working
with gcc...

Why would want to use icc instead of gcc? Well different compilers pick
up different problems - and help improve portability.

There are three issues (at least):
a) gssftp/ftp does not compile - this is a simple problem of ordering
inclusion of ftp_var.h and signal.h - in some source files it is one way,
and others the reverse. This creates a redefinition problem in the
signal handler macros we use.

b) While icc does know a number of gcc -W constructs - it does not know
all of them. Instead of having a fatal error - it produces a warning.
This results in four warnings per file compiled... Annoying but not
fatal.

c) The thread detection is giving warnings during configuration - and
comparison on config.cache from icc and gcc build trees indicates that
there may be some problems in detecting reentrant functions and thread
support.

I have a fix for (a) but need to do some multiplatform compilation to
verify it does not break anything.
Download (untitled) / with headers
text/plain 1.5KiB
Show quoted text
> There are several issues in using Intel's C compiler in building krb5.
> The compiler is "interesting" in that it pretends to look like the GNU
> compiler - by defining __GCC__ and other version specific defines.

Well that's kind of rude. :) Unless it's actually based on gcc, but given that it seems to be
licensed commercially or for personal use only (if I'm looking at the right web pages), I doubt
that would be the case.

Show quoted text
> Why would want to use icc instead of gcc? Well different compilers
> pick
> up different problems - and help improve portability.

Sure. Maybe not enough for us to pay for the academic license, but if you've got it anyways,
and can point us at specific problems....

Show quoted text
> b) While icc does know a number of gcc -W constructs - it does not
> know
> all of them. Instead of having a fatal error - it produces a warning.
> This results in four warnings per file compiled... Annoying but not
> fatal.

If you can tell me which ones, I can probably write a configure test to see if they work in a
given compiler. I assume adding -Werror will make it fatal, making the test fairly
straightforward? (Or, if you want to do it, I think the test for support for -Wno-format-zero-
length may be a good starting point.)

Show quoted text
> c) The thread detection is giving warnings during configuration - and
> comparison on config.cache from icc and gcc build trees indicates that
> there may be some problems in detecting reentrant functions and thread
> support.

Hm, that's kind of annoying. And hard to debug indirectly...