source: chapter02/aboutdependencies.xml@ 46c039e

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 12.2 12.2-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_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/loongarch-12.2 xry111/mips64el xry111/multilib xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 46c039e was 46c039e, checked in by Alex Gronenwoud <alex@…>, 21 years ago

Removing some of the dbhtml directives.

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

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