LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-11-2005, 04:48 AM   #1
RodimusProblem
Member
 
Registered: Dec 2004
Distribution: Knoppix 3.6
Posts: 135

Rep: Reputation: 15
Checking Dependencies


In Windows it's possible to scan a binary program to see what libraries etc. it calls.

Is there a program or command to list dependencies for Linux programs?
 
Old 01-11-2005, 05:01 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,524

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
ldd
 
Old 01-11-2005, 05:24 AM   #3
RodimusProblem
Member
 
Registered: Dec 2004
Distribution: Knoppix 3.6
Posts: 135

Original Poster
Rep: Reputation: 15
Thanks, now is the message "not a dynamic executable" just refering to not having dependecies or does it mean there's a problem?
 
Old 01-11-2005, 05:39 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,524

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Try "file program" to confirm it is a statically linked binary, thus having no dependancies.
 
Old 01-11-2005, 06:24 AM   #5
RodimusProblem
Member
 
Registered: Dec 2004
Distribution: Knoppix 3.6
Posts: 135

Original Poster
Rep: Reputation: 15
It's a statically linked binary. Talk about portable: no dependancies!

Thanks again!
 
Old 01-11-2005, 03:34 PM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,524

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Do not overestimate statically linked programs advantage:

http://people.redhat.com/drepper/no_static_linking.html
 
Old 01-11-2005, 09:13 PM   #7
RodimusProblem
Member
 
Registered: Dec 2004
Distribution: Knoppix 3.6
Posts: 135

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jlliagre
Do not overestimate statically linked programs advantage:

http://people.redhat.com/drepper/no_static_linking.html

Interesting arguements;

But what I'm doing doesn't seem to match these arguements, mostly becuase these programs don't require much if anything to begin with. (Character-mode display programs rarely need help from libraries)

Compiled in Windows, this code has 4 dependencies (standard libs only).
 
Old 01-11-2005, 09:48 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,524

Rep: Reputation: 366Reputation: 366Reputation: 366Reputation: 366
Quote:
Character-mode display programs rarely need help from libraries
Well, they do always need at least (g)libc.
Not dynamically linking your program is removing dependancies on library files, but is imposing a big dependancy/binding on the static library you used to build the executable.
The static program is likely to either break or miss some features with newer O/S versions, while the dynamic one has more chances to adapt, as long as upward compatibility is maintained in the libs, which is unfortunately not guaranteed with Gnu/Linux.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error on start-up checking modules dependencies isamu_vf0 Linux - Software 0 08-17-2004 11:25 PM
problem while running linux 9,it always stops at checking modular dependencies sooraj_menon Linux - Hardware 1 03-02-2004 07:06 AM
Mandrake 9.0 hangs on boot at "checking distribution dependencies" patpawlowski Mandriva 1 02-02-2004 06:01 AM
Checking for Dependencies Darkman_2099 Linux - Newbie 2 10-29-2003 08:52 PM
building from src ...checking dependencies?? purpleburple Linux - General 1 12-31-2002 12:09 PM


All times are GMT -5. The time now is 09:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration