source: chapter02/aboutdependencies.xml@ 7f1fcd8

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.0 6.1 6.1.1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk v5_0 v5_1 v5_1_1 xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 7f1fcd8 was 791dec6, checked in by Billy O 'Connor <billyoc@…>, 21 years ago

Grammatical corection.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@3031 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.7 KB
Line 
1<sect1 id="ch02-aboutdependencies">
2<title>About dependencies</title>
3<?dbhtml filename="aboutdependencies.html" dir="chapter02"?>
4
5<para>There are a few ways to compile a list of a package's installation
6dependencies. What we consider the best way is using the
7<command>strace</command> program available at <ulink
8url="http://www.wi.leidenuniv.nl/~wichert/strace/"/>.</para>
9
10<para><command>strace</command> is a program that provides a trace of all
11system calls made by another program. One of the most useful system calls
12to trace when figuring out dependencies is the <emphasis>execve(2)</emphasis>
13system call, which is used to execute programs (see its man page for
14all the details). Whenever you run a program, be it from a shell or via a
15configure script or Makefile file, the execve call is made. If you trace
16these calls, you will know what programs were executed behind the
17scenes.</para>
18
19<para>Here is a line of output from running a configure script:</para>
20
21<screen>19580 execve("/bin/rm", ["rm", "-f", "conf19538", "conf19538.exe", "conf19538.file"], [/* 26 vars */]) = 0</screen>
22
23<para>This line tells us that the <command>/bin/rm</command> program was
24run with a PID of 19580, which command line parameters it was given (rm -f
25conf195838 conf19538.exe conf19538.file) and its exit value (0).</para>
26
27<para>For dependency purposes all we care about is that
28<command>/bin/rm</command> was run during the configure script, so this is
29an installation dependency. Without <command>rm</command>, the script
30wouldn't be able to run properly.</para>
31
32<para>Unfortunately, this method is not foolproof. Configure scripts check
33for the presense of many programs, but not all of them are considered real
34dependencies. For instance, configure scripts may check for the presence of
35the <command>autoconf</command> program. It will be listed in the strace
36output, but it's not a real installation dependency. A package will in most
37if not all cases install just fine without that program. There are other
38such false positives.</para>
39
40<para>This means automatic dependency gathering is never accurate. You will
41always need to validate the list and figure out the false positives. In
42some (rare) cases autoconf might be a real dependency, so you
43can't simply ignore all autoconf entries. A manual validation really is a
44requirement for an accurate list.</para>
45
46<para>This book is not so verbose as to list exactly which program from which
47package is required for a successfull installation (we used to, but it had
48become too much work to maintain it). The book will contain simply the
49names of packages you need to have installed. If you need the verbosity
50in the form of "package a needs file b and c from package d", have a look
51at &lt;enter URL when it's available&gt;.</para>
52
53</sect1>
54
Note: See TracBrowser for help on using the repository browser.