ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I find dependancies of modules? Is it just look at the dependancy list in, for example, synaptic? Will this give all dependancies? Is there a method to trace the dependancies at runtime? etc...
The dependencies in a module are usually given in it's documentation.
The dependencies in a deb file are included in the file. Packet managers use the metadata in their packages to run down dependencies for that package. The list against a particular package will not be all files needed to run the program - the dependencies may also have dependencies which they rely on - and those their own.
You don't normally try to track dependencies at runtime - this is normally done at installation. Try to run a program with a missing whatsit, will get you an error of some kind (depending an how well written the program is).
There is no magic bullet to tracking dependencies - if someone fails to provide the information you are left with hunting down clues in the source code.
Well, I am developing an embedded Linux application and have found some kernel modules and applications missing on the embedded target, but they same are all available on the host. I was hoping for some 'lovely' utility to track load/link-time and run-time dependencies so I could identify the dependencies on the host and thus build the necessary parts for the embedded target.
I was assuming they was such a 'mythical' application for Linux as I am familiar with an application called 'Dependency Walker' for Win32 programs.
Windows "Dependency walker" wouldn't completely help you with everything you were asking about, either. It only tells you the runtime shared library dependencies.
The equivalent *nix command (to see shared runtime dependencies) is:
DEF: I'm guessing there is a semantics problem here ... in the linux world, a "dependency" is usually a program which another program depends on. Though this can apply to shared libraries as well, programmers here will often make a distinction between package dependencies (a la "dependency hell") and shared libraries.
So your question probably came out much more general than you intended.
If you'll tell which modules and apps are missing and how you discovered this, we'll probably be able to figure out what you need. As mentioned, ldd, is probably going to do what you need.
Microsoft limit the ways that a developer can interact with their system, so it is probably easier to track dependencies there. With FOSS, there are no restrictions to access. This also means that discipline in writing code is more important.
Thanks 'paulSM4': however your comment is not true: Windows "Dependency walker" tracks all libs loaded at runtime including static and dynamic (although some ativeX components don't always show-up ). Anyhow, this is off subject.
Thanks 'Simon Bridge': I think dependencies means the same think in both Linux and Windows no? Anyhow, the help here is good. ldd does help.
I am surprised to see there is not a Linux tool that can track module use at runtime? Perhaps there is a need for one?
Packages can be queried for dependencies. If you are building a package, the ./configure script checks for missing dependencies. Some package installers will download the dependencies that a package needs.
If you are missing a depend library or module, how would a runtime display of libraries help. ldd does list the loadable libraries that get linked.
I think dependencies means the same think in both Linux and Windows no? Anyhow, the help here is good. ldd does help.
I don't think windows has the package dependency issues that gnu/linux has. Windows apps are usually all-in-one affairs IIRC. I certainly don't recall installsheild complaining that I need to have installed from a different zip first.
You have to be joking - Windows definitely has dependency issues and anyone who has developed for Windows will no this! Especially when changing from NT > 2000 > XP or try developing mobile devices...
Also many windows installers check dependencies first, they typically ship the correct versions of required dll with the installer and install them locally (or in some bad cases overwrite your system ones ).
Again this is all off topic.
So, in Linux use ldd to track dependencies and modinfo for kernel module dependencies?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.