title: Problems linking to IPP libs on 64-bit Linux
body: <p>I am statically linking to the ipp, umc &amp; uic libraries. I am using IPP 6.1.6.063 and have downloaded the 6.1 sample code. I am using g++.</p>
  
  <p>I can build my own shared object that statically links to ipp and umc, but when I try to build an application that links to my shared object, I get the following link error:</p>
  
  <p>/opt/intel/ipp/6.1.6.063/emt64/sharedlib/libiomp5.so: undefined reference to `pthread_atfork'</p>
  
  <p>I did see the following note in this article: 
  <a href="http://software.intel.com/en-us/articles/how-to-build-ipp-application-in-linux-environment/" rel="nofollow">http://software.intel.com/en-us/articles/how-to-build-ipp-application-in-linux-environment/</a></p>
  
  <p>Error message: /opt/intel/ipp/6.1.6.063/em64t/sharedlib/libiomp5.so: undefined reference to `pthread_atfork'</p>
  
  <pre><code>* Please make sure to link "-lpthread" library in your command line.
  </code></pre>
  
  <p>I do have -lpthread specified, but the error still occurs. </p>
  
  <p>I originally had this problem under 32-bit linux, but this was resolved after specifying -lpthread after -libiomp5 in the linker file list. Using the same build command does not work under 64-bit linux though. I still get the same error. </p>
  
  <p>One way to resolve this problem is to specify -lpthread when building the application. But this would require anyone using my shared object to do the same which shouldn't be necessary because as I mentioned it works properly under 32-bit linux. </p>
  
  <p>Is there something specific to 64-bit that I am not considering?</p>
  
  <p>Here is the output from ldd :</p>
  
  <pre><code>linux-vdso.so.1 =&gt;  (0x00007fffbad20000)
  libraw1394.so.11 =&gt; /usr/lib/libraw1394.so.11 (0x00007ff3b6fdd000)
  librt.so.1 =&gt; /lib/librt.so.1 (0x00007ff3b6dd5000)
  libiomp5.so =&gt; not found
  libpthread.so.0 =&gt; /lib/libpthread.so.0 (0x00007ff3b6bb7000)
  libusb-1.0.so.0 =&gt; /lib/libusb-1.0.so.0 (0x00007ff3b69a9000)
  libstdc++.so.6 =&gt; /usr/lib/libstdc++.so.6 (0x00007ff3b6694000)
  libm.so.6 =&gt; /lib/libm.so.6 (0x00007ff3b6411000)
  libc.so.6 =&gt; /lib/libc.so.6 (0x00007ff3b608e000)
  libgcc_s.so.1 =&gt; /lib/libgcc_s.so.1 (0x00007ff3b5e76000)
  /lib64/ld-linux-x86-64.so.2 (0x00007ff3b8475000)
  </code></pre>
  
  <p>And the output from objdump -private-headers :</p>
  
  <pre><code>libfrenet.so:     file format elf64-x86-64
  
  Program Header:
      LOAD off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**21
           filesz 0x000000000102ec8e memsz 0x000000000102ec8e flags r-x
      LOAD off    0x000000000102f3a8 vaddr 0x000000000122f3a8 paddr 0x000000000122f3a8 align 2**21
           filesz 0x00000000000433f8 memsz 0x0000000000048700 flags rw-
   DYNAMIC off    0x000000000103c9d8 vaddr 0x000000000123c9d8 paddr 0x000000000123c9d8 align 2**3
           filesz 0x0000000000000220 memsz 0x0000000000000220 flags rw-
      NOTE off    0x00000000000001c8 vaddr 0x00000000000001c8 paddr 0x00000000000001c8 align 2**2
           filesz 0x0000000000000024 memsz 0x0000000000000024 flags r--
  EH_FRAME off    0x0000000000eb8c10 vaddr 0x0000000000eb8c10 paddr 0x0000000000eb8c10 align 2**2
           filesz 0x000000000001f974 memsz 0x000000000001f974 flags r--
     STACK off    0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**3
           filesz 0x0000000000000000 memsz 0x0000000000000000 flags rwx
     RELRO off    0x000000000102f3a8 vaddr 0x000000000122f3a8 paddr 0x000000000122f3a8 align 2**0
           filesz 0x000000000000fc58 memsz 0x000000000000fc58 flags r--
  
  Dynamic Section:
    NEEDED               libraw1394.so.11
    NEEDED               librt.so.1
    NEEDED               libiomp5.so
    NEEDED               libpthread.so.0
    NEEDED               libusb-1.0.so.0
    NEEDED               libstdc++.so.6
    NEEDED               libm.so.6
    NEEDED               libc.so.6
    NEEDED               libgcc_s.so.1
    SONAME               libfrenet.so.2
    INIT                 0x0000000000199850
    FINI                 0x0000000000db7018
    HASH                 0x00000000000001f0
    GNU_HASH             0x0000000000015308
    STRTAB               0x000000000007c2d8
    SYMTAB               0x000000000002de10
    STRSZ                0x00000000000a95ec
    SYMENT               0x0000000000000018
    PLTGOT               0x000000000123efe8
    PLTRELSZ             0x000000000002f370
    PLTREL               0x0000000000000007
    JMPREL               0x000000000016a4e0
    RELA                 0x000000000012c260
    RELASZ               0x000000000003e280
    RELAENT              0x0000000000000018
    VERNEED              0x000000000012c130
    VERNEEDNUM           0x0000000000000005
    VERSYM               0x00000000001258c4
    RELACOUNT            0x0000000000001428
  
  Version References:
    required from libgcc_s.so.1:
      0x0b792650 0x00 15 GCC_3.0
    required from libm.so.6:
      0x09691a75 0x00 07 GLIBC_2.2.5
    required from libstdc++.so.6:
      0x0bafd171 0x00 13 CXXABI_1.3.1
      0x02297f89 0x00 10 GLIBCXX_3.4.9
      0x056bafd3 0x00 05 CXXABI_1.3
      0x08922974 0x00 04 GLIBCXX_3.4
    required from libpthread.so.0:
      0x09691a75 0x00 06 GLIBC_2.2.5
      0x09691972 0x00 03 GLIBC_2.3.2
    required from libc.so.6:
      0x0d696913 0x00 14 GLIBC_2.3
      0x0d696917 0x00 12 GLIBC_2.7
      0x0d696914 0x00 11 GLIBC_2.4
      0x09691972 0x00 09 GLIBC_2.3.2
      0x09691974 0x00 08 GLIBC_2.3.4
      0x09691a75 0x00 02 GLIBC_2.2.5
  </code></pre>
  
  <p>Thanks.</p>