install-name-tool

dylib @executable_path path issue in a plug-in bundle

非 Y 不嫁゛ 提交于 2020-01-29 01:34:32
问题 I am developing a plug-in bundle , say MyPlugIn.bundle for an application , say BigApp.app . This bundle requires a dylib , say MyPlugIn.bundle/Contents/Resources/library.dylib . I have relocated paths for library.dylib, as I would have done for a simple application bundle: $ otool -L MyPlugIn.bundle/Contents/MacOS/MyPlugIn MyPlugIn.bundle/Contents/MacOS/MyPlugIn: @executable_path/../Resources/library.dylib (compatibility version 0.0.0, current version 0.0.0) [...] $ otool -L MyPlugIn.bundle

clang, change dependent shared library install name at link time

倖福魔咒の 提交于 2020-01-19 05:18:30
问题 Related, but do not answer the question: How do I modify the install name of a .dylib at build time On OSX, I have a dynamic library provided by a packager manager, installed in a non standard directory, which install_name is just the filename. For example: $ ROOT=$PWD $ mkdir $ROOT/foo $ cd $ROOT/foo $ echo 'int foo(int a, int b){return a+b;}' > foo.c $ clang foo.c -dynamiclib -install_name libfoo.dylib -o libfoo.dylib I don't want to change (absolute path, @RPATH, ...) the install_name of

How do I modify the install name of a .dylib at build time

杀马特。学长 韩版系。学妹 提交于 2019-12-29 06:19:31
问题 I am building the google-gflags commandline flags library for C++ on Mac OS X (10.7.1). The build process is as such: $ ./configure --prefix=output $ make $ make install I'd like to change the install name of the generated shared library at build time and not use install_name_tool afterwards. By default, the install name of the generated shared library, libgflags.dylib , is the output path: $ otool -L ./output/libgflags.dylib $ ./output/libgflags.dylib: /tmp/gflags-1.5/output/lib/libgflags.0

How can I change the filename of a shared library after building a program that depends on it?

◇◆丶佛笑我妖孽 提交于 2019-12-28 08:10:12
问题 I have a program that depends on a shared library it expects to find deep inside a directory structure. I'd like to move that shared library out and into a better place. On OS X, this can be done with install_name_tool. I'm unable to find an equivalent for Linux. For reference, readelf -d myprogram spits out the following paraphrased output: Dynamic section at offset 0x1e9ed4 contains 30 entries: Tag Type Name/Value 0x00000001 (NEEDED) Shared library: [this/is/terrible/library.so] 0x00000001

Python tk framework

孤人 提交于 2019-12-22 05:48:11
问题 I have python code that generates the following error: objc[36554]: Class TKApplication is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[36554]: Class TKMenu is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /System/Library/Frameworks/Tk.framework/Versions/8.5/Tk. One of the two will be used. Which one is undefined. objc[36554]

Mac OS X Archive (.app) crashed on test Mac machine: EXC_BAD_INSTRUCTION

Deadly 提交于 2019-12-12 03:30:01
问题 I am working on a Mac application, which is running fine on my machine which is a development machine. The project has quite a few dylib files, the dependancies for which I had to solve using install_name_tool -change I used @executable_path in the above command. After doing this, the program works fine on my machine, when I move the .app file to test environment it fails.. Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_BAD_INSTRUCTION (SIGILL) Exception Codes:

XCode 4, dylib & install_name_tool

只愿长相守 提交于 2019-12-10 18:12:51
问题 I'm trying to get a dylib working in my OSX project. Ive been reading a few samples, this one specifically: XCode 4 adding dylib But I still cannot get it to work. Here are the steps I have performed: Copied the testing.1.dylib to my XCode projects folder. Ran sudo install_name_tool -id @executable_path/../Frameworks/testing.1.dylib testing.1.dylib Ran: otool -L testing.1.dylib and received the following: testing.1.dylib: @executable_path/../Frameworks/testing.1.dylib (compatibility version 2

install-name-tool does not add path to library when viewed through otool?

我只是一个虾纸丫 提交于 2019-12-09 22:48:08
问题 I finished my mac app using Xcode and Qt. Now I would like to prepare it for deployment to other macs. Inorder to do that I utilized macdeployqt. I just created an app bundle with macdeployqt. However some of the libraries are missing. I attempted to follow [this][1] answer. Turns out I need to copy the missing dylib from my computer to the .app and then run install name tool. I have not gotten to the install-name tool yet as I am confused as to use -id or -change with it especially in my

install_name_tool difference between -change and -id

試著忘記壹切 提交于 2019-12-07 09:26:30
问题 I have been struggling with this concept for a while and I cannot really understand what the difference is between -change and -id .The man page states -id name Changes the shared library identification name of a dynamic shared library to name. If the Mach-O binary is not a dynamic shared library and the -id option is specified it is ignored. -change old new Changes the dependent shared library install name old to new in the specified Mach-O binary. More than one of these options can be

install_name_tool does nothing

让人想犯罪 __ 提交于 2019-12-06 11:07:24
问题 I'm preparing my application for deployment on OSX. The only problem is relocating the shared libraries. I put them all inside a Frameworks-folder in the .app-folder itself. What I try for every library is something like: install_name_tool \ -id @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \ MyProgram.app/Contents/MacOS/MyProgram install_name_tool \ -change QtSql @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \ MyProgram.app/Contents/MacOS/MyProgram When I