<?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 Before I run make, I run the in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005587#M32013</link>
    <description>&lt;P&gt;Before I run make, I run the following commands:&lt;/P&gt;

&lt;P&gt;source compilevars.sh intel64&lt;/P&gt;

&lt;P&gt;source iccvars.sh intel64&lt;/P&gt;

&lt;P&gt;source ifortvars.sh intel64&lt;/P&gt;

&lt;P&gt;source ~/intel/parallel_studio_2016/bin/psxvars.sh intel64&lt;/P&gt;

&lt;P&gt;export MIC_LD_LIBRARY_PATH=/home/gdg217/intel/lib/mic/&lt;/P&gt;

&lt;P&gt;make&lt;/P&gt;

&lt;P&gt;Result - still the same error:&lt;/P&gt;

&lt;P&gt;/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: could not read symbols: File in wrong format&lt;/P&gt;

&lt;P&gt;----------------&lt;/P&gt;

&lt;P&gt;file&amp;nbsp;/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so&amp;nbsp;&lt;/P&gt;

&lt;P&gt;-&amp;gt;&amp;nbsp;/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Oct 2015 03:29:29 GMT</pubDate>
    <dc:creator>Georgi_G_1</dc:creator>
    <dc:date>2015-10-09T03:29:29Z</dc:date>
    <item>
      <title>Linking C++ and Fortran objects</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005582#M32008</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 21.68px;"&gt;Platform:&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 21.68px;"&gt;CentOS release 6.6 (Final)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;GCC: 4.9.1&lt;/P&gt;

&lt;P&gt;Intel Parallel Studio Cluster Edition 2016&lt;/P&gt;

&lt;P&gt;I am working on a bioinformatics application that my team and I have successfully compiled for Intel Xeon processor. Now we're trying to compile the application for MIC but we have a hard time linking it. The error that we get is the following:&lt;/P&gt;

&lt;P&gt;x86_64-k1om-linux-ld: cannot find -lstadc++&lt;BR /&gt;
	/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: could not read symbols: File in wrong format&lt;/P&gt;

&lt;P&gt;I have attached the makefile. Also, is there a tutorial on how to link multiple languages together for MIC because I was searching for a long time and couldn't find anything useful.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 13:32:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005582#M32008</guid>
      <dc:creator>Georgi_G_1</dc:creator>
      <dc:date>2015-10-06T13:32:11Z</dc:date>
    </item>
    <item>
      <title>Is sta++ a misspelling of std</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005583#M32009</link>
      <description>&lt;P&gt;Is sta++ a misspelling of std++ ? You must use -mmic consistently for both compile and link, debug or no debug. When you try to link k1om Mic objects against host libraries you will see such link errors.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 14:02:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005583#M32009</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2015-10-06T14:02:49Z</dc:date>
    </item>
    <item>
      <title>The sta++ was a type, I</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005584#M32010</link>
      <description>&lt;P&gt;The sta++ was a typo, I corrected it. I also changed the makefile but the error about the wrong format persists. I attach the updated makefile&lt;/P&gt;</description>
      <pubDate>Tue, 06 Oct 2015 14:18:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005584#M32010</guid>
      <dc:creator>Georgi_G_1</dc:creator>
      <dc:date>2015-10-06T14:18:00Z</dc:date>
    </item>
    <item>
      <title>Nobody has an idea how to</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005585#M32011</link>
      <description>&lt;P&gt;Nobody has an idea how to solve this problem?&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 01:30:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005585#M32011</guid>
      <dc:creator>Georgi_G_1</dc:creator>
      <dc:date>2015-10-09T01:30:35Z</dc:date>
    </item>
    <item>
      <title>My apologies. I should have</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005586#M32012</link>
      <description>&lt;P&gt;My apologies. I should have gotten to this earlier.&lt;/P&gt;

&lt;P&gt;Prior to using the Intel compilers, you should execute "source {installation_dir}/parallel_studio_xe_{version}/bin/psxevars.sh intel64" (or ". {installation_dir}/parallel_studio_xe_{version}/bin/psxevars.csh intel64" for csh). From your make file it looks like installation_dir is /srv/michome/gdg217/intel/. It is difficult to set the library paths yourself. From your makefile, it appears there are a number of files missing. I believe you should be able to prepend the path to those debug libraries after that but make sure you prepend the mic path to MIC_LD_LIBRARY_PATH. See if that helps.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 02:33:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005586#M32012</guid>
      <dc:creator>Frances_R_Intel</dc:creator>
      <dc:date>2015-10-09T02:33:00Z</dc:date>
    </item>
    <item>
      <title>Before I run make, I run the</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005587#M32013</link>
      <description>&lt;P&gt;Before I run make, I run the following commands:&lt;/P&gt;

&lt;P&gt;source compilevars.sh intel64&lt;/P&gt;

&lt;P&gt;source iccvars.sh intel64&lt;/P&gt;

&lt;P&gt;source ifortvars.sh intel64&lt;/P&gt;

&lt;P&gt;source ~/intel/parallel_studio_2016/bin/psxvars.sh intel64&lt;/P&gt;

&lt;P&gt;export MIC_LD_LIBRARY_PATH=/home/gdg217/intel/lib/mic/&lt;/P&gt;

&lt;P&gt;make&lt;/P&gt;

&lt;P&gt;Result - still the same error:&lt;/P&gt;

&lt;P&gt;/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: could not read symbols: File in wrong format&lt;/P&gt;

&lt;P&gt;----------------&lt;/P&gt;

&lt;P&gt;file&amp;nbsp;/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so&amp;nbsp;&lt;/P&gt;

&lt;P&gt;-&amp;gt;&amp;nbsp;/opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, stripped&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 03:29:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005587#M32013</guid>
      <dc:creator>Georgi_G_1</dc:creator>
      <dc:date>2015-10-09T03:29:29Z</dc:date>
    </item>
    <item>
      <title>Right, I just realized I</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005588#M32014</link>
      <description>&lt;P&gt;Right, I just realized I messed up. Of course you have sourced that file. If you hadn't, your makefile would have blown up.&lt;/P&gt;

&lt;P&gt;Let's see if I can get it right this time.&lt;/P&gt;

&lt;P&gt;You only need "source ~/intel/parallel_studio_2016/bin/psxvars.sh intel64". That script runs {install_dir}/compilers_and_libraries_{version}/linux/bin/compilervars.sh. The files iccvars.sh and ifortvars.sh are now aliases for compilervars.sh. Once you have run psxvars.sh, do not write over MIC_LD_LIBRARY_PATH or MIC_LIBRARY_PATH. If you have local libraries (which I don't see), you can append their location to MIC_LD_LIBRARY_PATH or MIC_LIBRARY_PATH as appropriate but don't write over them.&lt;/P&gt;

&lt;P&gt;After that I would let the icc and ifort figure out which libraries they need based on the flags you set rather than trying to find the right ones yourself.&lt;/P&gt;

&lt;P&gt;To use the debug libraries for tbb, add -DTBB_USE_DEBUG to your flags. You should not need to explicitly specify the names or locations of the debug libraries when MIC_LD_LIBRARY_PATH is set correctly. So I think you should comment out those lines.&lt;/P&gt;

&lt;P&gt;I'm not sure why you are specifying /opt/mpss/3.2.1/sysroots/x86_64-mpsssdk-linux/lib/libc-2.14.90.so and {install_dir}/advisor_xe_2016.1.0.423501/lib64/pinruntime/glibc/libc.so.6 in LIBS. They will conflict. Again, I think you should comment that out and let the compiler find the right library.&lt;/P&gt;

&lt;P&gt;Finally, I don't think it is a good idea to specify --dynamic-linker. Let icc and ifort choose the right one.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Oct 2015 11:09:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005588#M32014</guid>
      <dc:creator>Frances_R_Intel</dc:creator>
      <dc:date>2015-10-09T11:09:32Z</dc:date>
    </item>
    <item>
      <title>I followed your advice and</title>
      <link>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005589#M32015</link>
      <description>&lt;P&gt;Thank you!!!&lt;/P&gt;

&lt;P&gt;I followed your advice and changed the makefile. I tried again and I got a few pages of errors of undefined references before realizing that I had to put the library links (-ltbb) after the -o flag. I fixed that error and it worked perfectly. I attach the makefile for other people's reference.&lt;BR /&gt;
	&lt;BR /&gt;
	Note: I also had to export the path to&amp;nbsp;libtbb.so.2 because I didn't have root access to the machine and the installation is local&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;[SOLVED]&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Oct 2015 19:29:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Linking-C-and-Fortran-objects/m-p/1005589#M32015</guid>
      <dc:creator>Georgi_G_1</dc:creator>
      <dc:date>2015-10-10T19:29:00Z</dc:date>
    </item>
  </channel>
</rss>

