diff options
Diffstat (limited to 'documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html')
-rw-r--r-- | documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html | 164 |
1 files changed, 0 insertions, 164 deletions
diff --git a/documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html b/documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html deleted file mode 100644 index 885ee089e1..0000000000 --- a/documentation/getting-started/eclipse/html/getting-started/automatically-added-runtime-dependencies.html +++ /dev/null | |||
@@ -1,164 +0,0 @@ | |||
1 | <html> | ||
2 | <head> | ||
3 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | ||
4 | <title>3.4. Automatically Added Runtime Dependencies</title> | ||
5 | <link rel="stylesheet" type="text/css" href="../book.css"> | ||
6 | <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> | ||
7 | <link rel="home" href="index.html" title="Getting Started With Yocto Project"> | ||
8 | <link rel="up" href="overview-concepts.html" title="Chapter 3. Yocto Project Concepts"> | ||
9 | <link rel="prev" href="invalidating-shared-state.html" title="3.3.4.2. Invalidating Shared State"> | ||
10 | <link rel="next" href="fakeroot-and-pseudo.html" title="3.5. Fakeroot and Pseudo"> | ||
11 | </head> | ||
12 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="section" title="3.4. Automatically Added Runtime Dependencies"> | ||
13 | <div class="titlepage"><div><div><h2 class="title" style="clear: both"> | ||
14 | <a name="automatically-added-runtime-dependencies"></a>3.4. Automatically Added Runtime Dependencies</h2></div></div></div> | ||
15 | <p> | ||
16 | The OpenEmbedded build system automatically adds common types of | ||
17 | runtime dependencies between packages, which means that you do not | ||
18 | need to explicitly declare the packages using | ||
19 | <a class="link" href="../ref-manual/var-RDEPENDS.html" target="_self"><code class="filename">RDEPENDS</code></a>. | ||
20 | Three automatic mechanisms exist (<code class="filename">shlibdeps</code>, | ||
21 | <code class="filename">pcdeps</code>, and <code class="filename">depchains</code>) | ||
22 | that handle shared libraries, package configuration (pkg-config) | ||
23 | modules, and <code class="filename">-dev</code> and | ||
24 | <code class="filename">-dbg</code> packages, respectively. | ||
25 | For other types of runtime dependencies, you must manually declare | ||
26 | the dependencies. | ||
27 | </p> | ||
28 | <div class="itemizedlist"><ul class="itemizedlist" type="disc"> | ||
29 | <li class="listitem"> | ||
30 | <p> | ||
31 | <code class="filename">shlibdeps</code>: | ||
32 | During the | ||
33 | <a class="link" href="../ref-manual/ref-tasks-package.html" target="_self"><code class="filename">do_package</code></a> | ||
34 | task of each recipe, all shared libraries installed by the | ||
35 | recipe are located. | ||
36 | For each shared library, the package that contains the | ||
37 | shared library is registered as providing the shared | ||
38 | library. | ||
39 | More specifically, the package is registered as providing | ||
40 | the | ||
41 | <a class="ulink" href="https://en.wikipedia.org/wiki/Soname" target="_self">soname</a> | ||
42 | of the library. | ||
43 | The resulting shared-library-to-package mapping | ||
44 | is saved globally in | ||
45 | <a class="link" href="../ref-manual/var-PKGDATA_DIR.html" target="_self"><code class="filename">PKGDATA_DIR</code></a> | ||
46 | by the | ||
47 | <a class="link" href="../ref-manual/ref-tasks-packagedata.html" target="_self"><code class="filename">do_packagedata</code></a> | ||
48 | task.</p> | ||
49 | <p>Simultaneously, all executables and shared libraries | ||
50 | installed by the recipe are inspected to see what shared | ||
51 | libraries they link against. | ||
52 | For each shared library dependency that is found, | ||
53 | <code class="filename">PKGDATA_DIR</code> is queried to | ||
54 | see if some package (likely from a different recipe) | ||
55 | contains the shared library. | ||
56 | If such a package is found, a runtime dependency is added | ||
57 | from the package that depends on the shared library to the | ||
58 | package that contains the library.</p> | ||
59 | <p>The automatically added runtime dependency also | ||
60 | includes a version restriction. | ||
61 | This version restriction specifies that at least the | ||
62 | current version of the package that provides the shared | ||
63 | library must be used, as if | ||
64 | "<em class="replaceable"><code>package</code></em> (>= <em class="replaceable"><code>version</code></em>)" | ||
65 | had been added to | ||
66 | <a class="link" href="../ref-manual/var-RDEPENDS.html" target="_self"><code class="filename">RDEPENDS</code></a>. | ||
67 | This forces an upgrade of the package containing the shared | ||
68 | library when installing the package that depends on the | ||
69 | library, if needed.</p> | ||
70 | <p>If you want to avoid a package being registered as | ||
71 | providing a particular shared library (e.g. because the library | ||
72 | is for internal use only), then add the library to | ||
73 | <a class="link" href="../ref-manual/var-PRIVATE_LIBS.html" target="_self"><code class="filename">PRIVATE_LIBS</code></a> | ||
74 | inside the package's recipe. | ||
75 | </p> | ||
76 | </li> | ||
77 | <li class="listitem"> | ||
78 | <p> | ||
79 | <code class="filename">pcdeps</code>: | ||
80 | During the | ||
81 | <a class="link" href="../ref-manual/ref-tasks-package.html" target="_self"><code class="filename">do_package</code></a> | ||
82 | task of each recipe, all pkg-config modules | ||
83 | (<code class="filename">*.pc</code> files) installed by the recipe | ||
84 | are located. | ||
85 | For each module, the package that contains the module is | ||
86 | registered as providing the module. | ||
87 | The resulting module-to-package mapping is saved globally in | ||
88 | <a class="link" href="../ref-manual/var-PKGDATA_DIR.html" target="_self"><code class="filename">PKGDATA_DIR</code></a> | ||
89 | by the | ||
90 | <a class="link" href="../ref-manual/ref-tasks-packagedata.html" target="_self"><code class="filename">do_packagedata</code></a> | ||
91 | task.</p> | ||
92 | <p>Simultaneously, all pkg-config modules installed by | ||
93 | the recipe are inspected to see what other pkg-config | ||
94 | modules they depend on. | ||
95 | A module is seen as depending on another module if it | ||
96 | contains a "Requires:" line that specifies the other module. | ||
97 | For each module dependency, | ||
98 | <code class="filename">PKGDATA_DIR</code> is queried to see if some | ||
99 | package contains the module. | ||
100 | If such a package is found, a runtime dependency is added | ||
101 | from the package that depends on the module to the package | ||
102 | that contains the module. | ||
103 | </p> | ||
104 | <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> | ||
105 | <h3 class="title">Note</h3> | ||
106 | The <code class="filename">pcdeps</code> mechanism most often | ||
107 | infers dependencies between <code class="filename">-dev</code> | ||
108 | packages. | ||
109 | </div> | ||
110 | <p> | ||
111 | </p> | ||
112 | </li> | ||
113 | <li class="listitem"> | ||
114 | <p> | ||
115 | <code class="filename">depchains</code>: | ||
116 | If a package <code class="filename">foo</code> depends on a package | ||
117 | <code class="filename">bar</code>, then <code class="filename">foo-dev</code> | ||
118 | and <code class="filename">foo-dbg</code> are also made to depend on | ||
119 | <code class="filename">bar-dev</code> and | ||
120 | <code class="filename">bar-dbg</code>, respectively. | ||
121 | Taking the <code class="filename">-dev</code> packages as an | ||
122 | example, the <code class="filename">bar-dev</code> package might | ||
123 | provide headers and shared library symlinks needed by | ||
124 | <code class="filename">foo-dev</code>, which shows the need | ||
125 | for a dependency between the packages.</p> | ||
126 | <p>The dependencies added by | ||
127 | <code class="filename">depchains</code> are in the form of | ||
128 | <a class="link" href="../ref-manual/var-RRECOMMENDS.html" target="_self"><code class="filename">RRECOMMENDS</code></a>. | ||
129 | </p> | ||
130 | <div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"> | ||
131 | <h3 class="title">Note</h3> | ||
132 | By default, <code class="filename">foo-dev</code> also has an | ||
133 | <code class="filename">RDEPENDS</code>-style dependency on | ||
134 | <code class="filename">foo</code>, because the default value of | ||
135 | <code class="filename">RDEPENDS_${PN}-dev</code> (set in | ||
136 | <code class="filename">bitbake.conf</code>) includes | ||
137 | "${PN}". | ||
138 | </div> | ||
139 | <p>To ensure that the dependency chain is never broken, | ||
140 | <code class="filename">-dev</code> and <code class="filename">-dbg</code> | ||
141 | packages are always generated by default, even if the | ||
142 | packages turn out to be empty. | ||
143 | See the | ||
144 | <a class="link" href="../ref-manual/var-ALLOW_EMPTY.html" target="_self"><code class="filename">ALLOW_EMPTY</code></a> | ||
145 | variable for more information. | ||
146 | </p> | ||
147 | </li> | ||
148 | </ul></div> | ||
149 | <p> | ||
150 | </p> | ||
151 | <p> | ||
152 | The <code class="filename">do_package</code> task depends on the | ||
153 | <a class="link" href="../ref-manual/ref-tasks-packagedata.html" target="_self"><code class="filename">do_packagedata</code></a> | ||
154 | task of each recipe in | ||
155 | <a class="link" href="../ref-manual/var-DEPENDS.html" target="_self"><code class="filename">DEPENDS</code></a> | ||
156 | through use of a | ||
157 | <code class="filename">[</code><a class="link" href="../bitbake-user-manual/variable-flags.html" target="_self"><code class="filename">deptask</code></a><code class="filename">]</code> | ||
158 | declaration, which guarantees that the required | ||
159 | shared-library/module-to-package mapping information will be available | ||
160 | when needed as long as <code class="filename">DEPENDS</code> has been | ||
161 | correctly set. | ||
162 | </p> | ||
163 | </div></body> | ||
164 | </html> | ||