<?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: linking against a &amp;quot;dummy&amp;quot; shared library in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/linking-against-a-quot-dummy-quot-shared-library/m-p/756473#M11960</link>
    <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/367365"&gt;tim18&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; The -i-static option looks like a problem here. I think you would want to leave the linking of Intel run-time libraries until the final link, rather than attempting to link bits of them statically into each of your libraries, even if you are restricting the final link to static only.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thanks, got it to work. &lt;BR /&gt;&lt;BR /&gt;I took the "-i-static" out of the linker commands for the shared libraries, and included "-static-intel" in the final link statement. However, now it needs /opt/intel/fc/10.1.015/lib to be in $LD_LIBRARY_PATH. Is there any way around that?&lt;BR /&gt;</description>
    <pubDate>Tue, 23 Jun 2009 13:33:53 GMT</pubDate>
    <dc:creator>gregfi04</dc:creator>
    <dc:date>2009-06-23T13:33:53Z</dc:date>
    <item>
      <title>linking against a "dummy" shared library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/linking-against-a-quot-dummy-quot-shared-library/m-p/756471#M11958</link>
      <description>My codebase is split up into groups of subroutines that offer separate functionality, but ultimately make use of the same data set. I'd like to be able to compile each group of subroutines into a shared library, and then have the ability to customize the distribution on a per-user group basis. My thought is to compile a set of "dummy" libraries to satisfy the executable at runtime and gracefully exit the program. Is there any reason why this shouldn't work?&lt;BR /&gt;&lt;BR /&gt;Here's an example of the code I'm using for the dummy library:&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt; &lt;BR /&gt;subroutine subroutine1&lt;BR /&gt; USE MODULE1&lt;BR /&gt; USE MODULE2&lt;BR /&gt; implicit none&lt;BR /&gt;&lt;BR /&gt; write(*,*) 'ERROR: THIS MODULE IS NOT PRESENT'&lt;BR /&gt; write(*,*) 'IN THIS DISTRIBUTION OF THE CODE.'&lt;BR /&gt; stop&lt;BR /&gt;&lt;BR /&gt;end subroutine subroutine1&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;I'm compiling the shared library with the following command:&lt;BR /&gt;&lt;BR /&gt;ifort -g -O0 -CB -fpic -shared -i-static -module ../../build -o libdummy.so dummy.f90&lt;BR /&gt;&lt;BR /&gt;However, when I try to run the executable (after properly setting $LD_LIBRARY_PATH), I get the following:&lt;BR /&gt;&lt;BR /&gt;./code: symbol lookup error: ./code: undefined symbol: for_concat&lt;BR /&gt;&lt;BR /&gt;Thoughts?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Greg&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jun 2009 21:19:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/linking-against-a-quot-dummy-quot-shared-library/m-p/756471#M11958</guid>
      <dc:creator>gregfi04</dc:creator>
      <dc:date>2009-06-22T21:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: linking against a "dummy" shared library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/linking-against-a-quot-dummy-quot-shared-library/m-p/756472#M11959</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/316344"&gt;gregfi04&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt;My codebase is split up into groups of subroutines that offer separate functionality, but ultimately make use of the same data set. I'd like to be able to compile each group of subroutines into a shared library, and then have the ability to customize the distribution on a per-user group basis. My thought is to compile a set of "dummy" libraries to satisfy the executable at runtime and gracefully exit the program. Is there any reason why this shouldn't work?&lt;BR /&gt;&lt;BR /&gt;Here's an example of the code I'm using for the dummy library:&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt; &lt;BR /&gt;subroutine subroutine1&lt;BR /&gt; USE MODULE1&lt;BR /&gt; USE MODULE2&lt;BR /&gt; implicit none&lt;BR /&gt;&lt;BR /&gt; write(*,*) 'ERROR: THIS MODULE IS NOT PRESENT'&lt;BR /&gt; write(*,*) 'IN THIS DISTRIBUTION OF THE CODE.'&lt;BR /&gt; stop&lt;BR /&gt;&lt;BR /&gt;end subroutine subroutine1&lt;BR /&gt;&lt;BR /&gt;---&lt;BR /&gt;&lt;BR /&gt;I'm compiling the shared library with the following command:&lt;BR /&gt;&lt;BR /&gt;ifort -g -O0 -CB -fpic -shared -i-static -module ../../build -o libdummy.so dummy.f90&lt;BR /&gt;&lt;BR /&gt;However, when I try to run the executable (after properly setting $LD_LIBRARY_PATH), I get the following:&lt;BR /&gt;&lt;BR /&gt;./code: symbol lookup error: ./code: undefined symbol: for_concat&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
The -i-static option looks like a problem here. I think you would want to leave the linking of Intel run-time libraries until the final link, rather than attempting to link bits of them statically into each of your libraries, even if you are restricting the final link to static only.&lt;BR /&gt;</description>
      <pubDate>Mon, 22 Jun 2009 21:55:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/linking-against-a-quot-dummy-quot-shared-library/m-p/756472#M11959</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2009-06-22T21:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: linking against a "dummy" shared library</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/linking-against-a-quot-dummy-quot-shared-library/m-p/756473#M11960</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/367365"&gt;tim18&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; The -i-static option looks like a problem here. I think you would want to leave the linking of Intel run-time libraries until the final link, rather than attempting to link bits of them statically into each of your libraries, even if you are restricting the final link to static only.&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;Thanks, got it to work. &lt;BR /&gt;&lt;BR /&gt;I took the "-i-static" out of the linker commands for the shared libraries, and included "-static-intel" in the final link statement. However, now it needs /opt/intel/fc/10.1.015/lib to be in $LD_LIBRARY_PATH. Is there any way around that?&lt;BR /&gt;</description>
      <pubDate>Tue, 23 Jun 2009 13:33:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/linking-against-a-quot-dummy-quot-shared-library/m-p/756473#M11960</guid>
      <dc:creator>gregfi04</dc:creator>
      <dc:date>2009-06-23T13:33:53Z</dc:date>
    </item>
  </channel>
</rss>

