2010-11-29 09:48:15     Compilation errors..

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-11-29 09:48:15     Compilation errors..

Aymen Abdelwahed (TUNISIA)

Message: 96290   

 

Hi guys!

 

I wrote a simple SSL server. When trying to build it with SSL library I'm getting the following error (Please check the log.txt file for more details..)

 

__________________________________________________

 

 

 

server.cpp: In member function ‘int server::server_set(short int, int, char, int, std::string, std::string)’:

 

/tmp/ccpKlGK7.o: In function `server::server_read(char*)':

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:381: undefined reference to `SSLError::SSLError(ssl_st*, unsigned int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:381: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:381: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:394: undefined reference to `SocketError::SocketError(int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:394: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:394: undefined reference to `SocketError::~SocketError()'

 

/tmp/ccpKlGK7.o: In function `server::server_write(char*)':

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:334: undefined reference to `SSLError::SSLError(ssl_st*, unsigned int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:334: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:334: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:348: undefined reference to `SocketError::SocketError(int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:348: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:348: undefined reference to `SocketError::~SocketError()'

 

/tmp/ccpKlGK7.o: In function `server::server_accept()':

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:218: undefined reference to `SocketError::SocketError(int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:218: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:218: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:248: undefined reference to `SSLError::SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:248: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:248: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:257: undefined reference to `SSLError::SSLError(ssl_st*, unsigned int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:257: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:257: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:266: undefined reference to `SSLError::SSLError(ssl_st*, unsigned int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:266: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:266: undefined reference to `SSLError::~SSLError()'

 

/tmp/ccpKlGK7.o: In function `server::server_listen()':

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:176: undefined reference to `SocketError::SocketError(int, int, int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:176: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:176: undefined reference to `SocketError::~SocketError()'

 

/tmp/ccpKlGK7.o: In function `server::server_set(short, int, char, int)':

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:21: undefined reference to `SocketError::SocketError(int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:21: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:21: undefined reference to `SocketError::~SocketError()'

 

/tmp/ccpKlGK7.o: In function `server::server_set(short, int, char, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:69: undefined reference to `SocketError::SocketError(int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:69: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:69: undefined reference to `SocketError::~SocketError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:80: undefined reference to `_CRYPTO_set_mem_functions'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:83: undefined reference to `_ERR_load_BIO_strings'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:85: undefined reference to `_OPENSSL_add_all_algorithms_noconf'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:91: undefined reference to `SSLError::SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:91: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:91: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:107: undefined reference to `_ERR_print_errors_fp'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:114: undefined reference to `_ERR_print_errors_fp'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:124: undefined reference to `SSLError::SSLError(ssl_st*, unsigned int)'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:124: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/workspace/SSLProjects/SSL_Cl_Srv/server.cpp:124: undefined reference to `SSLError::~SSLError()'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(s23_srvr.o): In function `_ssl23_get_client_hello':

 

s23_srvr.c:(.text+0x2b4): undefined reference to `_BUF_MEM_grow_clean'

 

s23_srvr.c:(.text+0x34a): undefined reference to `_ERR_put_error'

 

s23_srvr.c:(.text+0x3a6): undefined reference to `_ERR_put_error'

 

s23_srvr.c:(.text+0x3cc): undefined reference to `_ERR_put_error'

 

s23_srvr.c:(.text+0x454): undefined reference to `_ERR_put_error'

 

s23_srvr.c:(.text+0x552): undefined reference to `_ERR_put_error'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(s23_srvr.o): In function `_ssl23_accept':

 

s23_srvr.c:(.text+0x596): undefined reference to `_RAND_add'

 

s23_srvr.c:(.text+0x59a): undefined reference to `_ERR_clear_error'

 

s23_srvr.c:(.text+0x63c): undefined reference to `_ERR_put_error'

 

s23_srvr.c:(.text+0x6d8): undefined reference to `_BUF_MEM_new'

 

s23_srvr.c:(.text+0x6e6): undefined reference to `_BUF_MEM_grow'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(s23_lib.o): In function `_ssl23_write':

 

s23_lib.c:(.text+0xb8): undefined reference to `_ERR_put_error'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(s23_lib.o): In function `_ssl23_peek':

 

s23_lib.c:(.text+0x13c): undefined reference to `_ERR_put_error'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(s23_lib.o): In function `_ssl23_read':

 

s23_lib.c:(.text+0x1c0): undefined reference to `_ERR_put_error'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(s23_pkt.o): In function `_ssl23_read_bytes':

 

s23_pkt.c:(.text+0x2a): undefined reference to `_BIO_read'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(s23_pkt.o): In function `_ssl23_write_bytes':

 

s23_pkt.c:(.text+0x86): undefined reference to `_BIO_write'

 

/home/ayman/uClinux-dist/staging/usr/lib/libssl.a(t1_lib.o): In function `_tls1_process_ticket':

 

t1_lib.c:(.text+0x1e0): undefined reference to `_HMAC_CTX_init'

 

t1_lib.c:(.text+0x1ec): undefined reference to `_EVP_CIPHER_CTX_init'

 

t1_lib.c:(.text+0x212): undefined reference to `_EVP_sha256'

 

t1_lib.c:(.text+0x22c): undefined reference to `_HMAC_Init_ex'

 

t1_lib.c:(.text+0x230): undefined reference to `_EVP_aes_128_cbc'

 

t1_lib.c:(.text+0x254): undefined reference to `_EVP_DecryptInit_ex'

 

t1_lib.c:(.text+0x25c): undefined reference to `_EVP_MD_size'

 

t1_lib.c:(.text+0x270): undefined reference to `_HMAC_Update'

 

t1_lib.c:(.text+0x282): undefined reference to `_HMAC_Final'

 

t1_lib.c:(.text+0x28a): undefined reference to `_HMAC_CTX_cleanup'

 

t1_lib.c:(.text+0x2ac): undefined reference to `_EVP_CIPHER_CTX_iv_length'

 

t1_lib.c:(.text+0x2c0): undefined reference to `_EVP_CIPHER_CTX_iv_length'

 

t1_lib.c:(.text+0x2d6): undefined reference to `_CRYPTO_malloc'

 

t1_lib.c:(.text+0x2fe): undefined reference to `_EVP_DecryptUpdate'

 

t1_lib.c:(.text+0x316): undefined reference to `_EVP_DecryptFinal'

 

t1_lib.c:(.text+0x336): undefined reference to `_EVP_CIPHER_CTX_cleanup'

 

t1_lib.c:(.text+0x350): undefined reference to `_CRYPTO_free'

 

t1_lib.c:(.text+0x386): undefined reference to `_EVP_CIPHER_CTX_cleanup'

 

_________________________

 

 

 

I'm using the following command to build:

 

bfin-uclinux-g++ -Wl,-elf2flt -Wall server.cpp -o serverBF -I ~/uClinux-dist/staging/usr/include -L ~/uClinux-dist/staging/usr/lib -lssl

 

Is there any missing options??

 

Thanks for help

 

Ayman

 

log.txt

TranslateQuoteReplyEditDelete

 

 

2010-11-29 15:28:42     Re: Compilation errors..

Mike Frysinger (UNITED STATES)

Message: 96294   

 

the errors in your own project are probably errors in your own code.  you'll need to figure those out.

 

the errors from libssl.a are because you didnt link in -lcrypto after -lssl.

QuoteReplyEditDelete

 

 

2010-11-30 03:07:20     Re: Compilation errors..

Aymen Abdelwahed (TUNISIA)

Message: 96309   

 

the errors in your own project are probably errors in your own code.  you'll need to figure those out.

 

the errors from libssl.a are because you didnt link in -lcrypto after -lssl.

 

---

 

Really thanks Mike for your help.. Now Its working..

 

 

 

Ayman

Attachments

Outcomes