On one computer, an OS X launchd daemon is crashing when it fails to load the MailCore framework. However, the framework is in the expected location, and the daemon is running properly on my computer as well as several others’. Does anyone know what might be causing the “image not found” error? Or how to troubleshoot this issue?
The MailCore lib is installed at:
/Library/Application Support/ArgusLink/bin/MailCore.framework/Versions/A/MailCore
The binary trying to load it is installed at (and run via launchd):
/Library/Application Support/ArgusLink/bin/arguslinkd
The install name for MailCore is:
@loader_path/MailCore.framework/Versions/A/MailCore
MailCore is built for i386 architecture. The computer on which the daemon crashed is running 10.6.8, with which I have tested successfully.
Full crash report:
Process: arguslinkd [349]
Path: /Library/Application Support/ArgusLink/bin/arguslinkd
Identifier: arguslinkd
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: launchd [1]
Date/Time: 2011-11-22 08:58:30.117 -0500
OS Version: Mac OS X 10.6.8 (10K549)
Report Version: 6
Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread: 0
Dyld Error Message:
Library not loaded: @loader_path/MailCore.framework/Versions/A/MailCore
Referenced from: /Library/Application Support/ArgusLink/bin/arguslinkd
Reason: image not found
Binary Images:
0x8fe00000 - 0x8fe4162b dyld 132.1 (???) <A4F6ADCC-6448-37B4-ED6C-ABB2CD06F448>
/usr/lib/dyld
Following the advice at Dave Dribin’s Blog, I switched to using
@rpathinstead of@loader_path, though I’m a little fuzzy as to why that might have fixed the problem.Note that I had to use
@rpath/instead of@rpathfor theRunpath Search Pathsvalue (the library is in the same directory as the loader executable), or I would otherwise continue to get “library not found” errors.