- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to work into the Makefiles for OS X to include -headerpad_max_install_names as a linker command? This would allow end developers to change the "install_name" of the libraries to their installation location. This saves having to add in environment variables such as "DYLD_LIBRARY_PATH" because the end developer can set path to what they want. Just to be clear just by adding the linker argument gives the end developer the option of changing the "install_name" if they want, the actual "install_name" is still set to just the name of the library. This change should in no way break any existing builds but adds the flexibility for developers like myself to set the install_name if needed.
Use Case:
I use a shell script to bundle my final application and part of the shell script runs "otool" on each of the dependent libraries in order to find them and bring them into the .app bundle. Also during development I do NOT need to setup the DYLD_LIBRARY_PATH because the path to the library is encoded in the library itself. This makes working with IDEs such as QtCreator and Eclipse and Xcode easier.
Thanks for your Consideration.
Mike Jackson
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
we will look at what this means(:)) and get back to you.
but from your decription option would be useful.
thanks, Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was going to post some more information when I came across this post:
https://software.intel.com/en-us/forums/topic/505370
Which also states the same problem but in a different way. That user would like you to set the "install_name" directly which I agree is not a good idea. By setting the "-headerpad_max_install_names" linker argument you allow the developer to set the install_name to what ever they want. (Within reasonable limits of the file system).
This is the shell script I use to adjust the install_name
#!/bin/bash
# This script updates the Intel Threading Building Blocks on OS X to have an install name
# that is the same directory to where it is installed
# The first argument is the install path to TBB, for example on this machine it
# located in "/Users/Shared/Toolkits/tbb40_20120408oss"
tbbInstallDir="$1"
cd "$tbbInstallDir/lib"
tbbLibs="libtbb.dylib libtbbmalloc.dylib libtbb_debug.dylib libtbbmalloc_debug.dylib"
for l in $tbbLibs;
do
install_name_tool -id $tbbInstallDir/lib/$l $l
done
#------------------------------------------
The issue is that without the "-headerpad_max_install_names" parameter set during link time the script will fail 99% of the time. This is preventing me from moving up to the latest TBB release without building it myself. If I build it myself then I get incomplete builds, or the builds just do not work under the latest Xcode.
Thanks
Mike Jackson

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