- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: /usr/ccs/bin/ld: server.cxx: Not a valid objec...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-26-2006 07:08 PM
тАО04-26-2006 07:08 PM
I m trying to write a clinet -server program using openssl.I managed to compile openssl .But when I try to compile the server.cxx ( which I have created ) I m getting the following error
/usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)
Here is the command which I have used to compile the same
cc -I /home/myuserid/openssl-0.9.7-stable-SNAP-20060421/include -L . -lcrypto -lssl -o server server.cxx
Can anyone help me to get rid of this error
Regards
Binu
Solved! Go to Solution.
- Tags:
- OpenSSL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2006 04:11 AM
тАО04-27-2006 04:11 AM
Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)
- Tags:
- aC++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2006 04:15 AM
тАО04-27-2006 04:15 AM
Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)
aCC -I/home/myuserid/openssl-0.9.7-stable-SNAP-20060421/include -L . -lcrypto -lssl -o server server.cxx
Warning 749: "server.cxx", line 69 # The cast from 'sockaddr_in *' to 'sockaddr *' is performed as a
'reinterpret_cast'. This operation is non-portable and potentially unsafe.
bind(sd, (struct sockaddr*)&addr, sizeof(addr)); /* bind it */
^^^^^^^^^^^^^^^^^^
/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (server.o) was detected. The linked output may not run on a PA 1.x system.
/usr/ccs/bin/ld: Unsatisfied symbols:
OPENSSL_add_all_algorithms_noconf (code)
SSL_accept (code)
SSL_set_fd (code)
SSL_new (code)
SSL_CTX_new (code)
SSL_get_fd (code)
cma_close (code)
SSL_write (code)
SSL_CTX_use_PrivateKey_file (code)
SSL_load_error_strings (code)
SSL_CTX_check_private_key (code)
SSLv2_server_method (code)
SSL_CTX_use_certificate_file (code)
cma_socket (code)
cma_accept (code)
SSL_read (code)
SSL_free (code)
- Tags:
- unsat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2006 08:22 AM
тАО04-27-2006 08:22 AM
Solutionbind(sd, reinterpret_cast
The missing SSL_* symbols can be found by rearranging the compile line to put the source code before the libraries that provide those symbols-
aCC -I/home/myuserid/openssl-0.9.7-stable-SNAP-20060421/include server.cxx -L . -lcrypto -lssl -o server
The missing cma_* symbols indicate that you are using threading headers. It also indicates that you are using an old system that defaults to the user-space libcma threading instead of the current kernel libpthread threading. If you had a new enough aCC you could compile and link with -mt to get the right defines and libraries to use threads. You may have an old aCC that does not implement -mt. In that case you need to pass specific options for compiling files and for linking. Linking with -lcma will start to fix your threading problems. But you really need to get all the options right to avoid runtime problems.
Use "aCC -V" to see what version of aCC you have. Go to http://www.hp.com/go/c++ and the "Review documentation" link there to see the "Programmer's Guide" for your version of the compiler. Read the section on "Threads and Parallel Processing" from the guide.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2006 11:18 PM
тАО04-27-2006 11:18 PM
Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)
It helped me a lot ...
Actually After trying your suggestion I was getting the following error ...
/usr/ccs/bin/ld: Unsatisfied symbols:
PEM_read_bio_X509 (code)
X509_STORE_get_by_subject (code)
EVP_enc_null (code)
X509_VERIFY_PARAM_set_purpose (code)
X509_VERIFY_PARAM_set_trust (code)
X509_STORE_CTX_init (code)
PEM_read_bio_RSAPrivateKey (code)
COMP_CTX_free (code)
OPENSSL_DIR_end (code)
BIO_f_buffer (code)
X509_STORE_CTX_get_ex_new_index (code)
X509_STORE_CTX_set_default (code)
X509_STORE_CTX_cleanup (code)
X509_STORE_set_default_paths (code)
After that I cnhanged the order of the library files ..
ie , lssl i gave first and then lcrypto .. then it worked :)
Thanks a lot
Regards
Binu