<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id) in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778540#M99321</link>
    <description>You need aCC instead of cc for a C++ file like server.cxx.  The cc compiler only handles C files.  When it saw the server.cxx argument cc treated it like an object file and passed it on to the linker.</description>
    <pubDate>Thu, 27 Apr 2006 11:11:17 GMT</pubDate>
    <dc:creator>Mike Stroyan</dc:creator>
    <dc:date>2006-04-27T11:11:17Z</dc:date>
    <item>
      <title>/usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778539#M99320</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;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 &lt;BR /&gt;&lt;BR /&gt;/usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)&lt;BR /&gt;&lt;BR /&gt;Here is the command which I have used to compile the same&lt;BR /&gt;&lt;BR /&gt;cc -I /home/myuserid/openssl-0.9.7-stable-SNAP-20060421/include -L . -lcrypto -lssl -o server server.cxx&lt;BR /&gt;Can anyone help me to get rid of this error &lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Binu &lt;BR /&gt;</description>
      <pubDate>Thu, 27 Apr 2006 02:08:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778539#M99320</guid>
      <dc:creator>msbinu</dc:creator>
      <dc:date>2006-04-27T02:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778540#M99321</link>
      <description>You need aCC instead of cc for a C++ file like server.cxx.  The cc compiler only handles C files.  When it saw the server.cxx argument cc treated it like an object file and passed it on to the linker.</description>
      <pubDate>Thu, 27 Apr 2006 11:11:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778540#M99321</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2006-04-27T11:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778541#M99322</link>
      <description>Thanx mike , but if I use aCC I will get the following error &lt;BR /&gt;&lt;BR /&gt;aCC -I/home/myuserid/openssl-0.9.7-stable-SNAP-20060421/include -L . -lcrypto -lssl -o server server.cxx &lt;BR /&gt;&lt;BR /&gt;Warning 749: "server.cxx", line 69 # The cast from 'sockaddr_in *' to 'sockaddr *' is performed as a&lt;BR /&gt;    'reinterpret_cast'. This operation is non-portable and potentially unsafe.&lt;BR /&gt;    bind(sd, (struct sockaddr*)&amp;amp;addr, sizeof(addr));  /* bind it */&lt;BR /&gt;             ^^^^^^^^^^^^^^^^^^                                    &lt;BR /&gt;/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.&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   OPENSSL_add_all_algorithms_noconf (code)&lt;BR /&gt;   SSL_accept (code)&lt;BR /&gt;   SSL_set_fd (code)&lt;BR /&gt;   SSL_new (code)&lt;BR /&gt;   SSL_CTX_new (code)&lt;BR /&gt;   SSL_get_fd (code)&lt;BR /&gt;   cma_close (code)&lt;BR /&gt;   SSL_write (code)&lt;BR /&gt;   SSL_CTX_use_PrivateKey_file (code)&lt;BR /&gt;   SSL_load_error_strings (code)&lt;BR /&gt;   SSL_CTX_check_private_key (code)&lt;BR /&gt;   SSLv2_server_method (code)&lt;BR /&gt;   SSL_CTX_use_certificate_file (code)&lt;BR /&gt;   cma_socket (code)&lt;BR /&gt;   cma_accept (code)&lt;BR /&gt;   SSL_read (code)&lt;BR /&gt;   SSL_free (code)&lt;BR /&gt;</description>
      <pubDate>Thu, 27 Apr 2006 11:15:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778541#M99322</guid>
      <dc:creator>msbinu</dc:creator>
      <dc:date>2006-04-27T11:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778542#M99323</link>
      <description>The warning about reinterpret_cast can be avoided by using an explicit reinterpret_cast like this-&lt;BR /&gt; bind(sd, reinterpret_cast&lt;STRUCT sockaddr=""&gt;(&amp;amp;addr), sizeof(addr));&lt;BR /&gt;&lt;BR /&gt;The missing SSL_* symbols can be found by rearranging the compile line to put the source code before the libraries that provide those symbols-&lt;BR /&gt;&lt;BR /&gt;aCC -I/home/myuserid/openssl-0.9.7-stable-SNAP-20060421/include  server.cxx -L . -lcrypto -lssl -o server&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;  Use "aCC -V" to see what version of aCC you have.  Go to &lt;A href="http://www.hp.com/go/c++" target="_blank"&gt;http://www.hp.com/go/c++&lt;/A&gt; 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.&lt;/STRUCT&gt;</description>
      <pubDate>Thu, 27 Apr 2006 15:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778542#M99323</guid>
      <dc:creator>Mike Stroyan</dc:creator>
      <dc:date>2006-04-27T15:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: /usr/ccs/bin/ld: server.cxx: Not a valid object file (invalid system id)</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778543#M99324</link>
      <description>Thanks a lot mike .. &lt;BR /&gt;&lt;BR /&gt;It helped me a lot ... &lt;BR /&gt;Actually After trying your suggestion  I was getting the following error ...&lt;BR /&gt;&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   PEM_read_bio_X509 (code)&lt;BR /&gt;   X509_STORE_get_by_subject (code)&lt;BR /&gt;   EVP_enc_null (code)&lt;BR /&gt;   X509_VERIFY_PARAM_set_purpose (code)&lt;BR /&gt;   X509_VERIFY_PARAM_set_trust (code)&lt;BR /&gt;   X509_STORE_CTX_init (code)&lt;BR /&gt;   PEM_read_bio_RSAPrivateKey (code)&lt;BR /&gt;   COMP_CTX_free (code)&lt;BR /&gt;   OPENSSL_DIR_end (code)&lt;BR /&gt;   BIO_f_buffer (code)&lt;BR /&gt;   X509_STORE_CTX_get_ex_new_index (code)&lt;BR /&gt;   X509_STORE_CTX_set_default (code)&lt;BR /&gt;   X509_STORE_CTX_cleanup (code)&lt;BR /&gt;   X509_STORE_set_default_paths (code)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;After that I cnhanged the order of the library files ..&lt;BR /&gt;  ie , lssl i gave first and then lcrypto .. then it worked  :) &lt;BR /&gt;&lt;BR /&gt;Thanks a lot &lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Binu&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Apr 2006 06:18:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-ccs-bin-ld-server-cxx-not-a-valid-object-file-invalid-system/m-p/3778543#M99324</guid>
      <dc:creator>msbinu</dc:creator>
      <dc:date>2006-04-28T06:18:57Z</dc:date>
    </item>
  </channel>
</rss>

