Skip site navigation (1)Skip section navigation (2)
Date:      03 Apr 2003 13:49:47 -0600
From:      Monte Ohrt <monte@ispi.net>
To:        Dirk Meyer <dirk.meyer@dinoex.sub.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: problem compiling postfix
Message-ID:  <1049399386.25606.33.camel@lena.ispi.prv>
In-Reply-To: <tp8%2Bx/0wPM@dmeyer.dinoex.sub.org>
References:  <1049391488.25607.21.camel@lena.ispi.prv> <tp8%2Bx/0wPM@dmeyer.dinoex.sub.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I got these patches in with some manual intervention, but still getting
the exact same errors :(

<snip>
[src/error]
gcc -Wmissing-prototypes -Wformat -DHAS_MYSQL -I/usr/local/include/mysql
-DHAS_LDAP -I/usr/local/include -DHAS_PCRE -I/usr/local/include  -O
-pipe -mcpu=pentiumpro -I. -I../../include -DFREEBSD5 -o error error.o
../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
/usr/local/lib/mysql/libmysqlclient.a -lm -lz /usr/local/lib/libldap.a
/usr/local/lib/liblber.a -L/usr/local/lib -lpcre
/usr/local/lib/libldap.a(tls.o): In function `ldap_pvt_tls_destroy':
tls.o(.text+0xf): undefined reference to `SSL_CTX_free'
tls.o(.text+0x1e): undefined reference to `EVP_cleanup'
tls.o(.text+0x23): undefined reference to `ERR_free_strings'
/usr/local/lib/libldap.a(tls.o): In function `ldap_pvt_tls_init':
tls.o(.text+0x117): undefined reference to `SSL_load_error_strings'
tls.o(.text+0x11c): undefined reference to `SSL_library_init'
tls.o(.text+0x121): undefined reference to
`X509V3_add_standard_extensions'
/usr/local/lib/libldap.a(tls.o): In function
`ldap_pvt_tls_init_def_ctx':
tls.o(.text+0x144): undefined reference to `SSLv23_method'
tls.o(.text+0x14c): undefined reference to `SSL_CTX_new'
tls.o(.text+0x15a): undefined reference to `ERR_peek_error'
tls.o(.text+0x1ae): undefined reference to `SSL_CTX_set_cipher_list'
tls.o(.text+0x211): undefined reference to
`SSL_CTX_load_verify_locations'
tls.o(.text+0x222): undefined reference to
`SSL_CTX_set_default_verify_paths'
tls.o(.text+0x2c3): undefined reference to `SSL_CTX_set_client_CA_list'
tls.o(.text+0x2ea): undefined reference to `SSL_CTX_use_PrivateKey_file'
tls.o(.text+0x33b): undefined reference to
`SSL_CTX_use_certificate_file'
tls.o(.text+0x381): undefined reference to `SSL_CTX_check_private_key'
tls.o(.text+0x40d): undefined reference to `SSL_CTX_set_verify'
tls.o(.text+0x422): undefined reference to
`SSL_CTX_set_tmp_rsa_callback'
tls.o(.text+0x449): undefined reference to `SSL_CTX_free'
/usr/local/lib/libldap.a(tls.o): In function `get_ca_list':
tls.o(.text+0x476): undefined reference to `SSL_load_client_CA_file'
/usr/local/lib/libldap.a(tls.o): In function `alloc_handle':
tls.o(.text+0x4b4): undefined reference to `SSL_new'
/usr/local/lib/libldap.a(tls.o): In function `update_flags':
tls.o(.text+0x51a): undefined reference to `SSL_get_error'
/usr/local/lib/libldap.a(tls.o): In function `sb_tls_setup':
tls.o(.text+0x5c7): undefined reference to `BIO_new'
tls.o(.text+0x5dc): undefined reference to `SSL_set_bio'
/usr/local/lib/libldap.a(tls.o): In function `sb_tls_remove':
tls.o(.text+0x673): undefined reference to `SSL_free'
/usr/local/lib/libldap.a(tls.o): In function `sb_tls_close':
tls.o(.text+0x713): undefined reference to `SSL_shutdown'
/usr/local/lib/libldap.a(tls.o): In function `sb_tls_ctrl':
tls.o(.text+0x7bb): undefined reference to `SSL_pending'
/usr/local/lib/libldap.a(tls.o): In function `sb_tls_read':
tls.o(.text+0x894): undefined reference to `SSL_read'
tls.o(.text+0x8a4): undefined reference to `SSL_get_error'
/usr/local/lib/libldap.a(tls.o): In function `sb_tls_write':
tls.o(.text+0x964): undefined reference to `SSL_write'
tls.o(.text+0x974): undefined reference to `SSL_get_error'
/usr/local/lib/libldap.a(tls.o): In function `ldap_int_tls_connect':
tls.o(.text+0xc6a): undefined reference to `SSL_connect'
tls.o(.text+0xc9a): undefined reference to `ERR_peek_error'
tls.o(.text+0xcb2): undefined reference to `ERR_error_string'
/usr/local/lib/libldap.a(tls.o): In function `ldap_pvt_tls_accept':
tls.o(.text+0xded): undefined reference to `SSL_accept'
/usr/local/lib/libldap.a(tls.o): In function
`ldap_pvt_tls_get_strength':
tls.o(.text+0xf2d): undefined reference to `SSL_get_current_cipher'
tls.o(.text+0xf3d): undefined reference to `SSL_CIPHER_get_bits'
/usr/local/lib/libldap.a(tls.o): In function `ldap_pvt_tls_get_peer':
tls.o(.text+0xf66): undefined reference to `SSL_get_peer_certificate'
tls.o(.text+0xf79): undefined reference to `X509_get_subject_name'
tls.o(.text+0xf93): undefined reference to `X509_NAME_oneline'
tls.o(.text+0xfa5): undefined reference to `X509_free'
/usr/local/lib/libldap.a(tls.o): In function `ldap_pvt_tls_get_peer_dn':
tls.o(.text+0xfd6): undefined reference to `SSL_get_peer_certificate'
tls.o(.text+0xfe9): undefined reference to `X509_get_subject_name'
tls.o(.text+0x1003): undefined reference to `X509_NAME_oneline'
tls.o(.text+0x1015): undefined reference to `X509_free'
/usr/local/lib/libldap.a(tls.o): In function
`ldap_pvt_tls_get_peer_hostname':
tls.o(.text+0x1046): undefined reference to `SSL_get_peer_certificate'
tls.o(.text+0x1059): undefined reference to `X509_get_subject_name'
tls.o(.text+0x107b): undefined reference to `X509_NAME_get_text_by_NID'
tls.o(.text+0x1088): undefined reference to `X509_free'
tls.o(.text+0x10a7): undefined reference to `X509_free'
/usr/local/lib/libldap.a(tls.o): In function
`ldap_pvt_tls_check_hostname':
tls.o(.text+0x10dd): undefined reference to `SSL_get_peer_certificate'
tls.o(.text+0x114a): undefined reference to `X509_get_ext_by_NID'
tls.o(.text+0x1164): undefined reference to `X509_get_ext'
tls.o(.text+0x1172): undefined reference to `X509V3_EXT_d2i'
tls.o(.text+0x11a4): undefined reference to `sk_num'
tls.o(.text+0x11fe): undefined reference to `sk_value'
tls.o(.text+0x1214): undefined reference to `ASN1_STRING_data'
tls.o(.text+0x1225): undefined reference to `ASN1_STRING_length'
tls.o(.text+0x12b3): undefined reference to `X509V3_EXT_get'
tls.o(.text+0x12e9): undefined reference to `X509_get_subject_name'
tls.o(.text+0x130b): undefined reference to `X509_NAME_get_text_by_NID'
tls.o(.text+0x13ba): undefined reference to `X509_free'
/usr/local/lib/libldap.a(tls.o): In function `tls_info_cb':
tls.o(.text+0x19d9): undefined reference to `SSL_state_string_long'
tls.o(.text+0x1a1c): undefined reference to `SSL_alert_desc_string_long'
tls.o(.text+0x1a26): undefined reference to `SSL_alert_type_string_long'
tls.o(.text+0x1a4f): undefined reference to `SSL_state_string_long'
tls.o(.text+0x1a78): undefined reference to `SSL_state_string_long'
/usr/local/lib/libldap.a(tls.o): In function `tls_verify_cb':
tls.o(.text+0x1ae0): undefined reference to
`X509_STORE_CTX_get_current_cert'
tls.o(.text+0x1aea): undefined reference to `X509_STORE_CTX_get_error'
tls.o(.text+0x1af2): undefined reference to
`X509_STORE_CTX_get_error_depth'
tls.o(.text+0x1afd): undefined reference to `X509_get_subject_name'
tls.o(.text+0x1b07): undefined reference to `X509_get_issuer_name'
tls.o(.text+0x1b21): undefined reference to `X509_NAME_oneline'
tls.o(.text+0x1b3b): undefined reference to `X509_NAME_oneline'
tls.o(.text+0x1b88): undefined reference to `CRYPTO_free'
tls.o(.text+0x1b94): undefined reference to `CRYPTO_free'
/usr/local/lib/libldap.a(tls.o): In function `tls_report_error':
tls.o(.text+0x1bce): undefined reference to `ERR_error_string'
tls.o(.text+0x1c1a): undefined reference to `ERR_get_error_line'
/usr/local/lib/libldap.a(tls.o): In function `tls_tmp_rsa_cb':
tls.o(.text+0x1c58): undefined reference to `RSA_generate_key'
*** Error code 1

Stop in /usr/ports/mail/postfix/work/postfix-2.0.6/src/error.
*** Error code 1

Stop in /usr/ports/mail/postfix/work/postfix-2.0.6.
*** Error code 1

Stop in /usr/ports/mail/postfix.
*** Error code 1

Stop in /usr/ports/mail/postfix.

On Thu, 2003-04-03 at 13:02, Dirk Meyer wrote:
> Monte Ohrt schrieb:,
> 
> > I'm a newbie to FreeBSD, I love the ports collection and how it works!
> > I've had good success compiling/installing complicated packages such as
> > mysql/apache/php, very nice!
> > 
> > Today I tried compiling postfix from the ports tree (up-to-date with
> > CVSup), selecting LDAP and MySQL support, and I ran into this error:
> > 
> > <snip>
> > [src/error]
> > /usr/local/lib/mysql/libmysqlclient.a -lm -lz /usr/local/lib/libldap.a
> > /usr/local/lib/liblber.a -L/usr/local/lib -lpcre
> > /usr/local/lib/libldap.a(tls.o): In function `ldap_pvt_tls_destroy':
> > tls.o(.text+0xf): undefined reference to `SSL_CTX_free'
> > tls.o(.text+0x1e): undefined reference to `EVP_cleanup'
> > tls.o(.text+0x23): undefined reference to `ERR_free_strings'
> [...]
> 
> USE_SSL is broken ....
> http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/39054
> 
> > I did not select any SSL options for Postfix, so I'm not sure why it
> > looks for these SSL related things. Something obvious I missed, or?
> 
> you selected TLS (wich needs SSL)
> you can try this patch, wrhich reanables support for openssl
> for non STABLE or CURRENT systems.
> 
> CC: mainatiner .... shall this patch be commited?
> 
> kind regards Dirk
> 
> - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
> - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
> 
> diff /usr/ports/mail/postfix/Makefile /usr/ports/current/postfix/Makefile
> --- /usr/ports/mail/postfix/Makefile	Thu Mar 13 20:21:14 2003
> +++ /usr/ports/current/postfix/Makefile	Thu Apr  3 20:52:55 2003
> @@ -163,4 +163,10 @@
>  post-clean:
>  	@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
>  
> -.include <bsd.port.mk>
> +.include <bsd.port.pre.mk>
> +
> +.ifdef NEED_OPENSSL
> +.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
> +.endif
> +
> +.include <bsd.port.post.mk>
> diff /usr/ports/mail/postfix/scripts/configure.postfix /usr/ports/current/postfix/scripts/configure.postfix
> --- /usr/ports/mail/postfix/scripts/configure.postfix	Tue Mar  4 20:57:30 2003
> +++ /usr/ports/current/postfix/scripts/configure.postfix	Thu Apr  3 20:50:43 2003
> @@ -107,8 +107,9 @@
>  			;;
>  		TLS)
>  			echo "MAN8+=		tlsmgr.8"
> -			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I/usr/include/openssl"
> -			echo "POSTFIX_AUXLIBS+=	-lssl -lcrypto"
> +			echo "NEED_OPENSSL=	yes"
> +			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I\${OPENSSLINC}"
> +			echo "POSTFIX_AUXLIBS+=	-L\${OPENSSLLIB} -lssl -lcrypto"
>  			echo "DISTFILES+=	\${DISTNAME}.tar.gz pfixtls-0.8.13-2.0.3-0.9.7.tar.gz"
>  			echo "EXTRA_PATCHES+=	\${WRKDIR}/pfixtls-0.8.13-2.0.3-0.9.7/pfixtls.diff"
>  			echo "PATCH_STRIP=	-p1"
> @@ -202,8 +203,9 @@
>  				exit 1
>  			fi
>  			echo "MAN8+=		tlsmgr.8"
> -			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I/usr/include/openssl"
> -			echo "POSTFIX_AUXLIBS+=	-lssl -lcrypto"
> +			echo "NEED_OPENSSL=	yes"
> +			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I\${OPENSSLINC}"
> +			echo "POSTFIX_AUXLIBS+=	-L\${OPENSSLLIB} -lssl -lcrypto"
>  			echo "PATCH_SITES+=	ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.12/"
>  			echo "PATCHFILES+=	tls+ipv6-1.12-pf-2.0.3.patch.gz"
>  			echo "PATCH_DIST_STRIP=	-p1"
> diff /usr/ports/mail/postfix-current/Makefile /usr/ports/current/postfix-current/Makefile
> --- /usr/ports/mail/postfix-current/Makefile	Fri Feb 21 20:58:30 2003
> +++ /usr/ports/current/postfix-current/Makefile	Thu Apr  3 20:53:44 2003
> @@ -155,4 +155,10 @@
>  post-clean:
>  	@${RM} -f ${WRKDIRPREFIX}${.CURDIR}/Makefile.inc
>  
> -.include <bsd.port.mk>
> +.include <bsd.port.pre.mk>
> +
> +.ifdef NEED_OPENSSL
> +.include "${PORTSDIR}/security/openssl/bsd.openssl.mk"
> +.endif
> +
> +.include <bsd.port.post.mk>
> diff /usr/ports/mail/postfix-current/scripts/configure.postfix /usr/ports/current/postfix-current/scripts/configure.postfix
> --- /usr/ports/mail/postfix-current/scripts/configure.postfix	Mon Feb 24 05:44:45 2003
> +++ /usr/ports/current/postfix-current/scripts/configure.postfix	Tue Feb 25 05:40:24 2003
> @@ -109,8 +109,9 @@
>  			;;
>  		TLS)
>  			echo "MAN8+=		tlsmgr.8"
> -			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I/usr/include/openssl"
> -			echo "POSTFIX_AUXLIBS+=	-lssl -lcrypto"
> +			echo "NEED_OPENSSL=	yes"
> +			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I\${OPENSSLINC}"
> +			echo "POSTFIX_AUXLIBS+=	-L\${OPENSSLLIB} -lssl -lcrypto"
>  			echo "DISTFILES+=	\${DISTNAME}.tar.gz pfixtls-0.8.11a-1.1.11-20021031-0.9.6g.tar.gz"
>  			echo "EXTRA_PATCHES+=	\${WRKDIR}/pfixtls-0.8.11a-1.1.11-20021031-0.9.6g/pfixtls.diff"
>  			echo "PATCH_STRIP=	-p1"
> @@ -174,8 +175,9 @@
>  				exit 1
>  			fi
>  			echo "MAN8+=		tlsmgr.8"
> -			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I/usr/include/openssl"
> -			echo "POSTFIX_AUXLIBS+=	-lssl -lcrypto"
> +			echo "NEED_OPENSSL=	yes"
> +			echo "POSTFIX_CCARGS+=	-DHAS_SSL -I\${OPENSSLINC}"
> +			echo "POSTFIX_AUXLIBS+=	-L\${OPENSSLLIB} -lssl -lcrypto"
>  			echo "PATCH_SITES+=	ftp://ftp.stack.nl/pub/postfix/tls+ipv6/1.8/"
>  			echo "PATCHFILES+=	tls+ipv6-1.8-pf-1.1.11-20021115.patch"
>  			echo "PATCH_DIST_STRIP=	-p1"
> _______________________________________________
> freebsd-ports@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"
-- 
Monte Ohrt <monte@ispi.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1049399386.25606.33.camel>