<?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 Static linking errors on Linux in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167964#M26826</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to create a shared object that statically links to the ipp libraries. I am using IPP 2018.3.222 on Ubuntu 18.04 and Ubuntu 16.04. I'm getting a lot of multiple definition link errors related to the ipp libs. I have tried wrapping the static libs with the -Wl,--whole-archive/--Wl,--no-whole-archive flags. Whn I do this I get the following errors:&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt;/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_y8.o):(.rodata+0x0): multiple definition of `__svml4ipp_z0_dexpla_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_k0.o):(.rodata+0x0): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_y8.o):(.rodata+0x500): multiple definition of `__svml4ipp_dexp_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_k0.o):(.rodata+0x500): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_y8.o):(.rodata+0x0): multiple definition of `__svml4ipp_z0_sexpla_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_k0.o):(.rodata+0x0): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_y8.o):(.rodata+0x4c0): multiple definition of `__svml4ipp_sexp_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_k0.o):(.rodata+0x4c0): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_l9.o):(.rodata+0x0): multiple definition of `__svml4ipp_z0_dexpla_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_k0.o):(.rodata+0x0): first defined here
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I've also tried wrapping the static lins with the -Wl,-Bstatic/-Wl,-Bdynamic flags. My shared object builds but the ipp symbols are undefined:&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt;nm libmyshared.so | grep ippi

                 U ippiBGRToCbYCr422_8u_AC4C2R
                 U ippiBGRToYCbCr422_8u_AC4C2R
                 U ippiCbYCr422ToBGR_8u_C2C4R
                 U ippiCFAToRGB_8u_C1C3R
                 U ippiDemosaicAHD_8u_C1C3R
                 U ippiGrayToRGB_8u_C1C4R
                 U ippiRGBToGray_8u_AC4C1R
                 U ippiRGBToYCbCr_8u_C3R
                 U ippiSwapChannels_8u_C3C4R
                 U ippiSwapChannels_8u_C3R
                 U ippiSwapChannels_8u_C4C3R
                 U ippiSwapChannels_8u_C4R
                 U ippiYCbCr422ToBGR_8u_C2C4R
                 U ippiYCbCrToRGB_8u_C3R
&lt;/PRE&gt;

&lt;P&gt;According to this article:&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://software.intel.com/en-us/ipp-dev-guide-linking-options" target="_blank"&gt;https://software.intel.com/en-us/ipp-dev-guide-linking-options&lt;/A&gt; I should also be linking to the Intel&amp;nbsp;C++ Compiler runtime libraries: libirc.a, libsvml.a, and libimf.a. I do not see these libraries in the IPP download directory or the IPP installation directory.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Aug 2018 08:07:43 GMT</pubDate>
    <dc:creator>NBeeze</dc:creator>
    <dc:date>2018-08-08T08:07:43Z</dc:date>
    <item>
      <title>Static linking errors on Linux</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167964#M26826</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I'm trying to create a shared object that statically links to the ipp libraries. I am using IPP 2018.3.222 on Ubuntu 18.04 and Ubuntu 16.04. I'm getting a lot of multiple definition link errors related to the ipp libs. I have tried wrapping the static libs with the -Wl,--whole-archive/--Wl,--no-whole-archive flags. Whn I do this I get the following errors:&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt;/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_y8.o):(.rodata+0x0): multiple definition of `__svml4ipp_z0_dexpla_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_k0.o):(.rodata+0x0): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_y8.o):(.rodata+0x500): multiple definition of `__svml4ipp_dexp_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_k0.o):(.rodata+0x500): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_y8.o):(.rodata+0x0): multiple definition of `__svml4ipp_z0_sexpla_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_k0.o):(.rodata+0x0): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_y8.o):(.rodata+0x4c0): multiple definition of `__svml4ipp_sexp_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_s_exp_data_exla_k0.o):(.rodata+0x4c0): first defined here
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_l9.o):(.rodata+0x0): multiple definition of `__svml4ipp_z0_dexpla_data'
/ipp-2018.3.222/lib/intel64_lin/libippi.a(svml_d_exp_data_exla_k0.o):(.rodata+0x0): first defined here
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I've also tried wrapping the static lins with the -Wl,-Bstatic/-Wl,-Bdynamic flags. My shared object builds but the ipp symbols are undefined:&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt;nm libmyshared.so | grep ippi

                 U ippiBGRToCbYCr422_8u_AC4C2R
                 U ippiBGRToYCbCr422_8u_AC4C2R
                 U ippiCbYCr422ToBGR_8u_C2C4R
                 U ippiCFAToRGB_8u_C1C3R
                 U ippiDemosaicAHD_8u_C1C3R
                 U ippiGrayToRGB_8u_C1C4R
                 U ippiRGBToGray_8u_AC4C1R
                 U ippiRGBToYCbCr_8u_C3R
                 U ippiSwapChannels_8u_C3C4R
                 U ippiSwapChannels_8u_C3R
                 U ippiSwapChannels_8u_C4C3R
                 U ippiSwapChannels_8u_C4R
                 U ippiYCbCr422ToBGR_8u_C2C4R
                 U ippiYCbCrToRGB_8u_C3R
&lt;/PRE&gt;

&lt;P&gt;According to this article:&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://software.intel.com/en-us/ipp-dev-guide-linking-options" target="_blank"&gt;https://software.intel.com/en-us/ipp-dev-guide-linking-options&lt;/A&gt; I should also be linking to the Intel&amp;nbsp;C++ Compiler runtime libraries: libirc.a, libsvml.a, and libimf.a. I do not see these libraries in the IPP download directory or the IPP installation directory.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 08:07:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167964#M26826</guid>
      <dc:creator>NBeeze</dc:creator>
      <dc:date>2018-08-08T08:07:43Z</dc:date>
    </item>
    <item>
      <title>I've also tried adding the</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167965#M26827</link>
      <description>&lt;P&gt;I've also tried adding the linker flag -Wl,--allow-multiple-definition and my shared object now builds. The issue now is that when I build an application that links to my shared object, I get the following errors:&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt;libmyshared.so: undefined reference to `own_ipps_sCbrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_dPow2o3_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dInvCbrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_sInvSqrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dPow3o2__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_sSqrt__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_sPow3o2_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dInvSqrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_sInv_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_sInv__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_dCbrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_sInvSqrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_dInvCbrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_sSqrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dInvSqrt__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_dCbrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_dInv__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_sInvSqrt__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_sCbrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dSqrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dPow2o3_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_sInv_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_sInvCbrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_dPow3o2_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_sPow2o3_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_sPow3o2_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_dPow3o2_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_sInvCbrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_sSqrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_dInvSqrt_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dSqrt_EX_ttab'
libmyshared.so: undefined reference to `own_ipps_dInv_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dSqrt__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_sPow3o2__VAL_CPU_ttab'
libmyshared.so: undefined reference to `own_ipps_sPow2o3_H8_ttab'
libmyshared.so: undefined reference to `own_ipps_dInv_EX_ttab'&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;My shared library statically links to the following ipp libs:&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:plain; class-name:dark;"&gt;libippcore.a
libippi.a
libippcc.a
libippch.a
libippcv.a
libippdc.a
libipps.a
libippvm.a&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Aug 2018 22:56:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167965#M26827</guid>
      <dc:creator>NBeeze</dc:creator>
      <dc:date>2018-08-08T22:56:18Z</dc:date>
    </item>
    <item>
      <title>please take a look at this</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167966#M26828</link>
      <description>&lt;P&gt;please take a look at this example - Building the First Example on Linux* OS: &lt;A href="https://software.intel.com/en-us/ipp-dev-guide-building-intel-ipp-applications" target="_blank"&gt;https://software.intel.com/en-us/ipp-dev-guide-building-intel-ipp-applications&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;and at the IPP dependencies by domains:&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&lt;A href="https://software.intel.com/en-us/ipp-dev-guide-library-dependencies-by-domain" target="_blank"&gt;https://software.intel.com/en-us/ipp-dev-guide-library-dependencies-by-domain&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Aug 2018 04:36:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167966#M26828</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2018-08-09T04:36:11Z</dc:date>
    </item>
    <item>
      <title>Hi NBeeze,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167967#M26829</link>
      <description>&lt;P&gt;Hi NBeeze,&lt;/P&gt;

&lt;P&gt;the unresolved symbols you see ("own_ipps_xxxxx_ttab") are from the "dead" code that is not used by any IPP function. To avoid these symbols you should create shared object with the export definition list. I think this approach will solve all mentioned above issues. Moreover - in this case the size of the shared object will have the minimum size, while with your current approach the dynamic library size will be equal to the sum of sizes of all libs you include.&lt;/P&gt;

&lt;P&gt;"dead" code will be removed in the future IPP releases. As well as duplicated symbols.&lt;/P&gt;

&lt;P&gt;regards, Igor&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2018 08:18:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167967#M26829</guid>
      <dc:creator>Igor_A_Intel</dc:creator>
      <dc:date>2018-08-10T08:18:35Z</dc:date>
    </item>
    <item>
      <title>Hi Igor,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167968#M26830</link>
      <description>&lt;P&gt;Hi Igor,&lt;/P&gt;

&lt;P&gt;Thanks for the info about the source of the unresolved symbols errors and for the tip for reducing the size of my shared object.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Aug 2018 04:26:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Static-linking-errors-on-Linux/m-p/1167968#M26830</guid>
      <dc:creator>NBeeze</dc:creator>
      <dc:date>2018-08-13T04:26:27Z</dc:date>
    </item>
  </channel>
</rss>

