<?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 You're welcome. I hope you in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923299#M13573</link>
    <description>&lt;P&gt;You're welcome. I hope you can easily resolve the library need for your app and move forward without too much additional work.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Feb 2014 10:10:49 GMT</pubDate>
    <dc:creator>Kevin_D_Intel</dc:creator>
    <dc:date>2014-02-25T10:10:49Z</dc:date>
    <item>
      <title>Library linking problem when compiling the code for MIC cores in the host</title>
      <link>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923295#M13569</link>
      <description>&lt;P&gt;I want to compile a code that aims to run natively in mic cores in the host. The code complies well and run correctly in the host. [hpc1]$ icc -no-multibyte-chars test_mic.c -o test_mic -lcrypto [hpc1]$ ./rsa_mic I then compiled the same code for mic cores. As far as I know, when the option -mmic is added, the default paths for the include files and the libraries will change, so I point them out (-I/usr/include/ -L/usr/lib64/). It seems that something is wrong in linking the libcrypt library. [hpc1]$ icc -mmic -no-multibyte-chars test_mic.c -o test_mic -I/usr/include/ -L/usr/lib64/ -lcrypto x86_64-k1om-linux-ld: skipping incompatible /usr/lib64//libcrypto.so when searching for -lcrypto x86_64-k1om-linux-ld: cannot find -lcrypto x86_64-k1om-linux-ld: skipping incompatible /usr/lib64//libm.so when searching for -lm x86_64-k1om-linux-ld: skipping incompatible /usr/lib64//libc.so when searching for -lc It would be great if I could get your help. Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2014 05:14:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923295#M13569</guid>
      <dc:creator>Cheng_C_</dc:creator>
      <dc:date>2014-02-23T05:14:12Z</dc:date>
    </item>
    <item>
      <title>For the format.</title>
      <link>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923296#M13570</link>
      <description>&lt;P&gt;For the format.&lt;/P&gt;

&lt;P&gt;I want to compile a code that aims to run natively in MIC cores in the host.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;The code compiles well and run&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;correctly in the host.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;[hpc1]$ icc -no-multibyte-chars test_mic.c -o test_mic -lcrypto &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;[hpc1]$ ./rsa_mic&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;I then compiled the same code for mic cores. As far as I know, when the option -mmic is added, the default paths for the include files and the libraries will change, so I point them out (-I/usr/include/ -L/usr/lib64/). It seems that something is wrong in linking the libcrypt library.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;[hpc1]$ icc -mmic -no-multibyte-chars test_mic.c -o test_mic -I/usr/include/ -L/usr/lib64/ -lcrypto &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;x86_64-k1om-linux-ld: skipping incompatible /usr/lib64//libcrypto.so when searching for -lcrypto &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;x86_64-k1om-linux-ld: cannot find -lcrypto x86_64-k1om-linux-ld: skipping incompatible /usr/lib64//libm.so when searching for -lm &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;x86_64-k1om-linux-ld: skipping incompatible /usr/lib64//libc.so when searching for -lc&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 18px;"&gt;It would be great if I could get your help. Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 23 Feb 2014 05:27:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923296#M13570</guid>
      <dc:creator>Cheng_C_</dc:creator>
      <dc:date>2014-02-23T05:27:55Z</dc:date>
    </item>
    <item>
      <title>The /usr/lib64//libcrypto.so</title>
      <link>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923297#M13571</link>
      <description>&lt;P&gt;The &lt;STRONG&gt;/usr/lib64//libcrypto.so&lt;/STRONG&gt; you directed the compilation/link to was not built with &lt;STRONG&gt;-mmic&lt;/STRONG&gt; and that produces the error you received. Redirecting the &lt;STRONG&gt;-mmic &lt;/STRONG&gt;compile/link to the &lt;STRONG&gt;-L/usr/lib64/&lt;/STRONG&gt; causes the further confusion with other needed libraries also.&lt;/P&gt;

&lt;P&gt;As you noted, the &lt;STRONG&gt;-mmic &lt;/STRONG&gt;option adjusts include/library paths accordingly to ensure compatible headers/libs are used so you need to allow the compiler option to select the appropriate paths.&lt;/P&gt;

&lt;P&gt;I do not see a &lt;STRONG&gt;libcrypto.so&lt;/STRONG&gt; available in the &lt;STRONG&gt;/usr/linux-k1om-4.7/linux-k1om &lt;/STRONG&gt;(which sym-links to &lt;STRONG&gt;/opt/mpss/3.1/sysroots/k1om-mpss-linux/&lt;/STRONG&gt; under MPSS 3.1) so if you require that particular library then you may have to build it yourself. There is a &lt;STRONG&gt;libcrypt.so&lt;/STRONG&gt; provided under this area but I do not know whether that suites your app’s need. You could try by dropping your &lt;STRONG&gt;&lt;EM&gt;-I/usr/include/ -L/usr/lib64/&lt;/EM&gt; &lt;/STRONG&gt;options to see.&lt;/P&gt;

&lt;P&gt;If you require a specific libcrytpo then you may need to build that from source yourself. There is some guidance available in the &lt;STRONG&gt;Configuring Intel® Xeon Phi™ coprocessors inside a cluster &lt;/STRONG&gt;guide (&lt;A href="http://software.intel.com/en-us/articles/configuring-intel-xeon-phi-coprocessors-inside-a-cluster"&gt;http://software.intel.com/en-us/articles/configuring-intel-xeon-phi-coprocessors-inside-a-cluster&lt;/A&gt;).&amp;nbsp; Look at sections &lt;STRONG&gt;Native compiler for Intel Xeon Phi Coprocessor &lt;/STRONG&gt;and &lt;STRONG&gt;Compiling native GNU tools&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2014 11:13:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923297#M13571</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-02-24T11:13:29Z</dc:date>
    </item>
    <item>
      <title>Kelvin, thanks very much for</title>
      <link>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923298#M13572</link>
      <description>&lt;P&gt;Kelvin, thanks very much for the detailed and penetrating explanations. It's very helpful!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Kevin Davis (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The &lt;STRONG&gt;/usr/lib64//libcrypto.so&lt;/STRONG&gt; you directed the compilation/link to was not built with &lt;STRONG&gt;-mmic&lt;/STRONG&gt; and that produces the error you received. Redirecting the &lt;STRONG&gt;-mmic &lt;/STRONG&gt;compile/link to the &lt;STRONG&gt;-L/usr/lib64/&lt;/STRONG&gt; causes the further confusion with other needed libraries also.&lt;/P&gt;

&lt;P&gt;As you noted, the &lt;STRONG&gt;-mmic &lt;/STRONG&gt;option adjusts include/library paths accordingly to ensure compatible headers/libs are used so you need to allow the compiler option to select the appropriate paths.&lt;/P&gt;

&lt;P&gt;I do not see a &lt;STRONG&gt;libcrypto.so&lt;/STRONG&gt; available in the &lt;STRONG&gt;/usr/linux-k1om-4.7/linux-k1om &lt;/STRONG&gt;(which sym-links to &lt;STRONG&gt;/opt/mpss/3.1/sysroots/k1om-mpss-linux/&lt;/STRONG&gt; under MPSS 3.1) so if you require that particular library then you may have to build it yourself. There is a &lt;STRONG&gt;libcrypt.so&lt;/STRONG&gt; provided under this area but I do not know whether that suites your app’s need. You could try by dropping your &lt;STRONG&gt;&lt;EM&gt;-I/usr/include/ -L/usr/lib64/&lt;/EM&gt; &lt;/STRONG&gt;options to see.&lt;/P&gt;

&lt;P&gt;If you require a specific libcrytpo then you may need to build that from source yourself. There is some guidance available in the &lt;STRONG&gt;Configuring Intel® Xeon Phi™ coprocessors inside a cluster &lt;/STRONG&gt;guide (&lt;A href="http://software.intel.com/en-us/articles/configuring-intel-xeon-phi-coprocessors-inside-a-cluster"&gt;http://software.intel.com/en-us/articles/configuring-intel-xeon-phi-coprocessors-inside-a-cluster&lt;/A&gt;).&amp;nbsp; Look at sections &lt;STRONG&gt;Native compiler for Intel Xeon Phi Coprocessor &lt;/STRONG&gt;and &lt;STRONG&gt;Compiling native GNU tools&lt;/STRONG&gt;.&lt;/P&gt;

&lt;P&gt;Hope that helps.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2014 02:50:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923298#M13572</guid>
      <dc:creator>Cheng_C_</dc:creator>
      <dc:date>2014-02-25T02:50:42Z</dc:date>
    </item>
    <item>
      <title>You're welcome. I hope you</title>
      <link>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923299#M13573</link>
      <description>&lt;P&gt;You're welcome. I hope you can easily resolve the library need for your app and move forward without too much additional work.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2014 10:10:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Library-linking-problem-when-compiling-the-code-for-MIC-cores-in/m-p/923299#M13573</guid>
      <dc:creator>Kevin_D_Intel</dc:creator>
      <dc:date>2014-02-25T10:10:49Z</dc:date>
    </item>
  </channel>
</rss>

