| Summary: | OpenSSL ENGINE support broken on Solaris using Sun Studio compiler | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Andrew Benham <andrew.benham> | ||||
| Component: | Build system | Assignee: | Assigned to nobody <unassigned-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | normal | ||||||
| Priority: | P2 | ||||||
| Version: | 4.4p1 | ||||||
| Hardware: | Other | ||||||
| OS: | Solaris | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 1222 | ||||||
| Attachments: |
|
||||||
Created attachment 1191 [details]
Fix for configure.ac
I must admit that I didn't read what autoconf produced for this test, but I'm surprised that gcc accepted it. Patch applied to both -HEAD and the 4.4 branch. It will be next release. Thanks. Well, apparently gcc supports 'nested functions', but the world is divided over whether this is a good idea or not. Whatever the individual view on this, it ain't standard C. Close resolved bugs after release. |
Solaris 8,9, and 10, x86 and sparc configuring with '--with-ssl-engine' gives an error: checking for OpenSSL ENGINE support... configure: error: OpenSSL ENGINE support not found Cause: configure.ac lines 1916 onward state: AC_TRY_COMPILE( [ #include <openssl/engine.h>], [ int main(void){ENGINE_load_builtin_engines();ENGINE_register_all_complete();} ], [ AC_MSG_RESULT(yes) AC_DEFINE(USE_OPENSSL_ENGINE, 1, [Enable OpenSSL engine support]) ], [ AC_MSG_ERROR(OpenSSL ENGINE support not found)] ) This generates code in configure lines 17887 onward: int main () { int main(void){ENGINE_load_builtin_engines();ENGINE_register_all_complet e();} ; return 0; } which the Sun Studio compiler doesn't regard as valid C: it's declaring a function 'main()' inside a function 'main()', and terminates with an error. gcc doesn't seem to mind compiling this code, but the Sun Studio compiler isn't having it. Fix: configure.ac, line 1919 Lose the leading "int main(void){" and the trailing "}"