- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My student license of Intel Composer XE C++ 16 expired yesterday, so I downloaded the lastest Intel Composer XE C++ 17, only to find out it is compatible with OSX 11.0/12.0. So I upgraded my OSX from Yosemite to Sierra. However, I found my code generate run time error as shown in the title. I have consulted some old posts and realized I need to reset DYLD_LIBRARY_PATH to the current lib path, but it didn't help. Here are some output for your reference:
$ echo $DYLD_LIBRARY_PATH /opt/intel/compilers_and_libraries_2017.0.102/mac/compiler/lib: $ otool -L main main: /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0) @rpath/libiomp5.dylib (compatibility version 5.0.0, current version 5.0.0)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Muhong,
Yes, there is a problem on the Mac with @rpath. Here is a work-around:
After successfully building your app, on a command line you must use the install_name_tool to relocate libiomp5.dylib in the executable:
install_name_tool -change @rpath/libiomp5.dylib @executable_path/`basename libiomp5.dylib` <full pathname to your executable>
where the full pathname will be something like the following:
/Users/YourUserName/Developer/YourApp/YourApp.app/Contents/MacOS/YourExecutableAppName
To INTEL SUPPORT:
Please fix this. It is relatively easy to work-around, but is very annoying and adds furthers steps to al of our build processes.
Thank you.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Muhong,
Yes, there is a problem on the Mac with @rpath. Here is a work-around:
After successfully building your app, on a command line you must use the install_name_tool to relocate libiomp5.dylib in the executable:
install_name_tool -change @rpath/libiomp5.dylib @executable_path/`basename libiomp5.dylib` <full pathname to your executable>
where the full pathname will be something like the following:
/Users/YourUserName/Developer/YourApp/YourApp.app/Contents/MacOS/YourExecutableAppName
To INTEL SUPPORT:
Please fix this. It is relatively easy to work-around, but is very annoying and adds furthers steps to al of our build processes.
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi David,
Thank you very much. I have modified the shared library install name as follows and now it works!
install_name_tool -change @rpath/libiomp5.dylib /opt/intel/compilers_and_libraries_2017.0.102/mac/compiler/lib/libiomp5.dylib main
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this is not rather problem of OSX, this is a new security feature (https://en.wikipedia.org/wiki/System_Integrity_Protection) of the OS. But changing the path via install_name_tool you are breaking library signature and breaking its security. it would be better if you can fix -rpath in your application for example by adding -Wl,-rpath,@executable_path or -Wl,-rpath,-rpath,@executable_path/../Frameworks options to your build command line.
--Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the same problem with a new High Sierra Installation and both, an older 2013 composer suit and a new 2018 installation. While the command line tool works fine for me, I would like to make Vladimir suggestion work - but don't know how. What exactly do I have to add to my Make-File ?
Thank you!

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page