[syslog-ng] SSL compile errors even when configured without ssl support
Balazs Scheidler
bazsi at balabit.hu
Mon Jan 26 10:35:16 CET 2009
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 at 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
More information about the syslog-ng
mailing list