#1785: Autodetection for strdup prototype fails -------------------------+-------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Keywords: | -------------------------+-------------------------------------------------- Cactus has autoconf code to detect whether there is a prototype for strdup. This autoconf code fails with icc, as icc never aborts when there are conflicting prototypes. There is a warning only.
I have disabled the respective autoconf macro and have commented out the respective lines in configure.in. This code should either be corrected or removed.
#1785: Autodetection for strdup prototype fails --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
Here is how to detect whether strdup has a prototype:
{{{ strdup; }}}
This will fail unless strdup has a prototype.
#1785: Autodetection for strdup prototype fails --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by rhaas):
already fixed (in more or less that way). The code now does:
{{{ char *p = (char*)strdup; }}}
which is what autoconf 2.59's {{{AC_CHECK_DECL}}} does.
#1785: Autodetection for strdup prototype fails --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by knarf):
So, this can be marked as 'fixed' now?
#1785: Autodetection for strdup prototype fails --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: --------------------------+------------------------------------------------- Changes (by rhaas):
* status: new => closed * resolution: => fixed
Comment:
it no longer fails using either icc or gcc (tested on Datura and Debian). The test uses a method copied from autoconf 2.59. There is a leftover TODO which I am not sure I really would want to implement right now in that it just adds a new name for the same test. Currently configure output is a bit untidy in that it appears to check for strdup twice when in fact the first test checks for strdup in C and the second in C++.
#1785: Autodetection for strdup prototype fails --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
The TODO would make things easier to use since the user doesn't explicitly have to switch between C and C++ and back.
#1785: Autodetection for strdup prototype fails --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: Cactus | Version: development version Resolution: fixed | Keywords: --------------------------+-------------------------------------------------
Comment (by rhaas):
Implemented in git hash 99ca49b114c04fff85bc7900c959c90ca8840808 of the flesh, CPPFLAGS restored in 5ccd6051c6f68275d007922ac0d31a58460e94d6 of the flesh.
trac@lists.einsteintoolkit.org