XCode link error : "file not found: libiomp5.dylib"

XCode link error : "file not found: libiomp5.dylib"

Hi there,

I'm using XCode 3.1.1 and bought the C++ Compiler just to use the IPP Libraries (not the Compiler) on Mac.

I just installed the Compiler and did not change anything in my XCode project.

Now, when I compile my projects, I get this link error: "file not found: libiomp5.dylib"

I followed the Intel C++ Compiler User and Reference Guides and successfully set up the project to compile with the Intel Compiler. But I still want to be able to compile without it.

So, what can I do ?

Thanks

Peter

27 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I suppose the ipp libraries require the OpenMP run-time library, so your choices are to set the LD_LIBRARY_PATH as icc expects, or to use a static link. It may well be possible to use g++ in place of icpc, along with the ipp libraries, if that is what you mean.

Tim, thanks. I realized that I upgraded IPP from 5.x to 6.0 by installing the compiler. Before I used a demo of 5.3.

I read in the release notes of IPP 6.0 this:

"The default OpenMP runtime library for Intel IPP has been changed from libguide to libiomp. See the User Guide in the doc directory for more information".

I had a look at the User Guide but I'm not quite sure what I have to change. My XCode Project now links against the IPP 6.0 libraries. But what else do I have to do here ?

Thanks

Peter

Quoting - tim18

I suppose the ipp libraries require the OpenMP run-time library, so your choices are to set the LD_LIBRARY_PATH as icc expects, or to use a static link. It may well be possible to use g++ in place of icpc, along with the ipp libraries, if that is what you mean.

I added -liomp5 to the "Other Linker Flags" and added "/opt/intel/Compiler/11.0/056/lib/" to the "Library Search Paths" for a static link.

Now my XCode project compiles (the project is a plug-in). But when an application tryes to load the plug-in it failes with "Library not loaded: libiomp5.dylib", that means the application tryes to get a dynamic link to libiomp5.

How can I do a static link correctly here?

Thanks

Peter

Quoting - petermeier

I added -liomp5 to the "Other Linker Flags" and added "/opt/intel/Compiler/11.0/056/lib/" to the "Library Search Paths" for a static link.

Now my XCode project compiles (the project is a plug-in). But when an application tryes to load the plug-in it failes with "Library not loaded: libiomp5.dylib", that means the application tryes to get a dynamic link to libiomp5.

How can I do a static link correctly here?

Does your icc -help show the option -static-intel? If you are linking with gcc, you would have to give the full path name of libiomp5.a in place of -liomp5 (or remove the dylib).

Quoting - tim18

Does your icc -help show the option -static-intel? If you are linking with gcc, you would have to give the full path name of libiomp5.a in place of -liomp5 (or remove the dylib).

I want to link with gcc. I tryed both

1) In "Other Linker Flags" I put "/opt/intel/Compiler/11.0/056/lib/libiomp5.a" instead of -liomp5

2) I removed "libiomp5.dylib" from "/opt/intel/Compiler/11.0/056/lib/"

It compiles and links but when an application loads my plug-in I get this error:

Library not loaded: libiomp5.dylib
Referenced from: /opt/intel/Compiler/11.0/056/Frameworks/ipp/Libraries/libippac-6.0.dylib
Reason: image not found

My plug-in uses ipp signal processing that I link like this:

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippcore.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsemerged.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsmerged.a

Oh, for the libiomp5 functions used only in the plugin, for static linking you might have to link them directly into the plugin. I'm afraid this is going beyond what we can deal with beyond arm's length.

Quoting - tim18

Oh, for the libiomp5 functions used only in the plugin, for static linking you might have to link them directly into the plugin. I'm afraid this is going beyond what we can deal with beyond arm's length.

This mess is a result of undocumented change to the behavior of the /MT switch (I don't know the equivalent of that switch under Linux). Basically OpenMP library is with the latest compiler (11.0) always linked dynamically regardless of the CRT linking options. There is a new switch (-Qopenmp-link:static) which enables you to force static linking for OpenMP in your project.

Regards,
Igor Levicki

Quoting - Igor Levicki

This mess is a result of undocumented change to the behavior of the /MT switch (I don't know the equivalent of that switch under Linux). Basically OpenMP library is with the latest compiler (11.0) always linked dynamically regardless of the CRT linking options. There is a new switch (-Qopenmp-link:static) which enables you to force static linking for OpenMP in your project.

Igor, thanks. So, as I'm working with XCode on OSX 10.5, do you know how I can force XCode to static link ? I'm using gcc but if you know how to get it with intel c++ compiler that would help too.

Thanks

Peter

As Igor said, this would be an undocumented (unsupported?) option. You could find out what it does by 'icpc -# -openmp-link static ......' in case that would give you a clue how to set up your link script when not using icpc.

Quoting - petermeier

I want to link with gcc. I tryed both

1) In "Other Linker Flags" I put "/opt/intel/Compiler/11.0/056/lib/libiomp5.a" instead of -liomp5

2) I removed "libiomp5.dylib" from "/opt/intel/Compiler/11.0/056/lib/"

It compiles and links but when an application loads my plug-in I get this error:

Library not loaded: libiomp5.dylib
Referenced from: /opt/intel/Compiler/11.0/056/Frameworks/ipp/Libraries/libippac-6.0.dylib
Reason: image not found

My plug-in uses ipp signal processing that I link like this:

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippcore.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsemerged.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsmerged.a

Have you tried the option -static-intel to link in static Intel Compiler RTL? Note that Apple recommend users uses dylibs. There should be a check box in Xcode for "Intel Compiler Runtime"

Quoting - petermeier

I want to link with gcc. I tryed both

1) In "Other Linker Flags" I put "/opt/intel/Compiler/11.0/056/lib/libiomp5.a" instead of -liomp5

2) I removed "libiomp5.dylib" from "/opt/intel/Compiler/11.0/056/lib/"

It compiles and links but when an application loads my plug-in I get this error:

Library not loaded: libiomp5.dylib
Referenced from: /opt/intel/Compiler/11.0/056/Frameworks/ipp/Libraries/libippac-6.0.dylib
Reason: image not found

My plug-in uses ipp signal processing that I link like this:

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippcore.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsemerged.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsmerged.a

Have you tried the option -static-intel to link in static Intel Compiler RTL? Note that Apple recommend users uses dylibs. There should be a check box in Xcode for "Intel Compiler Runtime"

In Xcode, if you are using Intel compiler to build, have you tried the option -static-intel to link in static Intel Compiler RTL? Note that Apple recommend users uses dylibs. There should be a check box in Xcode for "Intel Compiler Runtime"

Quoting - petermeier

I want to link with gcc. I tryed both

1) In "Other Linker Flags" I put "/opt/intel/Compiler/11.0/056/lib/libiomp5.a" instead of -liomp5

2) I removed "libiomp5.dylib" from "/opt/intel/Compiler/11.0/056/lib/"

It compiles and links but when an application loads my plug-in I get this error:

Library not loaded: libiomp5.dylib
Referenced from: /opt/intel/Compiler/11.0/056/Frameworks/ipp/Libraries/libippac-6.0.dylib
Reason: image not found

My plug-in uses ipp signal processing that I link like this:

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippcore.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsemerged.a

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippsmerged.a

It seemed to me that you mixed the shared libraires and static libraires. Insted of link libippac-60.dylib
You shouldlink Intel IPP audio coding static libraires from :

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippacemerged.a
/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippacmerged.a

Plus, please ensure your code has ippInitStatic() prior to any Intel IPP function calls in order to enable static dispatch feature at the run time for best performance on your system.

Hope it helps.
Thanks,
Ying S
Intel IPP Team

Hi all,

There are several threads on the missing libiomp5.dylib issue, spanning quite a range in time. But I just installed yet another update to the intel fortran compilers (11.0, 064) and the problem is still there. In none of these threads can I find a proper solution or even work around. Has there been any progress on this issue?

Thanks , J

Quoting - moortgatgmail.com
Hi all,

There are several threads on the missing libiomp5.dylib issue, spanning quite a range in time. But I just installed yet another update to the intel fortran compilers (11.0, 064) and the problem is still there. In none of these threads can I find a proper solution or even work around. Has there been any progress on this issue?

Thanks , J

It would help if youwould provide some additional information on the problem.The compiler runtime libraries are resolve through the current working directory, or through DYLD_LIBRARY_PATH

1) Are you using the command line or Xcode? (OS/Xcode versions)
2) Are you using the compiler only or compiler in conjunction with the libraries such as IPP, MKL, TBB?

If you can provide an example of this and how to reproduce the problem, I'll take a look at it.

Quoting - Qale (Intel)

It would help if youwould provide some additional information on the problem.The compiler runtime libraries are resolve through the current working directory, or through DYLD_LIBRARY_PATH

1) Are you using the command line or Xcode? (OS/Xcode versions)
2) Are you using the compiler only or compiler in conjunction with the libraries such as IPP, MKL, TBB?

If you can provide an example of this and how to reproduce the problem, I'll take a look at it.

Here is a very simple project, which does not use any additional library.

program parallelbug.cpp:

#include

int main (int argc, char * const argv[]) {

double a[100000], b[100000];

for (int i=0;i<100000;i++) {
a[i]=i/1000.0;
b[i]=a[i]*a[i];
}
return 0;
}

When built within the Xcode IDE, it compiles and link but will not execute:

dyld: Library not loaded: libiomp5.dylib
Referenced from: /Users/Bernard/dkbs/parallelbugproj/build/Release/parallelbugproj
Reason: image not found

When built with command-line Xcode, it compiles but does not link:

xcodebuild -project parallelbugproj.xcodeproj -target parallelbug -configuration Release
=== BUILDING NATIVE TARGET parallelbug OF PROJECT parallelbugproj WITH CONFIGURATION Release ===

Checking Dependencies...

CompileICC /Users/Bernard/dkbs/parallelbugproj/build/parallelbugproj.build/Release/parallelbug.build/Objects-normal/i386/parallelbug.o /Users/Bernard/dkbs/parallelbugproj/parallelbug.cpp
cd /Users/Bernard/dkbs/parallelbugproj
/usr/bin/icc-11.0-base/bin/intel64/icc -x c++ -arch i386 -dev-usr-root=/Developer/usr -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -g -O2 -w1 -fno-omit-frame-pointer -parallel -std=c99 -par_report3 -fvisibility=hidden -fpascal-strings -I/Users/Bernard/dkbs/parallelbugproj/build/parallelbugproj.build/Release/parallelbug.build/parallelbugproj-txt.hmap -F/Users/Bernard/dkbs/parallelbugproj/build/Release -I/Users/Bernard/dkbs/parallelbugproj/build/Release/include -c /Users/Bernard/dkbs/parallelbugproj/parallelbug.cpp -o /Users/Bernard/dkbs/parallelbugproj/build/parallelbugproj.build/Release/parallelbug.build/Objects-normal/i386/parallelbug.o
procedure: main
procedure: main
/Users/Bernard/dkbs/parallelbugproj/parallelbug.cpp(7): (col. 2) remark: LOOP WAS AUTO-PARALLELIZED.
/Users/Bernard/dkbs/parallelbugproj/parallelbug.cpp(7): (col. 2) remark: LOOP WAS VECTORIZED.
/Users/Bernard/dkbs/parallelbugproj/parallelbug.cpp(7): (col. 2) remark: LOOP WAS VECTORIZED procedure: __sti__$E
procedure: __sti__$E
.

Ld /Users/Bernard/dkbs/parallelbugproj/build/Release/parallelbugproj normal i386
cd /Users/Bernard/dkbs/parallelbugproj
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv NEXT_ROOT /Developer/SDKs/MacOSX10.5.sdk
/usr/bin/icc-11.0-base/bin/intel64/icpc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/Bernard/dkbs/parallelbugproj/build/Release -F/Users/Bernard/dkbs/parallelbugproj/build/Release -filelist /Users/Bernard/dkbs/parallelbugproj/build/parallelbugproj.build/Release/parallelbug.build/Objects-normal/i386/parallelbugproj.LinkFileList -mmacosx-version-min=10.5 -dev-usr-root=/Developer/usr -parallel "" "" -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/darwin/default -o /Users/Bernard/dkbs/parallelbugproj/build/Release/parallelbugproj
ipo: warning #11009: file format not recognized for /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib
ld warning: in /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib, file is not of required architecture
Undefined symbols:
"___kmpc_serialized_parallel", referenced from:
_main in parallelbug.o
"___kmpc_ok_to_fork", referenced from:
_main in parallelbug.o
"___kmpc_end_serialized_parallel", referenced from:
_main in parallelbug.o
"___kmpc_global_thread_num", referenced from:
_main in parallelbug.o
"___kmpc_for_static_fini", referenced from:
_main in parallelbug.o
"___kmpc_for_static_init_4", referenced from:
_main in parallelbug.o
"___kmpc_fork_call", referenced from:
_main in parallelbug.o
ld: symbol(s) not found
** BUILD FAILED **

The following build commands failed:
parallelbug:
Ld /Users/Bernard/dkbs/parallelbugproj/build/Release/parallelbugproj normal i386
(1 failure)

A simple Makefile works just fine:

icpc -parallel -par_report3 -I/Users/Bernard/C++bsincludes -I/Users/Bernard/libgslintel/include -c parallelbug.cpp -o parallelbug.o
procedure: main
procedure: main
parallelbug.cpp(7): (col. 2) remark: LOOP WAS AUTO-PARALLELIZED.
parallelbug.cpp(7): (col. 2) remark: LOOP WAS VECTORIZED.
parallelbug.cpp(7): (col. 2) remark: LOOP WAS VECTORIZED.
procedure: __sti__$E
procedure: __sti__$E
icpc parallelbug.o -parallel /Users/Bernard/libgslintel/lib/libgsl.a /Users/Bernard/libgslintel/lib/libgslcblas.a -o parallelbug

No problem with execution of that one.

It would still be nice to have a foolproof way of parallelization within Xcode...

Bernard

There are two issues here, and I'll address them both.

1) When built within the Xcode IDE, it compiles and link but will not execute:
dyld: Library not loaded: libiomp5.dylib

When using -parallel this requires theruntimelibiomp5.dylib at runtime. In order to runthe executableon the command line or in Xcode and resolve the runtime lib, you need to set the environment variable DYLD_LIBRARY_PATH.

See the Intel C++ Compiler User Reference Guides under /opt/intel/Compiler/11.0/064/Documentation/compiler_c
specifically, the Content tab-> Intel Compiler User and Reference Guides -> Building Application -> Building Applicationwith Xcode -> running the executable

There is also the equivalent section for the command line.

2) Using xcodebuild from the command line, when built with command-line Xcode, it compiles but does not link:

If you look at the linker error message:

ipo: warning #11009: file format not recognized for /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib
ld warning: in /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib, file is not of required architecture

Your build setting is for "-arch i386" for ia32 architecture, but you are trying to link in the libiomp5.dylib from the "em64t" directory which is a 64bit version of the library. This looks like a configuration error in your project setting.

/Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib

I took your test case and create a new project. Here's the build log, and it works fine.

intels-mac-pro:test intel$ more main.cpp
#include

int main (int argc, char * const argv[]) {
double a[100000], b[100000];

for (int i=0; i<100000; i++)
{
a[i] = i/1000.0;
b[i] = a[i]*a[i];
}
std::cout << a[5];
return 0;
}

Building test case:

intels-mac-pro:test intel$ xcodebuild -project test.xcodeproj -target test -configuration Release build
=== BUILDING NATIVE TARGET test OF PROJECT test WITH CONFIGURATION Release ===

Checking Dependencies...

CompileICC /Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/Objects-normal/i386/main.o /Users/intel/Desktop/u62169/test/main.cpp
cd /Users/intel/Desktop/u62169/test
/usr/bin/icc-11.0-base/bin/intel64/icc -x c++ -arch i386 -dev-usr-root=/Developer/usr -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -g -O2 -w1 -fno-omit-frame-pointer -parallel -std=c99 -par_report3 -vec_report1 -fvisibility=hidden -fpascal-strings -I/Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/test-txt.hmap -F/Users/intel/Desktop/u62169/test/build/Release -I/Users/intel/Desktop/u62169/test/build/Release/include -V -c /Users/intel/Desktop/u62169/test/main.cpp -o /Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/Objects-normal/i386/main.o
Intel C Compiler Professional for applications running on Intel 64, Version 11.0 Build 20090318 Package ID: m_cproc_p_11.0.064
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

Edison Design Group C/C++ Front End, version 3.10 (Mar 18 2009 19:37:09)
Copyright 1988-2007 Edison Design Group, Inc.

procedure: main
procedure: main
/Users/intel/Desktop/u62169/test/main.cpp(6): (col. 2) remark: LOOP WAS AUTO-PARALLELIZED.
/Users/intel/Desktop/u62169/test/main.cpp(6): (col. 2) remark: LOOP WAS VECTORIZED.
/Users/intel/Desktop/u62169/test/main.cpp(6): (col. 2) remark: LOOP WAS VECTORIZED procedure: __sti__$E
procedure: __sti__$E
.

Ld /Users/intel/Desktop/u62169/test/build/Release/test normal i386
cd /Users/intel/Desktop/u62169/test
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv NEXT_ROOT /Developer/SDKs/MacOSX10.5.sdk
/usr/bin/icc-11.0-base/bin/intel64/icpc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/intel/Desktop/u62169/test/build/Release -F/Users/intel/Desktop/u62169/test/build/Release -filelist /Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/Objects-normal/i386/test.LinkFileList -mmacosx-version-min=10.5 -dev-usr-root=/Developer/usr -parallel "" "" -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/darwin/default -o /Users/intel/Desktop/u62169/test/build/Release/test

GenerateDSYMFile /Users/intel/Desktop/u62169/test/build/Release/test.dSYM /Users/intel/Desktop/u62169/test/build/Release/test
cd /Users/intel/Desktop/u62169/test
/Developer/usr/bin/dsymutil /Users/intel/Desktop/u62169/test/build/Release/test -o /Users/intel/Desktop/u62169/test/build/Release/test.dSYM
warning: no debug symbols in executable (-arch i386)
** BUILD SUCCEEDED **

Running the executable from the command line:

intels-mac-pro:test intel$ ./build/Release/test
dyld: Library not loaded: libiomp5.dylib
Referenced from: /Users/intel/Desktop/u62169/test/./build/Release/test
Reason: image not found
Trace/BPT trap

Need to set compiler runtime environment to resolve libiomp5.dylib:

intels-mac-pro:test intel$ . /opt/intel/Compiler/11.0/064/bin/iccvars.sh ia32
intels-mac-pro:test intel$ ./build/Release/test
0.005
intels-mac-pro:test intel$

Thanks very much for the prompt and helpful response, Qale. I fixed the 32/64 bit conflict that you pointed out and now I have everything just fine working from xcodebuild, -openmp and -parallel both. However, I already had DYLD_LIBRARY_PATH set up in Xcode, and still I have a problem when "Build and Go"-ing from within Xcode---not with libiomp5 but with libimf now, which on my system is also in /opt/intel/Compiler/11.0/056/lib:

dyld: Library not loaded: libimf.dylib
Referenced from: /Users/Bernard/dkbs/parallelbugproj/build/Debug/parallelbugproj
Reason: image not found

Quoting - Qale (Intel)

There are two issues here, and I'll address them both.

1) When built within the Xcode IDE, it compiles and link but will not execute:
dyld: Library not loaded: libiomp5.dylib

When using -parallel this requires theruntimelibiomp5.dylib at runtime. In order to runthe executableon the command line or in Xcode and resolve the runtime lib, you need to set the environment variable DYLD_LIBRARY_PATH.

See the Intel C++ Compiler User Reference Guides under /opt/intel/Compiler/11.0/064/Documentation/compiler_c
specifically, the Content tab-> Intel Compiler User and Reference Guides -> Building Application -> Building Applicationwith Xcode -> running the executable

There is also the equivalent section for the command line.

2) Using xcodebuild from the command line, when built with command-line Xcode, it compiles but does not link:

If you look at the linker error message:

ipo: warning #11009: file format not recognized for /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib
ld warning: in /Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib, file is not of required architecture

Your build setting is for "-arch i386" for ia32 architecture, but you are trying to link in the libiomp5.dylib from the "em64t" directory which is a 64bit version of the library. This looks like a configuration error in your project setting.

/Developer/SDKs/MacOSX10.5.sdk/Library/Frameworks/Intel_MKL.framework/Versions/10.0.5.025/lib/em64t/libiomp5.dylib

I took your test case and create a new project. Here's the build log, and it works fine.

intels-mac-pro:test intel$ more main.cpp
#include

int main (int argc, char * const argv[]) {
double a[100000], b[100000];

for (int i=0; i<100000; i++)
{
a[i] = i/1000.0;
b[i] = a[i]*a[i];
}
std::cout << a[5];
return 0;
}

Building test case:

intels-mac-pro:test intel$ xcodebuild -project test.xcodeproj -target test -configuration Release build
=== BUILDING NATIVE TARGET test OF PROJECT test WITH CONFIGURATION Release ===

Checking Dependencies...

CompileICC /Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/Objects-normal/i386/main.o /Users/intel/Desktop/u62169/test/main.cpp
cd /Users/intel/Desktop/u62169/test
/usr/bin/icc-11.0-base/bin/intel64/icc -x c++ -arch i386 -dev-usr-root=/Developer/usr -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -g -O2 -w1 -fno-omit-frame-pointer -parallel -std=c99 -par_report3 -vec_report1 -fvisibility=hidden -fpascal-strings -I/Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/test-txt.hmap -F/Users/intel/Desktop/u62169/test/build/Release -I/Users/intel/Desktop/u62169/test/build/Release/include -V -c /Users/intel/Desktop/u62169/test/main.cpp -o /Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/Objects-normal/i386/main.o
Intel C Compiler Professional for applications running on Intel 64, Version 11.0 Build 20090318 Package ID: m_cproc_p_11.0.064
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

Edison Design Group C/C++ Front End, version 3.10 (Mar 18 2009 19:37:09)
Copyright 1988-2007 Edison Design Group, Inc.

procedure: main
procedure: main
/Users/intel/Desktop/u62169/test/main.cpp(6): (col. 2) remark: LOOP WAS AUTO-PARALLELIZED.
/Users/intel/Desktop/u62169/test/main.cpp(6): (col. 2) remark: LOOP WAS VECTORIZED.
/Users/intel/Desktop/u62169/test/main.cpp(6): (col. 2) remark: LOOP WAS VECTORIZED procedure: __sti__$E
procedure: __sti__$E
.

Ld /Users/intel/Desktop/u62169/test/build/Release/test normal i386
cd /Users/intel/Desktop/u62169/test
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv NEXT_ROOT /Developer/SDKs/MacOSX10.5.sdk
/usr/bin/icc-11.0-base/bin/intel64/icpc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/intel/Desktop/u62169/test/build/Release -F/Users/intel/Desktop/u62169/test/build/Release -filelist /Users/intel/Desktop/u62169/test/build/test.build/Release/test.build/Objects-normal/i386/test.LinkFileList -mmacosx-version-min=10.5 -dev-usr-root=/Developer/usr -parallel "" "" -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/darwin/default -o /Users/intel/Desktop/u62169/test/build/Release/test

GenerateDSYMFile /Users/intel/Desktop/u62169/test/build/Release/test.dSYM /Users/intel/Desktop/u62169/test/build/Release/test
cd /Users/intel/Desktop/u62169/test
/Developer/usr/bin/dsymutil /Users/intel/Desktop/u62169/test/build/Release/test -o /Users/intel/Desktop/u62169/test/build/Release/test.dSYM
warning: no debug symbols in executable (-arch i386)
** BUILD SUCCEEDED **

Running the executable from the command line:

intels-mac-pro:test intel$ ./build/Release/test
dyld: Library not loaded: libiomp5.dylib
Referenced from: /Users/intel/Desktop/u62169/test/./build/Release/test
Reason: image not found
Trace/BPT trap

Need to set compiler runtime environment to resolve libiomp5.dylib:

intels-mac-pro:test intel$ . /opt/intel/Compiler/11.0/064/bin/iccvars.sh ia32
intels-mac-pro:test intel$ ./build/Release/test
0.005
intels-mac-pro:test intel$

>>>> I already had DYLD_LIBRARY_PATH set up in Xcode, and still I have a problem when "Build and Go"-ing from within Xcode---not with libiomp5 but with libimf now, which on my system is also in /opt/intel/Compiler/11.0/056/lib:

dyld: Library not loaded: libimf.dylib
Referenced from: /Users/Bernard/dkbs/parallelbugproj/build/Debug/parallelbugproj
Reason: image not found

***********

Not sure why that would be the case. Run:

otool -L

to see what libraries are being linked in. If there is no path in front of the library, it's either resolve in the current "./" directory or through DYLD_LIBRARY_PATH.

Attached a test project, and I'll take a look.

I cannot upload files, for whatever reason---"upload" cycles through the little squares endlessly. But this time I have followed all instructions to the letter, build for "Native architecture", generate OMP, added DYLD_LIBRARY_PATH argument, even though it is in my .bashrc file already:

/opt/intel/Compiler/11.0/056/Frameworks/ipp/Libraries:/opt/intel/Compiler/11.0/056/Frameworks/mkl/lib/32:/opt/intel/Compiler/11.0/056/Frameworks/tbb/ia32/cc4.0.1_os10.4.9/lib:/opt/intel/Compiler/11.0/056/lib:/opt/intel/Compiler/11.0/056/lib/ia32:/opt/intel/Compiler/11.0/056/Frameworks/ipp/Libraries:/opt/intel/Compiler/11.0/056/Frameworks/mkl/lib/32:/opt/intel/Compiler/11.0/056/Frameworks/tbb/ia32/cc4.0.1_os10.4.9/lib:/opt/intel/Compiler/11.0/056/lib:/opt/intel/Compiler/11.0/056/lib/ia32:/Users/Bernard/Fortran/bslibs:/opt/intel/Compiler/11.0/056/Frameworks/mkl/lib/32:/usr/local/cuda/lib::/opt/local/lib

Build results within Xcode are great:

Building target ompbug of project ompbug with configuration Debug

Checking Dependencies

CompileICC /Users/Bernard/dkbs/ompbug/build/ompbug.build/Debug/ompbug.build/Objects-normal/i386/ompbug.o /Users/Bernard/dkbs/ompbug/ompbug.cpp
cd /Users/Bernard/dkbs/ompbug
/usr/bin/icc-11.0-base/bin/intel64/icc -x c++ -arch i386 -dev-usr-root=/Developer/usr -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -g -O0 -w1 -fno-omit-frame-pointer -D_GLIBCXX_DEBUG=1 -D_GLIBCXX_DEBUG_PEDANTIC=1 -std=c99 -openmp -openmp_report1 -fvisibility=hidden -fpascal-strings -I/Users/Bernard/dkbs/ompbug/build/ompbug.build/Debug/ompbug.build/ompbug-txt.hmap -F/Users/Bernard/dkbs/ompbug/build/Debug -I/Users/Bernard/dkbs/ompbug/build/Debug/include -c /Users/Bernard/dkbs/ompbug/ompbug.cpp -o /Users/Bernard/dkbs/ompbug/build/ompbug.build/Debug/ompbug.build/Objects-normal/i386/ompbug.o
/Users/Bernard/dkbs/ompbug/ompbug.cpp(14): (col. 1) remark: OpenMP DEFINED LOOP WAS PARALLELIZED.
/Users/Bernard/dkbs/ompbug/ompbug.cpp(13): (col. 1) remark: OpenMP DEFINED REGION WAS PARALLELIZED.

Ld /Users/Bernard/dkbs/ompbug/build/Debug/ompbug normal i386
cd /Users/Bernard/dkbs/ompbug
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv NEXT_ROOT /Developer/SDKs/MacOSX10.5.sdk
/usr/bin/icc-11.0-base/bin/intel64/icpc -arch i386 -isysroot /Developer/SDKs/MacOSX10.5.sdk -L/Users/Bernard/dkbs/ompbug/build/Debug -F/Users/Bernard/dkbs/ompbug/build/Debug -filelist /Users/Bernard/dkbs/ompbug/build/ompbug.build/Debug/ompbug.build/Objects-normal/i386/ompbug.LinkFileList -mmacosx-version-min=10.5 -dev-usr-root=/Developer/usr -openmp "" "" -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -L/Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/darwin/default -o /Users/Bernard/dkbs/ompbug/build/Debug/ompbug

The executable works perfectly from Terminal. "Build and Go" from Xcode generates

[Session started at 2009-04-22 05:33:55 -0400.]
dyld: Library not loaded: libiomp5.dylib
Referenced from: /Users/Bernard/dkbs/ompbug/build/Debug/ompbug
Reason: image not found

The Debugger has exited due to signal 5 (SIGTRAP).

otool -L lists

libiomp5.dylib (compatibility version 5.0.0, current version 5.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 288.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)

Quoting - Qale (Intel)

>>>> I already had DYLD_LIBRARY_PATH set up in Xcode, and still I have a problem when "Build and Go"-ing from within Xcode---not with libiomp5 but with libimf now, which on my system is also in /opt/intel/Compiler/11.0/056/lib:

dyld: Library not loaded: libimf.dylib
Referenced from: /Users/Bernard/dkbs/parallelbugproj/build/Debug/parallelbugproj
Reason: image not found

***********

Not sure why that would be the case. Run:

otool -L

to see what libraries are being linked in. If there is no path in front of the library, it's either resolve in the current "./" directory or through DYLD_LIBRARY_PATH.

Attached a test project, and I'll take a look.

************ your response *********
The executable works perfectly from Terminal. "Build and Go" from Xcode generates

[Session started at 2009-04-22 05:33:55 -0400.]
dyld: Library not loaded: libiomp5.dylib
Referenced from: /Users/Bernard/dkbs/ompbug/build/Debug/ompbug
Reason: image not found

The Debugger has exited due to signal 5 (SIGTRAP).
*************************************

I am a little confused here. In your previous communication, you indicated that libiomp5.dylib was resolved, but libimf.dylib was not resolved, but the message above shows that libiomp5.dylib is not resolved.

You need to set the Xcode environment settings, in Xcode:

Groups & Files -> Executables -> -> get info -> -> Variables to be set in the environment -> ->

see attached image.

Quoting - Qale (Intel)
Great, it works finally! Thing is, the Arguments box has two parts; I followed the instructions in my compiler documentation and on the Intel web site, which show the top part being used

DYLD_LIBRARY_PATH=...path-to-lib...

and not the bottom Variable/Value part.

. Now I might have been imaginative enough to try this on my own...

I suggest a small fix in the doc.

BTW, several of the links here are broken:

http://software.intel.com/en-us/articles/intel-c-compiler-professional-e...

Thanks very much for your patience, Qale.

Bernard

************ your response *********
The executable works perfectly from Terminal. "Build and Go" from Xcode generates

[Session started at 2009-04-22 05:33:55 -0400.]
dyld: Library not loaded: libiomp5.dylib
Referenced from: /Users/Bernard/dkbs/ompbug/build/Debug/ompbug
Reason: image not found

The Debugger has exited due to signal 5 (SIGTRAP).
*************************************

I am a little confused here. In your previous communication, you indicated that libiomp5.dylib was resolved, but libimf.dylib was not resolved, but the message above shows that libiomp5.dylib is not resolved.

You need to set the Xcode environment settings, in Xcode:

Groups & Files -> Executables -> -> get info -> -> Variables to be set in the environment -> ->

see attached image.

Quoting - Ying S (Intel)

It seemed to me that you mixed the shared libraires and static libraires. Insted of link libippac-60.dylib
You shouldlink Intel IPP audio coding static libraires from :

/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippacemerged.a
/opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippacmerged.a

Plus, please ensure your code has ippInitStatic() prior to any Intel IPP function calls in order to enable static dispatch feature at the run time for best performance on your system.

Hope it helps.
Thanks,
Ying S
Intel IPP Team

Is this still true for 11.0/059? I can't find a declaration for ippInitStatic.

I have the same problem. Here are some fact that have not been discussed yet:

1.
This problem occurs even with the provided IPP sample code! Hence, there is really something wrong that someone on the Intel side should fix.

Details: OS X 10.5.6, Xcode 3.1.2. Installed the 11.0.059 compiler distribution with default options. Using it with the 1-month eval license.
Then got the m_ipp-samples_p_6.0.0.109, and opened the /image-processing/image-processing-functions/ippiDemo.xcodeproj therein.

When trying to run it, I get the same error about the missing dylib.

2.
A simple work-around is to copy the libiomp5.dylib into the build ("Debug") folder, next to the executable. Then it gets found. This is only a temp solution during development, though.

3.
Trying to use the static .a version by adding it to the project does not work - at launch the app still tries to load the dylib although the code should already be included by the .a lib, shouldn't it?

Lastly, the problem is that the dylib is in a place where it doesn't belong on a OS X system, as far as I know: It's not in the standard lib paths, nor is it in a Framework. Hence, when building an app from it for re-distribution, it won't be found unless one does some extra fixes that aren't expained anywhere right now.

So, someone at Intel should look into this more seriously. Currently, deployment of even the sample code does not work out of the box.

Quoting - thtempelmann

I have the same problem. Here are some fact that have not been discussed yet:

1.
This problem occurs even with the provided IPP sample code! Hence, there is really something wrong that someone on the Intel side should fix.

Details: OS X 10.5.6, Xcode 3.1.2. Installed the 11.0.059 compiler distribution with default options. Using it with the 1-month eval license.
Then got the m_ipp-samples_p_6.0.0.109, and opened the /image-processing/image-processing-functions/ippiDemo.xcodeproj therein.

When trying to run it, I get the same error about the missing dylib.

2.
A simple work-around is to copy the libiomp5.dylib into the build ("Debug") folder, next to the executable. Then it gets found. This is only a temp solution during development, though.

3.
Trying to use the static .a version by adding it to the project does not work - at launch the app still tries to load the dylib although the code should already be included by the .a lib, shouldn't it?

Lastly, the problem is that the dylib is in a place where it doesn't belong on a OS X system, as far as I know: It's not in the standard lib paths, nor is it in a Framework. Hence, when building an app from it for re-distribution, it won't be found unless one does some extra fixes that aren't expained anywhere right now.

So, someone at Intel should look into this more seriously. Currently, deployment of even the sample code does not work out of the box.

Hi thtempelmann,

Thank you a lot for the summary and raising attention. Yes, there is problem with the provided IPP sample code. We have escalated the problem to our build team and ask them fix them in future release. I will update the information here if a fixed version is ready.

1. The main problem here is since 6.0, IPP libraries for Mac OS were integrated to Intel Compiler Professional Edition for Mac OS. As IPP use the OpenMP library (libiomp5.dylib, libiomp5.a) from Intel Compiler, we don't include libiomp5.dylib and libiomp5.a in ipp Libraries/lib directory. But ipp shared library: libippac.dylib require it .
So you may
either copy the libiomp5.dylib to Debug directory
or add the path of libiomp5.dylid, "/opt/intel/Compiler/11.0/056/lib" to the "Library Search Paths" during build and had DYLD_LIBRARY_PATH set up in Xcode during run.
as workaround

or trythe workaround for the kind of IPP issues totally as below,

1) # cd /Library/Frameworks/Intel_IPP.framework
2) # ./Versions/Current/tools/env/ippunbind.sh
3) # cp /opt/intel/Compiler/11.0/0xx/lib/libiomp5.dylib ./Libraries
4) # ./Versions/Current/tools/env/ippbind.sh
Note: in point 4 you can get "can't change id for libiomp5.dylib" but all IPP libraries will be bound.

Here is the information about IPP for Mac OS and Intel Compiler << http://software.intel.com/en-us/articles/performance-tools-for-software-...

2. For trying to use the static .a version, you may try to add
-lippiemerged -lippimerged -lippsemerged -lippsmerged /opt/intel/Compiler/11.0/056/Frameworks/ipp/lib/libippcore.a /opt/intel/Compiler/11.0/056/lib/libiomp5.a -> Other Linker Flags

add /opt/intel/Compiler/11.0/056/Frameworks/ipp/lib into "Library Search Paths".

Note: The sample link ipp*.dylib (which call libiomp5.dylib) in project explicitly, so if you try static link with the sample, please remove the ipp*.dylib(ipps.dylib, ippi.dylib, ippcore.dylib) and Intel_IPP_Framework from IPP sample project. Thus will no shared library is required.

Thanks
Ying

Dear all,

IPP 6.1 is release with latest compiler for Mac OS.In corresondingippiDemo sample, we add static link configuration and clarify the issue oflibiomp5.so which is from intel compiler in readme.htm. If possible, please try them.

For install package, please go <https://registrationcenter.intel.com> and download IPP 6.1 sample code from
<">http://software.intel.com/en-us/articles/intel-integrated-performance-pr...

Regards,
Ying

Leave a Comment

Please sign in to add a comment. Not a member? Join today