source: chapter02/aboutdependencies.xml@ c91dd5b

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_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 c91dd5b was 3be4d97, checked in by Alex Gronenwoud <alex@…>, 20 years ago

Changing identifiers in preparation for moving sections.

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

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