-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure blows up because of implicit declaration of exit() #45
Comments
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) 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 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.The text was updated successfully, but these errors were encountered: