Open Artoria2e5 opened 12 months ago
I got bitten by this issue today. I believe the root cause (for my system anyways) is an update to GCC's defaults (-Werror=implicit-function-declaration is now default behavior) see: https://gcc.gnu.org/gcc-14/porting_to.html
In other words, the configure test may be written expecting GCC version <=13. Not sure about clang's history with this. Best guess as to a permanent solution is using a newer version of autoconf.
Implicit declaration is (in recent code) usually unintended, so personally I lean towards adding an include. https://manned.org/exit.3p does indicate that under POSIX, stdlib is the correct include.
Agreed that the include should be added, but what is the source of the test code? Was it hand-written into configure.ac or was it generated by some tool like autoscan? It looks like there are several tests that don't include stdlib.h before calling exit().
Then again, maybe the wisest thing to do is modify the configure script and just move on with life. :/
configure.patch.txt This patch fixes all the implicit-function-declaration errors in the configure script.
With the above fixes configure runs, and maybe even gets correct results from all it's tests, but unfortunately the build still fails with incompatible-pointer-type errors in ssh-ecdsa.c I'll open a separate issue for those.
Current git HEAD gives:
gcc --version
gives:Running
autoreconf
does not help, because this test is written directly inconfigure.ac
. Changing the CFLAGS to add-Wno-error=all
at theCFLAGS="$CFLAGS -fPIC -Wall -Wpointer-arith -Wuninitialized"
bit helps, but the right way to do it is probably fixing the invocation. Because well, the compiler does not seem to be in the wrong here.