Chinaunix

标题: 编译msmtp支持openssl时遇到的问题 [打印本页]

作者: lucif0908    时间: 2013-04-17 18:04
标题: 编译msmtp支持openssl时遇到的问题
最近要移植msmtp到arm开发板上,普通的msmtp没有问题,可以正常使用
但现在需要使用TLS安全连接,于是要重新编译msmtp来支持openssl
但编译过程中遇到了一些问题,自己搞了一下午也没解决,求各位帮忙看看

编译的配置为:
./configure --host=arm-hisiv100nptl-linux --with-ssl=openssl --with-libidn=no --with-gnome-keyring=no CC=arm-hisiv100nptl-linux-gcc libssl_CFLAGS=-I/usr/local/arm_openssl/include libssl_LIBS=-L/usr/local/arm_openssl/lib

配置通过,但在make时出错,显示
  CCLD   msmtp
tls.o: In function `tls_close':
/opt/trans/msmtp-1.4.30/src/tls.c:1711: undefined reference to `SSL_shutdown'
/opt/trans/msmtp-1.4.30/src/tls.c:1712: undefined reference to `SSL_free'
/opt/trans/msmtp-1.4.30/src/tls.c:1713: undefined reference to `SSL_CTX_free'
tls.o: In function `openssl_io_error':
/opt/trans/msmtp-1.4.30/src/tls.c:1323: undefined reference to `ERR_get_error'
/opt/trans/msmtp-1.4.30/src/tls.c:1350: undefined reference to `ERR_get_error'
/opt/trans/msmtp-1.4.30/src/tls.c:1350: undefined reference to `ERR_error_string'
。。。
。。。
等等错误

我觉得应该是没有成功连接到库,于是就在配置时加上LIBS,变成
./configure --host=arm-hisiv100nptl-linux --with-ssl=openssl --with-libidn=no --with-gnome-keyring=no CC=arm-hisiv100nptl-linux-gcc LIBS=-lssl libssl_CFLAGS=-I/usr/local/arm_openssl/include libssl_LIBS=-L/usr/local/arm_openssl

但配置通不过,报错
configure: WARNING: if you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used
checking build system type... i686-pc-linux-gnu
checking host system type... arm-hisiv100nptl-linux-gnu
checking target system type... arm-hisiv100nptl-linux-gnu
checking for arm-hisiv100nptl-linux-gcc... arm-hisiv100nptl-linux-gcc
checking whether the C compiler works... no
configure: error: in `/opt/trans/msmtp-1.4.30':
configure: error: C compiler cannot create executables
See `config.log' for more details

折腾了一下午,也没成功,希望各位大神能帮帮忙,提供下思路也好,在线等了。。。
作者: chenyx    时间: 2013-04-17 19:05
楼主去嵌入式板块提问下看看
作者: lucif0908    时间: 2013-04-18 08:48
回复 2# chenyx

恩,在嵌入式板块把问题解决了,谢谢
   
作者: mingming_song    时间: 2013-12-15 08:21
楼主,今天我也碰到了这样的问题了,求解决,我这里的报错信息是
GNU Libidn support ..... : no    这是线上环境的,但是我本地测试时候通过,所以对比了编译信息,发觉是这项不同,是不是重新安装这个包就完了?
还是另有其他,求分享~

回复 3# lucif0908


   




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2