Loading ...
Sorry, an error occurred while loading the content.

smtpd compile problem (tls)

Expand Messages
  • Carnac
    Hi, If I compile with TLS Support I get following errror, ssl.h is in /usr/local/openssl and libsslo/libcyrpto.o are in /usr/lib. compile options are:
    Message 1 of 2 , Oct 30, 2009
    • 0 Attachment
      Hi,

      If I compile with TLS Support I get following errror, ssl.h is in
      /usr/local/openssl and libsslo/libcyrpto.o are in /usr/lib.


      compile options are:
      SYSTYPE = LINUX2
      AR = ar
      ARFL = rv
      RANLIB = ranlib
      SYSLIBS = -lldap -llber -lpcre -lsasl2 -lssl -lcrypto -ldb -lnsl -lresolv -ldb -lnsl -lresolv
      CC = gcc $(WARN) -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl
      OPT = -O
      DEBUG = -g
      AWK = awk
      STRCASE =
      EXPORT = AUXLIBS='-lldap -llber -lpcre -lsasl2 -lssl -lcrypto -ldb -lnsl -lresolv' CCARGS='-DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl' OPT='-O' DEBUG='-g'
      WARN = -Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
      -Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
      -Wunused -Wno-missing-braces

      versions:
      postfix 2.6.5
      openssl 0.9.8k

      [...]
      [src/smtpd]
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_token.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_check.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_chat.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_state.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_peer.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_sasl_proto.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_sasl_glue.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_proxy.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_xforward.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_dsn_fix.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_milter.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -c smtpd_resolve.c
      gcc -Wmissing-prototypes -Wformat -DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl -g -O -I. -I../../include -DLINUX2 -o smtpd smtpd.o smtpd_token.o smtpd_check.o smtpd_chat.o smtpd_state.o smtpd_peer.o smtpd_sasl_proto.o smtpd_sasl_glue.o smtpd_proxy.o smtpd_xforward.o smtpd_dsn_fix.o smtpd_milter.o smtpd_resolve.o ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a ../../lib/libxsasl.a ../../lib/libmilter.a ../../lib/libglobal.a ../../lib/libutil.a -lldap -llber -lpcre -lsasl2 -lssl -lcrypto -ldb -lnsl -lresolv -ldb -lnsl -lresolv
      ../../lib/libtls.a(tls_server.o): In function `tls_server_start':
      /home/xa/packages/postfix/postfix/src/tls/tls_server.c:647: undefined reference to `BIO_set_callback'
      /home/xa/packages/postfix/postfix/src/tls/tls_server.c:666: undefined reference to `BIO_set_callback'
      ../../lib/libtls.a(tls_server.o): In function `tls_server_init':
      /home/xa/packages/postfix/postfix/src/tls/tls_server.c:318: undefined reference to `EVP_MD_size'
      /home/xa/packages/postfix/postfix/src/tls/tls_server.c:376: undefined reference to `SSL_CTX_set_info_callback'
      /home/xa/packages/postfix/postfix/src/tls/tls_server.c:525: undefined reference to `SSL_CTX_sess_set_get_cb'
      /home/xa/packages/postfix/postfix/src/tls/tls_server.c:526: undefined reference to `SSL_CTX_sess_set_new_cb'
      collect2: ld returned 1 exit status
      make: *** [smtpd] Error 1
      make: *** [update] Error 1


      I'm at the end of my ideas ...
    • Victor Duchovni
      ... That s libcrypto.a , not libcyrto.o of course. And if you find headers in /usr/local/openssl but libraries in /usr/lib, something is dreadfully wrong,
      Message 2 of 2 , Oct 30, 2009
      • 0 Attachment
        On Fri, Oct 30, 2009 at 07:15:11PM +0100, Carnac wrote:

        > If I compile with TLS Support I get following errror, ssl.h is in
        > /usr/local/openssl and libsslo/libcyrpto.o are in /usr/lib.

        That's "libcrypto.a", not "libcyrto.o" of course. And if you find headers
        in /usr/local/openssl but libraries in /usr/lib, something is dreadfully
        wrong, these are very unlikely to be from the same sofware. Perhaps you
        have GnuTLS, rather than OpenSSL in /usr/include and /usr/lib?

        In any case, either use /usr/include/openssl/ and /usr/lib or
        /usr/local/openssl/include/ and /usr/local/openssl/lib/. Don't
        mix and match.



        > EXPORT = AUXLIBS='-lldap -llber -lpcre -lsasl2 -lssl -lcrypto -ldb -lnsl -lresolv' CCARGS='-DHAS_LDAP -DHAS_PCRE -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -DUSE_TLS -I/usr/include/sasl -I/usr/include/openssl' OPT='-O' DEBUG='-g'

        Either:

        - add "-L/usr/local/openssl/lib" near the front of AUXLIBS

        OR

        - Use the system ssl headers, provided of course these are
        openssl and not GnuTLS.

        --
        Viktor.

        Disclaimer: off-list followups get on-list replies or get ignored.
        Please do not ignore the "Reply-To" header.

        To unsubscribe from the postfix-users list, visit
        http://www.postfix.org/lists.html or click the link below:
        <mailto:majordomo@...?body=unsubscribe%20postfix-users>

        If my response solves your problem, the best way to thank me is to not
        send an "it worked, thanks" follow-up. If you must respond, please put
        "It worked, thanks" in the "Subject" so I can delete these quickly.
      Your message has been successfully submitted and would be delivered to recipients shortly.