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

Mac OS 10.4 linking problem with libiomp5.dylib, dynamic libs, V11.0/054

CCar
Beginner
654 Views
I've followed the instructions in the Mac OS X for compiling and linking, but I still can't get it to link:
Here's the makefile script:
export IPPROOT=/opt/intel/Compiler/11.0/054/Frameworks/ipp
icpc -c mmain.cpp
icpc -c imgproc.cpp
icpc mmain.o imgproc.o -L/opt/intel/Compiler/11.0/054/Frameworks/tbb/lib -L$IPPROOT/Libraries -L/opt/intel/Compiler/11.0/054/lib -lippcore -lipps -lippi -lippcv -ltbb -ltbbmalloc -lguide -o imgproc

Here's what happens when I run it:

$ ./Makefile
mmain.cpp(54): (col. 2) remark: LOOP WAS VECTORIZED.
mmain.cpp(211): (col. 5) remark: LOOP WAS VECTORIZED.
mmain.cpp(132): (col. 5) remark: LOOP WAS VECTORIZED.
ld: warning can't open dynamic library: libiomp5.dylib referenced from: /opt/intel/Compiler/11.0/054/Frameworks/ipp/Libraries/libippcore.dylib (checking for undefined symbols may be affected) (No such file or directory, errno = 2)
ld: Undefined symbols:
_omp_get_num_procs referenced from libippcore-6 expected to be defined in libiomp5.dylib

It compiles and links fine on windows in visual studio. (I'm not using any omp stuff (explicitly) that I know of).

Any ideas on what I'm missing. I ran the vars.sh files for ipp and icc.

Thanks.
0 Kudos
4 Replies
Vladimir_Dudnik
Employee
654 Views
Hello,

IPP dynamic libraries are using OpenMP run-time (they are threaded with OpenMP API). You probably need to add path to Compiler libraries where libiomp5 should be located

Vladimir
0 Kudos
CCar
Beginner
654 Views
Hello,

IPP dynamic libraries are using OpenMP run-time (they are threaded with OpenMP API). You probably need to add path to Compiler libraries where libiomp5 should be located

Vladimir

It is in the LIBRARY_PATH (and the DYLIBRARY_PATH) and I explicitly have it there on the icpc line link if you look more closely (-L/opt/intel/Compiler/11.0/054/lib). If I do an "ls" on that directory, libiomp5.dylib is sitting right there. So, I really don't understand why it can't "open dynamic library: libiomp5.dylib".

Thanks.
0 Kudos
CCar
Beginner
654 Views
Hello,

IPP dynamic libraries are using OpenMP run-time (they are threaded with OpenMP API). You probably need to add path to Compiler libraries where libiomp5 should be located

Vladimir

I think my problem is related to what Robert Bell's post describes.

otool -L libippcore-6.0.dylib
libippcore-6.0.dylib:
/opt/intel/Compiler/11.0/059/Frameworks/ipp/Libraries/libippcore-6.0.dylib (compatibility version 0.0.0, current version 0.0.0)
libiomp5.dylib (compatibility version 5.0.0, current version 5.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
88.3.6)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version
1.0.0)

***The libiomp5.dylib should probably be preceeded by a full path, just like the othe dylibs, but it's not!****

I have found a workaround for this, but I don't like it at all. If I'm in my code directory and I do an " ln -s /opt/intel/Compiler/11.0/059/lib/libiomp5.dylib .", then it finishes linking and I'm able to run the code, but this is not proper at all.
0 Kudos
Vladimir_Dudnik
Employee
654 Views

Did you address this issueon Compiler forum? It seems libiomp library is not patched properly in compiler package?

Vladimir
0 Kudos
Reply