Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Compiling ipp_bzip2 statically?

ippstatic
Beginner
597 Views
Hello, I am trying to compile all of the code samples for IPP statically and am having some trouble with ipp_bzip2. I have LIBRARY_PATH, LD_LIBRARY_PATH, and IPPROOT exported correctly. I have also exported LINKAGE=static and LINKFLAGS=-static so that the executable will be created using static libraries.

When I run ./build32.sh gcc4 I get the following errors:

[bash]./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `decode_block':
ipp_bzlib.c:(.text+0x216): undefined reference to `ippsDecodeZ1Z2_BZ2_16u8u'
ipp_bzlib.c:(.text+0x23f): undefined reference to `ippsMTFInit_8u'
ipp_bzlib.c:(.text+0x260): undefined reference to `ippsMTFInv_8u'
ipp_bzlib.c:(.text+0x288): undefined reference to `ippsBWTInv_8u'
ipp_bzlib.c:(.text+0x2ac): undefined reference to `ippsExpandDictionary_8u_I'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `.L43':
ipp_bzlib.c:(.text+0x40f): undefined reference to `ippsDecodeHuff_BZ2_8u16u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `.L42':
ipp_bzlib.c:(.text+0x48a): undefined reference to `ippsUnpackHuffContext_BZ2_8u16u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `.L46':
ipp_bzlib.c:(.text+0x54c): undefined reference to `ippsZero_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `.L41':
ipp_bzlib.c:(.text+0x67b): undefined reference to `ippsDecodeHuffInit_BZ2_8u16u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `.L34':
ipp_bzlib.c:(.text+0x9c9): undefined reference to `ippsBWTInvGetSize_8u'
ipp_bzlib.c:(.text+0x9e0): undefined reference to `ippsDecodeHuffGetSize_BZ2_8u16u'
ipp_bzlib.c:(.text+0x9ff): undefined reference to `ippsMTFGetSize_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `.L33':
ipp_bzlib.c:(.text+0xf25): undefined reference to `ippsCRC32_BZ2_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `default_bzfree':
ipp_bzlib.c:(.text+0x1599): undefined reference to `ippsFree'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `default_bzalloc':
ipp_bzlib.c:(.text+0x15cd): undefined reference to `ippsMalloc_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `copy_to_int_e_buf':
ipp_bzlib.c:(.text+0x1649): undefined reference to `ippsEncodeRLE_BZ2_8u'
ipp_bzlib.c:(.text+0x169c): undefined reference to `ippsCRC32_BZ2_8u'
ipp_bzlib.c:(.text+0x16e8): undefined reference to `ippsEncodeRLEFlush_BZ2_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `copy_from_int_e_buf':
ipp_bzlib.c:(.text+0x176f): undefined reference to `ippsCopy_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `encode_block':
ipp_bzlib.c:(.text+0x191a): undefined reference to `ippsRLEGetInUseTable_8u'
ipp_bzlib.c:(.text+0x194e): undefined reference to `ippsReduceDictionary_8u_I'
ipp_bzlib.c:(.text+0x1b30): undefined reference to `ippsBWTFwd_8u'
ipp_bzlib.c:(.text+0x1de3): undefined reference to `ippsMTFInit_8u'
ipp_bzlib.c:(.text+0x1e20): undefined reference to `ippsMTFFwd_8u'
ipp_bzlib.c:(.text+0x1eaa): undefined reference to `ippsEncodeZ1Z2_BZ2_8u16u'
ipp_bzlib.c:(.text+0x1f01): undefined reference to `ippsCopy_8u'
ipp_bzlib.c:(.text+0x1fb1): undefined reference to `ippsEncodeHuffInit_BZ2_16u8u'
ipp_bzlib.c:(.text+0x2013): undefined reference to `ippsPackHuffContext_BZ2_16u8u'
ipp_bzlib.c:(.text+0x2092): undefined reference to `ippsEncodeHuff_BZ2_16u8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `encode_mt':
ipp_bzlib.c:(.text+0x2175): undefined reference to `ippsCopy_1u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `init_e_block_state':
ipp_bzlib.c:(.text+0x245c): undefined reference to `ippsEncodeRLEInit_BZ2_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `encode_flush_finish':
ipp_bzlib.c:(.text+0x2518): undefined reference to `ippsEncodeRLEFlush_BZ2_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_bzlib.o): In function `BZ2_bzCompressInit':
ipp_bzlib.c:(.text+0x27b5): undefined reference to `ippsBWTFwdGetSize_8u'
ipp_bzlib.c:(.text+0x27eb): undefined reference to `ippsEncodeHuffGetSize_BZ2_16u8u'
ipp_bzlib.c:(.text+0x280c): undefined reference to `ippsMTFGetSize_8u'
ipp_bzlib.c:(.text+0x282a): undefined reference to `ippsRLEGetSize_BZ2_8u'
./bin/linux32_gcc4/libipp_bz2.a(ipp_static.o): In function `global constructors keyed to ipp_static.cpp':
ipp_static.cpp:(.text+0x23): undefined reference to `ippStaticInit'[/bash]

Clearly it seems that I'm missing some sort of library, but I'm not sure which. Can anyone help me with this?
0 Kudos
3 Replies
PaulF_IntelCorp
Employee
597 Views
It looks like the data compression library is not getting included in the link line. I have not had time to inspect the makefile, but perhaps the list of library files is not being defined properly for a static link ???
0 Kudos
Gennady_F_Intel
Moderator
597 Views
Crisian,
first of all - set up your build environment by creating an environment variable named IPPROOT that points to the root directory of your Intel IPP installation. Looking at the compile time errors - compiler doesn't find signal processing functions ...
hence, the second steps - please check ipps ( signal processing ) lib in your linking line.
--Gennady
0 Kudos
ippstatic
Beginner
597 Views
Gennady,

Thank you for your reply. When I first tried to compile ipp_bzip2 statically, I set IPPROOT to point to /opt/intel/ipp/6.1.2.051/ia32, which I believe is the correct IPP root installation directory. Also, my linking line is:

[bash]/usr/bin/g++ -o bin/linux32_gcc4/ipp_bzip2 _obj/linux32_gcc4/bzip2.o -Wall -g -O2 -fPIC -fopenmp -L.  -L./bin/linux32_gcc4 -L/opt/intel/ipp/6.1.2.051/ia32/lib -lippdcemerged -lippdcmerged -lippsemerged  -lippsmerged -lippcore -lipp_bz2 -L/opt/intel/ipp/6.1.2.051/ia32/sharedlib -liomp5 -lpthread -lstdc++
[/bash]

This seems to contain all the necessary ipps libraries listed in the Makefile. Is there anything else I could be missing?

Regards,

Christian


edit2: I finally figured it out. I changed my link line from:

    [bash]   1. /usr/bin/g++ -o bin/linux32_gcc4/ipp_bzip2 _obj/linux32_gcc4/bzip2.o -Wall -g -O2 -fPIC -fopenmp -L.  -L./bin/linux32_gcc4 -L/opt/intel/ipp/6.1.2.051/ia32/lib -lippdcemerged -lippdcmerged -lippsemerged  -lippsmerged -lippcore -lipp_bz2 -L/opt/intel/ipp/6.1.2.051/ia32/sharedlib -liomp5 -lpthread -lstdc++ [/bash]
To

    [bash]   1. /usr/bin/g++ -o bin/linux32_gcc4/ipp_bzip2 _obj/linux32_gcc4/bzip2.o -Wall -g -O2 -fPIC -fopenmp -L.  -L./bin/linux32_gcc4 -lipp_bz2 -L/opt/intel/ipp/6.1.2.051/ia32/lib -lippdcemerged -lippdcmerged -lippsemerged  -lippsmerged -lippcore  -L/opt/intel/ipp/6.1.2.051/ia32/sharedlib -liomp5 -lpthread -lstdc++ [/bash]
Apparantly the Makefile link line was causing the compiler to look for -lipp_bz2 in the wrong directory. Thanks for the help!
0 Kudos
Reply