Discussion:
[Users] strdup test with intel compilers
Michael Clark
2015-06-16 16:04:52 UTC
Permalink
With intel compilers, I've observed that the configure check for strdup
(lib/make/configure.in line 494, using CCTK_CHECK_HAS_PROTOTYPE) can fail
despite strdup being defined in string.h.

The test for this seems to rely on compilation of code with "int strdup()"
forward declared failing if the strdup prototype already exists, but on two
machines I'm using currently, the intel compiler only generates a
*warning*, not an *error*, and considers compilation to have "succeeded."
Since compilation "succeeded", the test fails, even though strdup's
prototype is available.

This can be worked around by adding the flag -diag-error 147 (the id code
for this diagnostic). Is this what end-users should be expected to do?
Roland Haas
2015-06-16 17:06:02 UTC
Permalink
Hello Michael,
Post by Michael Clark
The test for this seems to rely on compilation of code with "int strdup()"
forward declared failing if the strdup prototype already exists, but on two
machines I'm using currently, the intel compiler only generates a
*warning*, not an *error*, and considers compilation to have "succeeded."
Since compilation "succeeded", the test fails, even though strdup's
prototype is available.
This should be fixed git hash ea40379c1d7e5b3c009793ef2f75865e876c4e4f
from 2015-06-14 23:46:04 which (and the couple of next commits) removes
the use of "int strdup()". Can you try and update your flesh (cd
repos/flesh ; git pull -r) and report if the error still occurs, please?
Post by Michael Clark
This can be worked around by adding the flag -diag-error 147 (the id >
code for this diagnostic). Is this what end-users should be expected >
to do?
No, you don't have to. You can instead rely on us fixing our code. Or in
this case Erik fixing my code :-).

Yours,
Roland
--
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://keys.gnupg.net.
Loading...