- 论坛徽章:
- 0
|
最近要移植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
折腾了一下午,也没成功,希望各位大神能帮帮忙,提供下思路也好,在线等了。。。 |
|