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

link error for ipp_resize_mt, OSX 10.13.6

spence__ian
Beginner
783 Views

Hi,

I'm new to this platform. I'm trying to link ipp_resize_mt. Here's the compile & link command, & result error:

ian$ clang++ src/ipp_resize_mt.cpp -o ipp_resize_mt -I $TBBROOT/include -I $IPPROOT/include -I $IPPROOT/components/common/include  -L $IPPROOT/lib -lippi -lipps -lippcore -lirc -lsvml -limf -L $TBBROOT/lib -ltbb -stdlib=libc++ /opt/intel/compilers_and_libraries_2019.5.281/mac/ipp/components/common/build/Release/libcommon.a

Undefined symbols for architecture x86_64:
  "__vsctprintf", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
  "_memcpy_s", referenced from:
      _vm_memcpy in libcommon.a(vm_base.o)
  "_strncpy_s", referenced from:
      _vm_string_strncpy in libcommon.a(vm_base.o)
  "_vsnprintf_s", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I get the same results building with xcode project:

ian$ xcodebuild -project ipp_resize_mt.xcodeproj

Undefined symbols for architecture x86_64:
  "__vsctprintf", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
  "_memcpy_s", referenced from:
      _vm_memcpy in libcommon.a(vm_base.o)
  "_strncpy_s", referenced from:
      _vm_string_strncpy in libcommon.a(vm_base.o)
  "_vsnprintf_s", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
ld: symbol(s) not found for architecture x86_64
clang: error
: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **
The following build commands failed:
    Ld /opt/intel/compilers_and_libraries_2019.5.281/mac/ipp/components/examples_core/ipp_resize_mt/build/Release/ipp_resize_mt normal x86_64

And adding -O2 -DUSE_TBB:

ian$ clang++ src/ipp_resize_mt.cpp -o ipp_resize_mt -O2 -DUSE_TBB -I $TBBROOT/include -I $IPPROOT/include -I $IPPROOT/components/common/include  -L $IPPROOT/lib -lippi -lipps -lippcore -lirc -lsvml -limf -L $TBBROOT/lib -ltbb -stdlib=libc++ /opt/intel/compilers_and_libraries_2019.5.281/mac/ipp/components/common/build/Release/libcommon.a

Undefined symbols for architecture x86_64:
  "rml::pool_malloc(rml::MemoryPool*, unsigned long)", referenced from:
      ResizeTBB::ResizeTBBTask::operator()(tbb::blocked_range2d<unsigned int, unsigned int>&) const in ipp_resize_mt-d7fbd8.o
  "rml::pool_destroy(rml::MemoryPool*)", referenced from:
      ResizeTBB::~ResizeTBB() in ipp_resize_mt-d7fbd8.o
  "rml::pool_create_v1(long, rml::MemPoolPolicy const*, rml::MemoryPool**)", referenced from:
      ResizeTBB::ResizeTBB() in ipp_resize_mt-d7fbd8.o
  "rml::pool_free(rml::MemoryPool*, void*)", referenced from:
      ResizeTBB::ResizeTBBTask::operator()(tbb::blocked_range2d<unsigned int, unsigned int>&) const in ipp_resize_mt-d7fbd8.o
  "__vsctprintf", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
  "_memcpy_s", referenced from:
      _vm_memcpy in libcommon.a(vm_base.o)
  "_scalable_free", referenced from:
      tbb::interface6::memory_pool<tbb::scalable_allocator<unsigned char> >::deallocate_request(long, void*, unsigned long) in ipp_resize_mt-d7fbd8.o
  "_scalable_malloc", referenced from:
      tbb::interface6::memory_pool<tbb::scalable_allocator<unsigned char> >::allocate_request(long, unsigned long&) in ipp_resize_mt-d7fbd8.o
  "_strncpy_s", referenced from:
      _vm_string_strncpy in libcommon.a(vm_base.o)
  "_vsnprintf_s", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Some Intel IPP online docs say to add -lirc -lsvml -limf, although I have a sense they're not used. When removing these lib links, the error does not change. Any ideas?

 

0 Kudos
3 Replies
spence__ian
Beginner
783 Views

Hi,

Just an update. Got rid of the ResizeTBB link errors by adding libtbbmalloc.dylib to: -L $TBBROOT/lib -l tbb -l tbbmalloc

Still have these errors though:

Undefined symbols for architecture x86_64:
  "__vsctprintf", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
  "_memcpy_s", referenced from:
      _vm_memcpy in libcommon.a(vm_base.o)
  "_strncpy_s", referenced from:
      _vm_string_strncpy in libcommon.a(vm_base.o)
  "_vsnprintf_s", referenced from:
      _vm_string_vsnprintf in libcommon.a(vm_base.o)
ld: symbol(s) not found for architecture x86_64

Any suggestions would be welcome.

Thanks,

Ian

 

0 Kudos
spence__ian
Beginner
783 Views

Hi,

Nailed it. There were a bunch of source files missing from Intel's supplied xcode project. All the source folder files need compiling.

 

0 Kudos
Gennady_F_Intel
Moderator
783 Views
0 Kudos
Reply