找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 10477|回复: 5

ace5.6 在linux下编译出错

[复制链接]
发表于 2009-2-8 14:36:26 | 显示全部楼层 |阅读模式
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:278: undefined reference to `SSL_shutdown'
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:280: undefined reference to `SSL_get_error'
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:289: undefined reference to `SSL_clear'
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::recv_i(void*, unsigned int, int, ACE_Time_Value const*) const':
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:141: undefined reference to `SSL_read'
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:144: undefined reference to `SSL_get_error'
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:278: undefined reference to `SSL_shutdown'
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:280: undefined reference to `SSL_get_error'
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::recv(void*, unsigned int) const':
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:165: undefined reference to `SSL_shutdown'
client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':
/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/../../../../ace/SSL/SSL_SOCK_Stream.inl:289: undefined reference to `SSL_clear'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `TLSv1_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_connect'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_set_bio'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `BIO_free'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_set_client_CA_list'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `TLSv1_client_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `BIO_ctrl'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_add_dir_cert_subjects_to_stack'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `CRYPTO_set_locking_callback'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_set_verify'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `RAND_load_file'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_load_error_strings'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_peek'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_state'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv2_client_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_check_private_key'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv2_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `BIO_new'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_free'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `ERR_clear_error'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv3_server_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `RAND_egd'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv3_client_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `ERR_free_strings'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_set_connect_state'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv3_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `RAND_seed'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_new'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_set_accept_state'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_set_fd'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `EVP_cleanup'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_pending'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_want'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_add_file_cert_subjects_to_stack'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_load_client_CA_file'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `CRYPTO_num_locks'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_load_verify_locations'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `ERR_get_error'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv23_client_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_set_verify_depth'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `PEM_read_bio_DHparams'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `ERR_error_string'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_use_PrivateKey_file'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_library_init'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_use_certificate_file'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `CRYPTO_set_id_callback'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_new'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_use_certificate'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_write'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_get_client_CA_list'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `TLSv1_server_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `sk_new_null'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_accept'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv2_server_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `ERR_error_string_n'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `BIO_new_file'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `RAND_status'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_ctrl'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `DH_free'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSL_CTX_free'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv23_server_method'
../../../ace/SSL/.libs/libACE_SSL.so: undefined reference to `SSLv23_method'
collect2: ld returned 1 exit status
make[3]: *** [client] 错误 1
make[3]: Leaving directory `/usr/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP'
make[2]: *** [all-recursive] 错误 1
make[2]: Leaving directory `/usr/ACE_wrappers/build/examples/IPC_SAP'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/usr/ACE_wrappers/build/examples'
make: *** [all-recursive] 错误 1

ssl的包我装了,不知道为什么。。。
 楼主| 发表于 2009-2-9 10:09:25 | 显示全部楼层
可能是我运行了configure之后再装上openssl,我重新运行下configure试试。。
发表于 2009-2-18 14:30:58 | 显示全部楼层
我这几天刚刚安装没有问题。按照安装说明文档操作即可
发表于 2009-2-20 20:39:36 | 显示全部楼层
很明显是没有找到openssl的库,请确定指定的openssl库路径是否正确。
发表于 2009-3-17 10:00:38 | 显示全部楼层
这多人都解释了                            。
发表于 2009-3-21 15:55:43 | 显示全部楼层
需要下载openssl源码,如openssl- 0.9.8b.tar.gz,放到unix下去编译:
./config
make
make install

然后继续编译ace。

这时又会在链接时碰到很多错误:

client-SSL-client.o: In function `ACE_SSL_SOCK_Stream::close()':
../../../../ace/SSL/SSL_SOCK_Stream.i:278: undefined reference to `SSL_shutdown'
../../../../ace/SSL/SSL_SOCK_Stream.i:280: undefined reference to `SSL_get_error'
../../../../ace/SSL/SSL_SOCK_Stream.i:289: undefined reference to `SSL_clear'


解决方法是,在openssl的编译环境下找到libssl.a、libcrypto.a,让编译程序连接进去。 具体操作是
编辑 /ace- 5.5/ACE_wrappers/build/examples/IPC_SAP/SSL_SAP/Makefile和
/ace- 5.5/ACE_wrappers/build/tests/SSL/Makefile这两个文件,在里面找到"LIBS = -lrt -ldl" 这一项,将其修改为:
LIBS = -lrt -ldl /openssl- 0.9.8/openssl- 0.9.8b/libssl.a /openssl- 0.9.8/openssl- 0.9.8b/libcrypto.a
然后继续编译。问题即可解决。

上面的ace和openssl的路径以你实际存放的路径为准
您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-12-23 21:38 , Processed in 0.018778 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表