<?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 Error Linux 32 bit in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LInking-Error-Linux-32-bit/m-p/884262#M9907</link>
    <description>For the dynamic link, you may need to assure that LD_LIBRARY_PATH is set. For the static link, you must include -Wl,--begin-group .... --Wl, --end-group (or equivalent), in accordance with provided examples, or repeat the library list a sufficient number of times to resolve the circular dependencies. If the libraries are listed in order, 3 repetitions should be sufficient.&lt;BR /&gt;</description>
    <pubDate>Thu, 22 May 2008 19:28:50 GMT</pubDate>
    <dc:creator>TimP</dc:creator>
    <dc:date>2008-05-22T19:28:50Z</dc:date>
    <item>
      <title>LInking Error Linux 32 bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LInking-Error-Linux-32-bit/m-p/884261#M9906</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have the following system setup&lt;BR /&gt;- Linux Ubuntu 8.04 32 bit&lt;BR /&gt;- compiler gcc 4.1&lt;BR /&gt;- Intel MKL 10.0.2.018&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------------------------------------------------&lt;BR /&gt;1. Question (static &amp;amp; dynamic linking): &lt;BR /&gt;My makefile looks like &lt;BR /&gt;&lt;I&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000ff"&gt;MKL_PATH = /opt/intel/mkl/10.0.2.018&lt;BR /&gt;MKL_INC = $(MKL_PATH)/include&lt;BR /&gt;MKL_LIB = $(MKL_PATH)/lib/32&lt;BR /&gt;&lt;BR /&gt;main : main.o&lt;BR /&gt; gcc main.o -L$(MKL_LIB) -lmkl_intel -lmkl_intel_thread -lmkl_core -lguide -lpthread -lm -o main &lt;BR /&gt;&lt;BR /&gt;main.o: main.c&lt;BR /&gt; gcc -c main.c -I$(MKL_INC)&lt;/FONT&gt;&lt;/I&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;The main function looks like this:&lt;BR /&gt;&lt;I&gt;&lt;FONT size="2"&gt;&lt;FONT color="#0000ff"&gt;#include &lt;MKL_LAPACK.H&gt;&lt;BR /&gt;#include &lt;MKL_CBLAS.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt; int i;&lt;BR /&gt; const int m = 10;&lt;BR /&gt; const int n = 10;&lt;BR /&gt; float data1[m*n];&lt;BR /&gt; float res[m*n];&lt;BR /&gt;&lt;BR /&gt; int ipiv&lt;N&gt;;&lt;BR /&gt; int info;&lt;BR /&gt; &lt;BR /&gt; for(i = 0; i &amp;lt; m*n; i++)&lt;BR /&gt;  data1&lt;I&gt; = 1;&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; printf("%f 
", cblas_sasum(m*n, data1, 1));&lt;BR /&gt;&lt;BR /&gt; sgetrf(&amp;amp;m,&amp;amp;n,data1,&amp;amp;m,ipiv,&amp;amp;info);&lt;BR /&gt; &lt;BR /&gt; printf("Info %d
",info);&lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;/I&gt;&lt;/N&gt;&lt;/STDIO.H&gt;&lt;/MKL_CBLAS.H&gt;&lt;/MKL_LAPACK.H&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/I&gt;I get the following error: &lt;FONT color="#ff0000"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;I&gt;./main: error while loading shared libraries: libguide.so: cannot open shared object file: No such file or directory&lt;/I&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;If I change the make file to &lt;BR /&gt;&lt;I&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;main : main.o&lt;BR /&gt; gcc main.o -L$(MKL_LIB) $(MKL_LIB)/libmkl_intel.a $(MKL_LIB)/libmkl_intel_thread.a $(MKL_LIB)/libmkl_core.a $(MKL_LIB)/libguide.a -lpthread -lm -o main&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;it works. Why ?&lt;BR /&gt;-------------------------------------------------------------------------------------&lt;BR /&gt;2. Question :&lt;BR /&gt;If I add the sgeev command from the lapack library and invoke the makefile with the &lt;B&gt;second (working)&lt;/B&gt; above mentioned configuration,&lt;BR /&gt;&lt;I&gt;&lt;FONT size="2"&gt;&lt;BR /&gt;&lt;FONT color="#0000ff"&gt;sgeev(&amp;amp;jobvl, &amp;amp;jobvr, &amp;amp;n, data1, &amp;amp;n, wr, wi, vl , &amp;amp;ldvr, vr, &amp;amp;ldvr, work, &amp;amp;lwork, &amp;amp;info);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt; I get the following error message:&lt;BR /&gt;&lt;FONT size="2"&gt;&lt;I&gt;&lt;BR /&gt;&lt;FONT color="#ff0000"&gt;/opt/intel/mkl/10.0.2.018/lib/32/libmkl_core.a(sgehrd.o): In function `mkl_lapack_sgehrd':&lt;BR /&gt;__tmp_sgehrd.f:(.text+0x787): undefined reference to `mkl_blas_strmm'&lt;BR /&gt;/opt/intel/mkl/10.0.2.018/lib/32/libmkl_core.a(slahr2.o): In function `mkl_lapack_slahr2':&lt;BR /&gt;__tmp_slahr2.f:(.text+0xd35): undefined reference to `mkl_blas_strmm'&lt;BR /&gt;__tmp_slahr2.f:(.text+0xe72): undefined reference to `mkl_blas_strmm'&lt;BR /&gt;/opt/intel/mkl/10.0.2.018/lib/32/libmkl_core.a(slaqr5.o): In function `mkl_lapack_slaqr5':&lt;BR /&gt;__tmp_slaqr5.f:(.text+0x1f20): undefined reference to `mkl_blas_strmm'&lt;BR /&gt;__tmp_slaqr5.f:(.text+0x2056): undefined reference to `mkl_blas_strmm'&lt;BR /&gt;/opt/intel/mkl/10.0.2.018/lib/32/libmkl_core.a(slaqr5.o):__tmp_slaqr5.f:(.text+0x2883): more undefined references to `mkl_blas_strmm' follow&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;make: *** [main] Error 1&lt;/FONT&gt;&lt;/I&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;What needs to be done for a correct call of the main function.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 May 2008 10:58:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LInking-Error-Linux-32-bit/m-p/884261#M9906</guid>
      <dc:creator>sicb0161</dc:creator>
      <dc:date>2008-05-22T10:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: LInking Error Linux 32 bit</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LInking-Error-Linux-32-bit/m-p/884262#M9907</link>
      <description>For the dynamic link, you may need to assure that LD_LIBRARY_PATH is set. For the static link, you must include -Wl,--begin-group .... --Wl, --end-group (or equivalent), in accordance with provided examples, or repeat the library list a sufficient number of times to resolve the circular dependencies. If the libraries are listed in order, 3 repetitions should be sufficient.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 May 2008 19:28:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/LInking-Error-Linux-32-bit/m-p/884262#M9907</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2008-05-22T19:28:50Z</dc:date>
    </item>
  </channel>
</rss>

