Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've got a binary, compiled by a third party and I need to know all the dependencies it requires. I'm not sure if ldd shows everything. I'm sure the binary uses GStreamer, and some codec packages, but ldd shows only GStreamer, without codec packs...

Any ideas how to do it correctly?

share|improve this question

3 Answers 3

ldd shows only linking dependencies, that is, it does not show what may be required to actually run the program successfully, just what is required to run the program at all.

You should do dependency resolution through your package manager.

share|improve this answer
    
Chris, thanks for answer! How can i do dependency resolution throug package manager if i have only binary? Don't i need to recompile it from sources to package? –  Max Peaceprayer Jan 17 '13 at 9:13
    
A package manager doesn't help for unknown binaries. It only helps in resolving dependencies if the binary is installed through the package manager itself. –  scai Jan 17 '13 at 9:29
    
@MaxPeaceprayer This is a hint that you should ideally use a packaged version ;-) –  Chris Down Jan 17 '13 at 9:58
    
@ChrisDown a-ha, got that from the begining, but had a strange hope, that there's another way : ) thank you for help, guys –  Max Peaceprayer Jan 17 '13 at 11:27

Libraries can be loaded at runtime depending on the specific environment, command line arguments, configuration options and maybe even the moon phase. Libraries itself can depend on other libraries, too. So determining what is actually required seems impossible unless you know what your binary is doing inside.

share|improve this answer
    
Thanks for answer, scai! So i need to check it with ldd and check dependencies right inisde from code? –  Max Peaceprayer Jan 17 '13 at 9:22

ldd is a good start. Then, you could run the binary through strace -fo /tmp/strace.log, and have a look in there for what the application is trying to find.

Start with a grep of ENOENT to see what it is not finding.

You can also have a look at the documentation shipped with that application and possibly its running logs if any.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.