Determine load path of linked framework at runtime

  • Hi all,

    Is there a way to discover the load path of a framework at runtime?

    I have an odd situation where a framework which is bundled within my app is being overridden by an older copy on a user's machine. They've tried looking in all the usual /Frameworks locations and performed a search but to no avail. If there's some way to log the actual load path used that would reveal the problem immediately, I'm thinking.

    --Graham
  • On 5 Jun 2013, at 3:59 PM, Graham Cox wrote:
    > Hi all,
    >
    > Is there a way to discover the load path of a framework at runtime?
    >
    > I have an odd situation where a framework which is bundled within my app is being overridden by an older copy on a user's machine. They've tried looking in all the usual /Frameworks locations and performed a search but to no avail. If there's some way to log the actual load path used that would reveal the problem immediately, I'm thinking.

    For a one-off, they can try running the program with the DYLD_PRINT_LIBRARIES environment variable set (see the dyld(1) man page).

    You can also query the dynamic linker's information about a library at run time using dladdr().
  • On 06/06/2013, at 9:05 AM, Wim Lewis <wiml...> wrote:

    > You can also query the dynamic linker's information about a library at run time using dladdr().

    Perfect! Thanks...

    --Graham
  • On 2013 Jun 05, at 15:59, Graham Cox <graham.cox...> wrote:

    > I have an odd situation where a framework which is bundled within my app is being overridden by an older copy on a user's machine.

    A couple months ago, I had one use report that a new version of one of my apps wouldn't launch after a Sparkle update.  He sent a log entry which indicated that a framework, whose load path I had just changed, was not loading, and yup it was looking down the old path.  It looks like the same problem as you're reporting here.

    The resolution was that he re-downloaded the app, relaunched, and it worked.  The case remains in my Mysteries file.
  • Testing

    From: <wiml...>
    Date: Wednesday, June 5, 2013
    To: Graham Cox <graham.cox...>
    Subject: Re: Determine load path of linked framework at runtime

    >> On 5 Jun 2013, at 3:59 PM, Graham Cox wrote:
    >>> Hi all,
    >>>
    >>> Is there a way to discover the load path of a framework at runtime?
    >>>
    >>> I have an odd situation where a framework which is bundled within my app is being overridden by an older copy on a user's machine. They've tried looking in all the usual /Frameworks locations and performed a search but to no avail. If there's some way to log the actual load path used that would reveal the problem immediately, I'm thinking.
    >>
    >> For a one-off, they can try running the program with the DYLD_PRINT_LIBRARIES environment variable set (see the dyld(1) man page).
    >>
    >> You can also query the dynamic linker's information about a library at run time using dladdr().
    >>
  • From: <wiml...>
    Date: Wednesday, June 5, 2013
    To: Graham Cox <graham.cox...>
    Subject: Re: Determine load path of linked framework at runtime

    >> On 5 Jun 2013, at 3:59 PM, Graham Cox wrote:
    >>> Hi all,
    >>>
    >>> Is there a way to discover the load path of a framework at runtime?
    >>>
    >>> I have an odd situation where a framework which is bundled within my app is being overridden by an older copy on a user's machine. They've tried looking in all the usual /Frameworks locations and performed a search but to no avail. If there's some way to log the actual load path used that would reveal the problem immediately, I'm thinking.
    >>
    >> For a one-off, they can try running the program with the DYLD_PRINT_LIBRARIES environment variable set (see the dyld(1) man page).
    >>
    >> You can also query the dynamic linker's information about a library at run time using dladdr().
    >>
previous month june 2013 next month
MTWTFSS
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Go to today