SSL compile errors even when configured without ssl support
Greetings- I'm trying to compile syslog-ng 3.0.1 on RH 3 (yes, I know), and am unable to compile due to what appear to be openssl related errors: In file included from tlscontext.h:12, from tlscontext.c:1: /usr/include/openssl/ssl.h:909: syntax error before "KSSL_CTX" /usr/include/openssl/ssl.h:931: syntax error before '}' token Are the last set. However, I ran configure with "--disable-ssl." Reviewing some of the archives, it appears this was fixed in v3.0 back in Nov '08: https://lists.balabit.hu/pipermail/syslog-ng/2008-November/012234.html I've tried the 11202008 build just in case, and that didn't 'seem to resolve the problem. I really don't need SSL, so it would be much simpler to just skip the SSL part than try to get it working to get around this error. Various searches of the archives have mentioned that this was fixed a few other times, but I'm not having any luck. Help? :) chris
On Wed, 2009-01-21 at 10:06 -0600, Chris Fabri wrote:
Greetings-
I'm trying to compile syslog-ng 3.0.1 on RH 3 (yes, I know), and am unable to compile due to what appear to be openssl related errors:
In file included from tlscontext.h:12, from tlscontext.c:1: /usr/include/openssl/ssl.h:909: syntax error before "KSSL_CTX" /usr/include/openssl/ssl.h:931: syntax error before '}' token
Are the last set. However, I ran configure with "--disable-ssl." Reviewing some of the archives, it appears this was fixed in v3.0 back in Nov '08:
https://lists.balabit.hu/pipermail/syslog-ng/2008-November/012234.html
I've tried the 11202008 build just in case, and that didn't 'seem to resolve the problem. I really don't need SSL, so it would be much simpler to just skip the SSL part than try to get it working to get around this error. Various searches of the archives have mentioned that this was fixed a few other times, but I'm not having any luck.
Hmm... the configure script gives a summary on compilation flags at the end of the configure phase. Do you have openssl enabled or disabled there? The config.h and config.log files could also help.... I've checked again, this might be the culprit. Last time I've fixed this, I probably didn't get a positive response that the fix was successful. And the problem is that ENABLE_SSL is actually defined even if SSL is disabled, but its value is 0, so instead of #ifdef, #if needs to be used. Can you check if this fixes your problem and also report it back? Thanks. diff --git a/src/tlscontext.h b/src/tlscontext.h index ada8e18..ce4bbf8 100644 --- a/src/tlscontext.h +++ b/src/tlscontext.h @@ -7,7 +7,7 @@ #include "syslog-ng.h" -#ifdef ENABLE_SSL +#if ENABLE_SSL #include <openssl/ssl.h> -- Bazsi
My first message got moderated because of a large attachement containing the config.h and config.log files. Let me know if you still need those after this, and I can send directly. chris On Thu, Jan 22, 2009 at 3:39 AM, Balazs Scheidler <bazsi@balabit.hu> wrote:
Hmm... the configure script gives a summary on compilation flags at the end of the configure phase. Do you have openssl enabled or disabled there?
Yes, configure script did verify SSL was disabled: syslog-ng Open Source Edition 3.0.1 configured Compiler options: compiler : gcc compiler options : -g -O2 -Wall -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 linker flags : prefix : /usr/local2 Features: Sun STREAMS support : no Sun Door support : no Debug symbols : no GCC profiling : no Memtrace : no IPV6 support : yes spoof-source support : no tcp-wrapper support : yes SSL support : no SQL support : no Linux capability support : yes PCRE support : no Env wrapper support : no
I've checked again, this might be the culprit. Last time I've fixed this, I probably didn't get a positive response that the fix was successful. And the problem is that ENABLE_SSL is actually defined even if SSL is disabled, but its value is 0, so instead of #ifdef, #if needs to be used.
Can you check if this fixes your problem and also report it back?
Thanks.
diff --git a/src/tlscontext.h b/src/tlscontext.h index ada8e18..ce4bbf8 100644 --- a/src/tlscontext.h +++ b/src/tlscontext.h @@ -7,7 +7,7 @@
#include "syslog-ng.h"
-#ifdef ENABLE_SSL +#if ENABLE_SSL
#include <openssl/ssl.h>
I've made that change, getting different errors: if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall -MT tlstransport.o -MD -MP -MF ".deps/tlstransport.Tpo" -c -o tlstransport.o tlstransport.c; \ then mv -f ".deps/tlstransport.Tpo" ".deps/tlstransport.Po"; else rm -f ".deps/tlstransport.Tpo"; exit 1; fi In file included from tlstransport.c:1: tlstransport.h:12: syntax error before '*' token In file included from /usr/include/openssl/ssl.h:179, from tlstransport.c:5: /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory In file included from /usr/include/openssl/ssl.h:179, from tlstransport.c:5: /usr/include/openssl/kssl.h:134: syntax error before "krb5_enctype" /usr/include/openssl/kssl.h:136: syntax error before '*' token /usr/include/openssl/kssl.h:137: syntax error before '}' token /usr/include/openssl/kssl.h:149: syntax error before "kssl_ctx_setstring" /usr/include/openssl/kssl.h:149: syntax error before '*' token /usr/include/openssl/kssl.h:150: syntax error before '*' token /usr/include/openssl/kssl.h:151: syntax error before '*' token /usr/include/openssl/kssl.h:151: syntax error before '*' token /usr/include/openssl/kssl.h:152: syntax error before '*' token /usr/include/openssl/kssl.h:153: syntax error before "kssl_ctx_setprinc" /usr/include/openssl/kssl.h:153: syntax error before '*' token /usr/include/openssl/kssl.h:155: syntax error before "kssl_cget_tkt" /usr/include/openssl/kssl.h:155: syntax error before '*' token /usr/include/openssl/kssl.h:157: syntax error before "kssl_sget_tkt" /usr/include/openssl/kssl.h:157: syntax error before '*' token /usr/include/openssl/kssl.h:159: syntax error before "kssl_ctx_setkey" /usr/include/openssl/kssl.h:159: syntax error before '*' token /usr/include/openssl/kssl.h:161: syntax error before "context" /usr/include/openssl/kssl.h:162: syntax error before "kssl_build_principal_2" /usr/include/openssl/kssl.h:162: syntax error before "context" /usr/include/openssl/kssl.h:165: syntax error before "kssl_validate_times" /usr/include/openssl/kssl.h:165: syntax error before "atime" /usr/include/openssl/kssl.h:167: syntax error before "kssl_check_authent" /usr/include/openssl/kssl.h:167: syntax error before '*' token /usr/include/openssl/kssl.h:169: syntax error before "enctype" In file included from tlstransport.c:5: /usr/include/openssl/ssl.h:909: syntax error before "KSSL_CTX" /usr/include/openssl/ssl.h:931: syntax error before '}' token tlstransport.c:12: syntax error before "TLSSession" tlstransport.c:12: warning: no semicolon at end of struct or union tlstransport.c:13: warning: type defaults to `int' in declaration of `LogTransportTLS' tlstransport.c:13: warning: data definition has no type or storage class tlstransport.c: In function `log_transport_tls_read_method': tlstransport.c:18: `self' undeclared (first use in this function) tlstransport.c:18: (Each undeclared identifier is reported only once tlstransport.c:18: for each function it appears in.) tlstransport.c:18: syntax error before ')' token tlstransport.c: In function `log_transport_tls_write_method': tlstransport.c:74: `self' undeclared (first use in this function) tlstransport.c:74: syntax error before ')' token tlstransport.c: At top level: tlstransport.c:125: syntax error before '*' token tlstransport.c: In function `log_transport_tls_new': tlstransport.c:127: `self' undeclared (first use in this function) tlstransport.c:127: syntax error before ')' token tlstransport.c:129: `flags' undeclared (first use in this function) tlstransport.c:130: `fd' undeclared (first use in this function) tlstransport.c:135: `tls_session' undeclared (first use in this function) tlstransport.c: In function `log_transport_tls_free_method': tlstransport.c:146: `self' undeclared (first use in this function) tlstransport.c:146: syntax error before ')' token tlstransport.c:148: warning: implicit declaration of function `tls_session_free' make[2]: *** [tlstransport.o] Error 1 make[2]: Leaving directory `/home/fabric/syslog-ng-3.0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fabric/syslog-ng-3.0.1' make: *** [all] Error 2
The config.h and config.log files could also help....
I've tarred up and attached those 2 files, since they are a bit big. These are from a fresh "configure --prefix=/usr/local2 --disable-ssl" and a make after modifying tlscontext.h as above. Thanks for the quick response Bazsi! Let me know if anything details would be useful. chris
On Fri, 2009-01-23 at 10:32 -0600, Chris Fabri wrote:
My first message got moderated because of a large attachement containing the config.h and config.log files. Let me know if you still need those after this, and I can send directly. chris
On Thu, Jan 22, 2009 at 3:39 AM, Balazs Scheidler <bazsi@balabit.hu> wrote:
Hmm... the configure script gives a summary on compilation flags at the end of the configure phase. Do you have openssl enabled or disabled there?
Yes, configure script did verify SSL was disabled:
syslog-ng Open Source Edition 3.0.1 configured Compiler options: compiler : gcc compiler options : -g -O2 -Wall -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 linker flags : prefix : /usr/local2 Features: Sun STREAMS support : no Sun Door support : no Debug symbols : no GCC profiling : no Memtrace : no IPV6 support : yes spoof-source support : no tcp-wrapper support : yes SSL support : no SQL support : no Linux capability support : yes PCRE support : no Env wrapper support : no
I've checked again, this might be the culprit. Last time I've fixed this, I probably didn't get a positive response that the fix was successful. And the problem is that ENABLE_SSL is actually defined even if SSL is disabled, but its value is 0, so instead of #ifdef, #if needs to be used.
Can you check if this fixes your problem and also report it back?
Thanks.
diff --git a/src/tlscontext.h b/src/tlscontext.h index ada8e18..ce4bbf8 100644 --- a/src/tlscontext.h +++ b/src/tlscontext.h @@ -7,7 +7,7 @@
#include "syslog-ng.h"
-#ifdef ENABLE_SSL +#if ENABLE_SSL
#include <openssl/ssl.h>
I've made that change, getting different errors:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall -MT tlstransport.o -MD -MP -MF ".deps/tlstransport.Tpo" -c -o tlstransport.o tlstransport.c; \ then mv -f ".deps/tlstransport.Tpo" ".deps/tlstransport.Po"; else rm -f ".deps/tlstransport.Tpo"; exit 1; fi In file included from tlstransport.c:1: tlstransport.h:12: syntax error before '*' token In file included from /usr/include/openssl/ssl.h:179, from tlstransport.c:5: /usr/include/openssl/kssl.h:72:18: krb5.h: No such file or directory In file included from /usr/include/openssl/ssl.h:179, from tlstransport.c:5: /usr/include/openssl/kssl.h:134: syntax error before "krb5_enctype" /usr/include/openssl/kssl.h:136: syntax error before '*' token /usr/include/openssl/kssl.h:137: syntax error before '}' token /usr/include/openssl/kssl.h:149: syntax error before "kssl_ctx_setstring" /usr/include/openssl/kssl.h:149: syntax error before '*' token /usr/include/openssl/kssl.h:150: syntax error before '*' token /usr/include/openssl/kssl.h:151: syntax error before '*' token /usr/include/openssl/kssl.h:151: syntax error before '*' token /usr/include/openssl/kssl.h:152: syntax error before '*' token /usr/include/openssl/kssl.h:153: syntax error before "kssl_ctx_setprinc" /usr/include/openssl/kssl.h:153: syntax error before '*' token /usr/include/openssl/kssl.h:155: syntax error before "kssl_cget_tkt" /usr/include/openssl/kssl.h:155: syntax error before '*' token /usr/include/openssl/kssl.h:157: syntax error before "kssl_sget_tkt" /usr/include/openssl/kssl.h:157: syntax error before '*' token /usr/include/openssl/kssl.h:159: syntax error before "kssl_ctx_setkey" /usr/include/openssl/kssl.h:159: syntax error before '*' token /usr/include/openssl/kssl.h:161: syntax error before "context" /usr/include/openssl/kssl.h:162: syntax error before "kssl_build_principal_2" /usr/include/openssl/kssl.h:162: syntax error before "context" /usr/include/openssl/kssl.h:165: syntax error before "kssl_validate_times" /usr/include/openssl/kssl.h:165: syntax error before "atime" /usr/include/openssl/kssl.h:167: syntax error before "kssl_check_authent" /usr/include/openssl/kssl.h:167: syntax error before '*' token /usr/include/openssl/kssl.h:169: syntax error before "enctype" In file included from tlstransport.c:5: /usr/include/openssl/ssl.h:909: syntax error before "KSSL_CTX" /usr/include/openssl/ssl.h:931: syntax error before '}' token tlstransport.c:12: syntax error before "TLSSession" tlstransport.c:12: warning: no semicolon at end of struct or union tlstransport.c:13: warning: type defaults to `int' in declaration of `LogTransportTLS' tlstransport.c:13: warning: data definition has no type or storage class tlstransport.c: In function `log_transport_tls_read_method': tlstransport.c:18: `self' undeclared (first use in this function) tlstransport.c:18: (Each undeclared identifier is reported only once tlstransport.c:18: for each function it appears in.) tlstransport.c:18: syntax error before ')' token tlstransport.c: In function `log_transport_tls_write_method': tlstransport.c:74: `self' undeclared (first use in this function) tlstransport.c:74: syntax error before ')' token tlstransport.c: At top level: tlstransport.c:125: syntax error before '*' token tlstransport.c: In function `log_transport_tls_new': tlstransport.c:127: `self' undeclared (first use in this function) tlstransport.c:127: syntax error before ')' token tlstransport.c:129: `flags' undeclared (first use in this function) tlstransport.c:130: `fd' undeclared (first use in this function) tlstransport.c:135: `tls_session' undeclared (first use in this function) tlstransport.c: In function `log_transport_tls_free_method': tlstransport.c:146: `self' undeclared (first use in this function) tlstransport.c:146: syntax error before ')' token tlstransport.c:148: warning: implicit declaration of function `tls_session_free' make[2]: *** [tlstransport.o] Error 1 make[2]: Leaving directory `/home/fabric/syslog-ng-3.0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fabric/syslog-ng-3.0.1' make: *** [all] Error 2
Sorry, that it takes this much effort, but I don't want to mess up my development computer while removing the libssl headers. New errors, new patch: diff --git a/src/tlstransport.c b/src/tlstransport.c index 608a427..2f07625 100644 --- a/src/tlstransport.c +++ b/src/tlstransport.c @@ -1,5 +1,7 @@ #include "tlstransport.h" +#if ENABLE_SSL + #include "messages.h" #include <openssl/ssl.h> @@ -149,4 +151,4 @@ log_transport_tls_free_method(LogTransport *s) log_transport_free_method(s); } - +#endif -- Bazsi
On Mon, Jan 26, 2009 at 3:35 AM, Balazs Scheidler <bazsi@balabit.hu> wrote:
Sorry, that it takes this much effort, but I don't want to mess up my development computer while removing the libssl headers. New errors, new patch:
diff --git a/src/tlstransport.c b/src/tlstransport.c index 608a427..2f07625 100644 --- a/src/tlstransport.c +++ b/src/tlstransport.c @@ -1,5 +1,7 @@ #include "tlstransport.h"
+#if ENABLE_SSL + #include "messages.h"
#include <openssl/ssl.h> @@ -149,4 +151,4 @@ log_transport_tls_free_method(LogTransport *s) log_transport_free_method(s); }
- +#endif
-- Bazsi
Here's what I get now: if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall -MT tlstransport.o -MD -MP -MF ".deps/tlstransport.Tpo" -c -o tlstransport.o tlstransport.c; \ then mv -f ".deps/tlstransport.Tpo" ".deps/tlstransport.Po"; else rm -f ".deps/tlstransport.Tpo"; exit 1; fi In file included from tlstransport.c:1: tlstransport.h:12: syntax error before '*' token make[2]: *** [tlstransport.o] Error 1 make[2]: Leaving directory `/home/fabric/syslog-ng-3.0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fabric/syslog-ng-3.0.1' make: *** [all] Error 2 chris
Hi Bazsi , I've got a development environment I can kill libssl on. I'll try to get up to date with the patches you've already sent.
Chris Fabri <fabric@northwestern.edu> 01/27/09 8:53 AM >>> On Mon, Jan 26, 2009 at 3:35 AM, Balazs Scheidler <bazsi@balabit.hu> wrote:
Sorry, that it takes this much effort, but I don't want to mess up my development computer while removing the libssl headers. New errors, new patch:
diff --git a/src/tlstransport.c b/src/tlstransport.c index 608a427..2f07625 100644 --- a/src/tlstransport.c +++ b/src/tlstransport.c @@ -1,5 +1,7 @@ #include "tlstransport.h"
+#if ENABLE_SSL + #include "messages.h"
#include <openssl/ssl.h> @@ -149,4 +151,4 @@ log_transport_tls_free_method(LogTransport *s) log_transport_free_method(s); }
- +#endif
-- Bazsi
Here's what I get now: if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall -MT tlstransport.o -MD -MP -MF ".deps/tlstransport.Tpo" -c -o tlstransport.o tlstransport.c; \ then mv -f ".deps/tlstransport.Tpo" ".deps/tlstransport.Po"; else rm -f ".deps/tlstransport.Tpo"; exit 1; fi In file included from tlstransport.c:1: tlstransport.h:12: syntax error before '*' token make[2]: *** [tlstransport.o] Error 1 make[2]: Leaving directory `/home/fabric/syslog-ng-3.0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fabric/syslog-ng-3.0.1' make: *** [all] Error 2 chris ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
OK I've successfully compiled and run without ssl with the 3.0.1 tarball and the relevant patches applied. For anyone trying to compile the tarball I've attached the patches I used but these are just cut and paste straight from the mailing list.
"chris packham" <chris.packham@alliedtelesis.co.nz> 01/27/09 11:23 AM >>> Hi Bazsi ,
I've got a development environment I can kill libssl on. I'll try to get up to date with the patches you've already sent.
Chris Fabri <fabric@northwestern.edu> 01/27/09 8:53 AM >>> On Mon, Jan 26, 2009 at 3:35 AM, Balazs Scheidler <bazsi@balabit.hu> wrote:
Sorry, that it takes this much effort, but I don't want to mess up my development computer while removing the libssl headers. New errors, new patch:
diff --git a/src/tlstransport.c b/src/tlstransport.c index 608a427..2f07625 100644 --- a/src/tlstransport.c +++ b/src/tlstransport.c @@ -1,5 +1,7 @@ #include "tlstransport.h"
+#if ENABLE_SSL + #include "messages.h"
#include <openssl/ssl.h> @@ -149,4 +151,4 @@ log_transport_tls_free_method(LogTransport *s) log_transport_free_method(s); }
- +#endif
-- Bazsi
Here's what I get now: if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall -MT tlstransport.o -MD -MP -MF ".deps/tlstransport.Tpo" -c -o tlstransport.o tlstransport.c; \ then mv -f ".deps/tlstransport.Tpo" ".deps/tlstransport.Po"; else rm -f ".deps/tlstransport.Tpo"; exit 1; fi In file included from tlstransport.c:1: tlstransport.h:12: syntax error before '*' token make[2]: *** [tlstransport.o] Error 1 make[2]: Leaving directory `/home/fabric/syslog-ng-3.0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fabric/syslog-ng-3.0.1' make: *** [all] Error 2 chris ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html ______________________________________________________________________________ Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng FAQ: http://www.campin.net/syslog-ng/faq.html
On Mon, 2009-01-26 at 13:53 -0600, Chris Fabri wrote:
On Mon, Jan 26, 2009 at 3:35 AM, Balazs Scheidler <bazsi@balabit.hu> wrote:
Sorry, that it takes this much effort, but I don't want to mess up my development computer while removing the libssl headers. New errors, new patch:
diff --git a/src/tlstransport.c b/src/tlstransport.c index 608a427..2f07625 100644 --- a/src/tlstransport.c +++ b/src/tlstransport.c @@ -1,5 +1,7 @@ #include "tlstransport.h"
+#if ENABLE_SSL + #include "messages.h"
#include <openssl/ssl.h> @@ -149,4 +151,4 @@ log_transport_tls_free_method(LogTransport *s) log_transport_free_method(s); }
- +#endif
-- Bazsi
Here's what I get now:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/eventlog -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -Wall -MT tlstransport.o -MD -MP -MF ".deps/tlstransport.Tpo" -c -o tlstransport.o tlstransport.c; \ then mv -f ".deps/tlstransport.Tpo" ".deps/tlstransport.Po"; else rm -f ".deps/tlstransport.Tpo"; exit 1; fi In file included from tlstransport.c:1: tlstransport.h:12: syntax error before '*' token make[2]: *** [tlstransport.o] Error 1 make[2]: Leaving directory `/home/fabric/syslog-ng-3.0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/fabric/syslog-ng-3.0.1' make: *** [all] Error 2
And a new patch again: http://git.balabit.hu/?p=bazsi/syslog-ng-3.0.git;a=commit;h=0a7e892b1a045f9d... This time, I've compiled with --disable-ssl and tried to check if it uses headers from openssl. Hope this patch solves this issue now. -- Bazsi
participants (3)
-
Balazs Scheidler
-
Chris Fabri
-
chris packham