kwin / macdependency Goto Github PK
View Code? Open in Web Editor NEWMacDependency shows all dependent libraries and frameworks of a given executable, dynamic library or framework on Mac OS X
License: GNU General Public License v3.0
MacDependency shows all dependent libraries and frameworks of a given executable, dynamic library or framework on Mac OS X
License: GNU General Public License v3.0
Fantastic app and worthy replacement for most otool usage. But it needs a nice
custom icon!
Original issue reported on code.google.com by [email protected]
on 8 Apr 2012 at 11:21
I started using macdependency to find issues with my broken development environment. When I find a missing/misplaced library, and move it to the proper location, the macdependency window does not update (file reference still stays red). Trying to reopen the original file, with File | Open | Recent (or File | Open and pointing to the same file) doesn't seem to refresh the window either. I think it would be nice to either poll the file for changes periodically or have a refresh button somewhere in the interface.
As soon as you try to open a dylib with MacDependency it crashs with this log:
__TEXT 0000000100000000-000000010000b000 [ 44K] r-x/rwx SM=COW /Applications/MacDependency.app/Contents/MacOS/MacDependency
Application Specific Information:
Performing @selector(_openRecentDocument:) from sender NSMenuItem 0x6180000a4440
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libstdc++.6.dylib 0x00007fffcd21304c std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) + 16
1 com.googlecode.MachO 0x00000001000229f6 MachO::getApplicationInBundle(std::string const&) + 60
2 com.googlecode.MachO 0x0000000100022b02 MachO::MachO(std::string const&, MachO const*) + 72
3 com.googlecode.MachO 0x000000010001a05d MachOCache::getFile(std::string const&, MachO const*) + 77
4 com.googlecode.MacDependency 0x0000000100003a0e -[MyDocument readFromURL:ofType:error:] + 116
5 com.apple.AppKit 0x00007fffb6287647 -[NSDocument _initWithContentsOfURL:ofType:error:] + 172
6 com.apple.AppKit 0x00007fffb628752c -[NSDocument initWithContentsOfURL:ofType:error:] + 231
7 com.apple.AppKit 0x00007fffb63644e0 -[NSDocumentController makeDocumentWithContentsOfURL:ofType:error:] + 644
8 com.apple.AppKit 0x00007fffb65a1e18 -[NSDocumentController(NSDeprecated) openDocumentWithContentsOfURL:display:error:] + 915
9 com.apple.AppKit 0x00007fffb6362737 -[NSDocumentController _openDocumentsWithContentsOfURLs:presentErrors:completionHandler:] + 370
10 com.apple.AppKit 0x00007fffb659b0d6 __55-[NSDocumentController(NSPrivate) _openRecentDocument:]_block_invoke + 531
11 com.apple.AppKit 0x00007fffb659ae68 -[NSDocumentController(NSPrivate) _openRecentDocument:] + 197
12 libsystem_trace.dylib 0x00007fffcd6d303d _os_activity_initiate + 61
13 com.apple.AppKit 0x00007fffb67784e7 -[NSApplication(NSResponder) sendAction:to:from:] + 456
14 com.apple.AppKit 0x00007fffb62b6de2 -[NSMenuItem _corePerformAction] + 324
15 com.apple.AppKit 0x00007fffb62b6b4e -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114
16 libsystem_trace.dylib 0x00007fffcd6d303d _os_activity_initiate + 61
17 com.apple.AppKit 0x00007fffb633fb99 -[NSMenu performActionForItemAtIndex:] + 121
18 com.apple.AppKit 0x00007fffb633fb10 -[NSMenu _internalPerformActionForItemAtIndex:] + 94
19 com.apple.AppKit 0x00007fffb633f93d -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 107
20 com.apple.AppKit 0x00007fffb61f62ac NSSLMMenuEventHandler + 986
21 com.apple.HIToolbox 0x00007fffb79480d5 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1708
22 com.apple.HIToolbox 0x00007fffb7947346 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 428
23 com.apple.HIToolbox 0x00007fffb795cdc4 SendEventToEventTarget + 40
24 com.apple.HIToolbox 0x00007fffb79a8c96 SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 411
25 com.apple.HIToolbox 0x00007fffb79d42bb SendMenuCommandWithContextAndModifiers + 59
26 com.apple.HIToolbox 0x00007fffb79d426a SendMenuItemSelectedEvent + 188
27 com.apple.HIToolbox 0x00007fffb79d413d FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) + 96
28 com.apple.HIToolbox 0x00007fffb79d4b77 MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*) + 702
29 com.apple.HIToolbox 0x00007fffb79d4826 _HandleMenuSelection2 + 460
30 com.apple.AppKit 0x00007fffb61e6079 _NSHandleCarbonMenuEvent + 239
31 com.apple.AppKit 0x00007fffb6460322 _DPSEventHandledByCarbon + 54
32 com.apple.AppKit 0x00007fffb67764eb -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 613
33 com.apple.AppKit 0x00007fffb605afbd -[NSApplication run] + 926
34 com.apple.AppKit 0x00007fffb6025a8a NSApplicationMain + 1237
35 com.googlecode.MacDependency 0x00000001000018b4 start + 52
Looks like the OS is preventing it to access the file and MD is not prepared for that.
@kwin Looks like this assumes some archaic version of Boost? Could we fix it to build with 1.76?
In file included from /opt/local/include/boost/process/detail/basic_cmd.hpp:10,
from /opt/local/include/boost/process/args.hpp:33,
from /opt/local/include/boost/process.hpp:22,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/detail/config.hpp:21:24: error: system_error: No such file or directory
In file included from /opt/local/include/boost/process/detail/basic_cmd.hpp:13,
from /opt/local/include/boost/process/args.hpp:33,
from /opt/local/include/boost/process.hpp:22,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/detail/traits/cmd_or_exe.hpp:12:23: error: type_traits: No such file or directory
/opt/local/include/boost/process/detail/traits/cmd_or_exe.hpp:13:28: error: initializer_list: No such file or directory
In file included from /opt/local/include/boost/process/detail/traits/wchar_t.hpp:13,
from /opt/local/include/boost/process/detail/basic_cmd.hpp:14,
from /opt/local/include/boost/process/args.hpp:33,
from /opt/local/include/boost/process.hpp:22,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/locale.hpp:16:19: error: codecvt: No such file or directory
In file included from /opt/local/include/boost/process/async.hpp:33,
from /opt/local/include/boost/process.hpp:23,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/detail/on_exit.hpp:17:18: error: future: No such file or directory
In file included from /opt/local/include/boost/process/detail/posix/async_pipe.hpp:10,
from /opt/local/include/boost/process/async_pipe.hpp:18,
from /opt/local/include/boost/process/detail/posix/async_in.hpp:16,
from /opt/local/include/boost/process/async.hpp:43,
from /opt/local/include/boost/process.hpp:23,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/detail/posix/basic_pipe.hpp:17:17: error: array: No such file or directory
In file included from /opt/local/include/boost/process/child.hpp:21,
from /opt/local/include/boost/process/async_system.hpp:22,
from /opt/local/include/boost/process.hpp:24,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/detail/child_decl.hpp:21:18: error: chrono: No such file or directory
/opt/local/include/boost/process/detail/child_decl.hpp:25:18: error: atomic: No such file or directory
In file included from /opt/local/include/boost/fusion/adapted/std_tuple/detail/begin_impl.hpp:11,
from /opt/local/include/boost/fusion/adapted/std_tuple.hpp:14,
from /opt/local/include/boost/process/detail/execute_impl.hpp:37,
from /opt/local/include/boost/process/child.hpp:22,
from /opt/local/include/boost/process/async_system.hpp:22,
from /opt/local/include/boost/process.hpp:24,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/fusion/adapted/std_tuple/std_tuple_iterator.hpp:17:17: error: tuple: No such file or directory
In file included from /opt/local/include/boost/process/environment.hpp:17,
from /opt/local/include/boost/process/env.hpp:9,
from /opt/local/include/boost/process.hpp:28,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/detail/posix/environment.hpp:11:25: error: unordered_map: No such file or directory
In file included from /opt/local/include/boost/process.hpp:39,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/system.hpp:27:17: error: mutex: No such file or directory
/opt/local/include/boost/process/system.hpp:28:30: error: condition_variable: No such file or directory
In file included from /opt/local/include/boost/process/detail/config.hpp:24,
from /opt/local/include/boost/process/detail/basic_cmd.hpp:10,
from /opt/local/include/boost/process/args.hpp:33,
from /opt/local/include/boost/process.hpp:22,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/exception.hpp:21: error: expected class-name before ‘{’ token
/opt/local/include/boost/process/exception.hpp:22: error: ‘std::system_error’ has not been declared
In file included from /opt/local/include/boost/process/detail/basic_cmd.hpp:10,
from /opt/local/include/boost/process/args.hpp:33,
from /opt/local/include/boost/process.hpp:22,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.h:5,
from /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp:1:
/opt/local/include/boost/process/detail/config.hpp:50: error: ‘error_code’ in namespace ‘std’ does not name a type
/opt/local/include/boost/process/detail/config.hpp: In function ‘void boost::process::detail::throw_last_error(const std::string&)’:
/opt/local/include/boost/process/detail/config.hpp:76: error: ‘get_last_error’ was not declared in this scope
/opt/local/include/boost/process/detail/config.hpp: In function ‘void boost::process::detail::throw_last_error(const char*)’:
/opt/local/include/boost/process/detail/config.hpp:81: error: ‘get_last_error’ was not declared in this scope
/opt/local/include/boost/process/detail/config.hpp: In function ‘void boost::process::detail::throw_last_error()’:
/opt/local/include/boost/process/detail/config.hpp:86: error: ‘get_last_error’ was not declared in this scope
/opt/local/include/boost/process/detail/config.hpp: At global scope:
/opt/local/include/boost/process/detail/config.hpp:89: error: expected unqualified-id before ‘&’ token
/opt/local/include/boost/process/detail/config.hpp:89: error: expected ‘,’ or ‘...’ before ‘&’ token
/opt/local/include/boost/process/detail/config.hpp: In function ‘void boost::process::detail::throw_error()’:
/opt/local/include/boost/process/detail/config.hpp:91: error: ‘ec’ was not declared in this scope
/opt/local/include/boost/process/detail/config.hpp: At global scope:
/opt/local/include/boost/process/detail/config.hpp:95: error: expected unqualified-id before ‘&’ token
/opt/local/include/boost/process/detail/config.hpp:95: error: expected ‘,’ or ‘...’ before ‘&’ token
/opt/local/include/boost/process/detail/config.hpp: In function ‘void boost::process::detail::throw_error()’:
/opt/local/include/boost/process/detail/config.hpp:95: error: redefinition of ‘void boost::process::detail::throw_error()’
/opt/local/include/boost/process/detail/config.hpp:89: error: ‘void boost::process::detail::throw_error()’ previously defined here
/opt/local/include/boost/process/detail/config.hpp:97: error: ‘ec’ was not declared in this scope
/opt/local/include/boost/process/detail/config.hpp:98: error: ‘msg’ was not declared in this scope
. . .
/opt/local/include/boost/asio/detail/push_options.hpp:82: error: expected `}' before end of line
/opt/local/include/boost/asio/detail/push_options.hpp:82: error: expected declaration before end of line
** BUILD FAILED **
The following build commands failed:
MachO:
CompileC /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MacDependency/build/MachO.build/Release/MachO.build/Objects-normal/ppc/internalfile.o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/internalfile.cpp normal ppc c++ com.apple.compilers.gcc.4_2
CompileC /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MacDependency/build/MachO.build/Release/MachO.build/Objects-normal/ppc/demangler.o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/demangler.cpp normal ppc c++ com.apple.compilers.gcc.4_2
CompileC /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MacDependency/build/MachO.build/Release/MachO.build/Objects-normal/ppc/macho.o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/macho.cpp normal ppc c++ com.apple.compilers.gcc.4_2
CompileC /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MacDependency/build/MachO.build/Release/MachO.build/Objects-normal/ppc/symboltableentry.o /opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO/symboltableentry.cpp normal ppc c++ com.apple.compilers.gcc.4_2
(4 failures)
Command failed: cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MachO" && /usr/bin/xcodebuild -target "MachO" -configuration Deployment build OBJROOT="/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MacDependency/build/" SYMROOT="/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_sysutils_macdependency/macdependency/work/macdependency-1.0.0/MacDependency/build/" MACOSX_DEPLOYMENT_TARGET=10.6 ARCHS=ppc SDKROOT="" GCC_VERSION=4.2 CLANG_CXX_LIBRARY="libstdc++"
Exit code: 1
Yet better, of course, would be to fix 1.1.0 to build for PowerPC.
I downloaded and installed MacDependency v1.1.0 from the Releases, but it didn't open. I'm guessing cause I'm on an M2 Mac, and this release was from 2016, it only works on the older Intel Macs?
I'm on MacOS Sonoma 14.1.1.
Is it easy to recompile this project for Arm64 CPU architecture, or is that a lot of work?
(Everything works except that it doesn't open any GUI or window on my desktop, even though it shows the program is open above).
Thanks :)
If I use otool
on my app, the LC_RPATH shows @executable_path/../Frameworks
.
But the new release (thanks BTW!) shows the RPATH in the interface something like this:
/Users/me/dev/MyApp.app/Contents/MacOS/../Frameworks
This is not really that useful since that's not the real RPATH - that's what it would expand to on my machine.
I tend to use the RPATH info to make sure my deployments are going to work on other machines (which is why I'm using this tool to begin with), so showing the unmodified RPATH like you see in otool
would be useful.
What steps will reproduce the problem?
1. Just open a library with File -> Open...
What is the expected output? What do you see instead?
I presume I should see the main app window. Instead, I get a message from the
Operating System (OSX 10.5.8) saying that the app has crashed
What version of the product are you using? On what operating system?
version 1.0.0, on Mac OSX 10.5.8
Please provide any additional information below.
It looks like it is a segmentation fault. Attached you may find the crash
report text from the system.
Original issue reported on code.google.com by [email protected]
on 18 Jun 2012 at 2:20
Attachments:
I'm sure its a simple thing, but would be nice for it to say M1 or whatever processor...
Probably in switch line 53 of ArchitectureModel.mm?
and Localizable.strings from line 37.
As of change 62986286 in https://developer.apple.com/documentation/macos-release-notes/macos-big-sur-11_0_1-release-notes. Links and Copies of dynamic libraries aren't located in the file system anymore, the lookup, if a dependency is available will fail, even if the library is existent and reachable over the cache:
New in macOS Big Sur 11.0.1, the system ships with a built-in dynamic linker cache of all system-provided libraries. As part of this change, copies of dynamic libraries are no longer present on the filesystem. Code that attempts to check for dynamic library presence by looking for a file at a path or enumerating a directory will fail. Instead, check for library presence by attempting to dlopen() the path, which will correctly check for the library in the cache. (62986286)
DependencyWalker shows if some function is missing, not just whole library.
Also would be nice to show from which dependent library function is linked.
What steps will reproduce the problem?
1. Set DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH to the folder containing
dependent libraries
2. Open library that contains references to those dependent libs whereby the
reference only contains the name and no absolute path
e.g. otool -L libML.dylib
libML.dylib:
libML.dylib (compatibility version 1.0.0, current version 1.0.0)
libMLLinearAlgebra.dylib (compatibility version 1.0.0, current version 1.0.0)
libMLMemoryManager.dylib (compatibility version 1.0.0, current version 1.0.0)
libMLProfilingManager.dylib (compatibility version 1.0.0, current version 1.0.0)
libMLUtilities.dylib (compatibility version 1.0.0, current version 1.0.0)
libboost_thread-mt-MLAB.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 438.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1)
What is the expected output? What do you see instead?
I would expect e.g. libMLLinearAlgebra.dylib to be found
What version of the product are you using? On what operating system?
1.0 on OSX 10.6.4
Please provide any additional information below.
The environment variables have been set in the shell and MacDependency is
called via shell:
~/Applications/MacDependency.app/Contents/MacOS/MacDependency libML.dylib
Original issue reported on code.google.com by [email protected]
on 14 Sep 2010 at 11:00
Thanks for this - just helped me track down an issue!
One thing that would be useful would be to show all the RPATHS for a given executable/dylib in the interface somewhere instead of having to flip back-and-forth to otool
on the command line for them.
Objective C is supported: http://docs.travis-ci.com/user/languages/objective-c/ (should be used for at least for Macdependency submodule).
Could we get a 1.0.1 release build?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.