blob: 38689b9920955804e02b9deaf965b1d0296e2f72 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
2"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
3[<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
4
5<chapter id='ref-qa-checks'>
6<title>QA Error and Warning Messages</title>
7
8<section id='qa-introduction'>
9 <title>Introduction</title>
10
11 <para>
12 When building a recipe, the OpenEmbedded build system performs
13 various QA checks on the output to ensure that common issues are
14 detected and reported.
15 Sometimes when you create a new recipe to build new software,
16 it will build with no problems.
17 When this is not the case, or when you have QA issues building any
18 software, it could take a little time to resolve them.
19 </para>
20
21 <para>
22 While it is tempting to ignore a QA message or even to
23 disable QA checks, it is best to try and resolve any
24 reported QA issues.
25 This chapter provides a list of the QA messages and brief explanations
26 of the issues you could encounter so that you can properly resolve
27 problems.
28 </para>
29
30 <para>
31 The next section provides a list of all QA error and warning
32 messages based on a default configuration.
33 Each entry provides the message or error form along with an
34 explanation.
35 <note>
36 <title>Notes</title>
37 <itemizedlist>
38 <listitem><para>
39 At the end of each message, the name of the associated
40 QA test (as listed in the
41 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
42 section) appears within square brackets.
43 </para></listitem>
44 <listitem><para>
45 As mentioned, this list of error and warning messages is for
46 QA checks only.
47 The list does not cover all possible build errors or
48 warnings you could encounter.
49 </para></listitem>
50 <listitem><para>
51 Because some QA checks are disabled by default, this list
52 does not include all possible QA check errors and warnings.
53 </para></listitem>
54 </itemizedlist>
55 </note>
56 </para>
57</section>
58
59<section id='qa-errors-and-warnings'>
60 <title>Errors and Warnings</title>
61
62<!--
63This section uses the <para><code> construct to enable permalinks for the
64various QA issue and warning messages. The file templates/qa-code-permalinks.xsl
65is used to locate the construct and generate the permalink. This solution
66leverages the fact that right now this section in the ref-manual is the only
67place is all the YP docs that uses the <para><code> construct. If, in the
68future, that construct were to appear in the ref-manual, a generic permalink
69would be generated for the text between <code></code>. If a better solution
70can be found then it should be implemented. I can't find one at the moment.
71-->
72
73 <para>
74 <itemizedlist>
75 <listitem>
76 <para id='qa-issue-libexec'>
77 <code>
78 &lt;packagename&gt;: &lt;path&gt; is using libexec please relocate to &lt;libexecdir&gt; [libexec]
79 </code>
80 </para>
81
82 <para>
83 The specified package contains files in
84 <filename>/usr/libexec</filename>.
85 By default, <filename>libexecdir</filename> is set to
86 "${libdir}/${BPN}" rather than to "/usr/libexec".
87 Thus, installing to <filename>/usr/libexec</filename>
88 is likely not desirable.
89 </para>
90
91 <para>
92 &nbsp;
93 </para>
94 </listitem>
95 </itemizedlist>
96 </para>
97
98 <para>
99 <itemizedlist>
100 <listitem>
101 <para id='qa-issue-rpaths'>
102 <code>
103 package &lt;packagename&gt; contains bad RPATH &lt;rpath&gt; in file &lt;file&gt; [rpaths]
104 </code>
105 </para>
106
107 <para>
108 The specified binary produced by the recipe contains dynamic
109 library load paths (rpaths) that contain build system paths
110 such as
111 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>,
112 which are incorrect for the target and could potentially
113 be a security issue.
114 Check for bad <filename>-rpath</filename> options being
115 passed to the linker in your
116 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
117 log.
118 Depending on the build system used by the software being
119 built, there might be a configure option to disable rpath
120 usage completely within the build of the software.
121 </para>
122
123 <para>
124 &nbsp;
125 </para>
126 </listitem>
127 </itemizedlist>
128 </para>
129
130 <para>
131 <itemizedlist>
132 <listitem>
133 <para id='qa-issue-useless-rpaths'>
134 <code>
135 &lt;packagename&gt;: &lt;file&gt; contains probably-redundant RPATH &lt;rpath&gt; [useless-rpaths]
136 </code>
137 </para>
138
139 <para>
140 The specified binary produced by the recipe contains dynamic
141 library load paths (rpaths) that on a standard system are
142 searched by default by the linker (e.g.
143 <filename>/lib</filename> and <filename>/usr/lib</filename>).
144 While these paths will not cause any breakage, they do waste
145 space and are unnecessary.
146 Depending on the build system used by the software being
147 built, there might be a configure option to disable rpath
148 usage completely within the build of the software.
149 </para>
150
151 <para>
152 &nbsp;
153 </para>
154 </listitem>
155 </itemizedlist>
156 </para>
157
158 <para>
159 <itemizedlist>
160 <listitem>
161 <para id='qa-issue-file-rdeps'>
162 <code>
163 &lt;packagename&gt; requires &lt;files&gt;, but no providers in its RDEPENDS [file-rdeps]
164 </code>
165 </para>
166
167 <para>
168 A file-level dependency has been identified from the
169 specified package on the specified files, but there is
170 no explicit corresponding entry in
171 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>.
172 If particular files are required at runtime then
173 <filename>RDEPENDS</filename> should be declared in the
174 recipe to ensure the packages providing them are built.
175 </para>
176
177 <para>
178 &nbsp;
179 </para>
180 </listitem>
181 </itemizedlist>
182 </para>
183
184 <para>
185 <itemizedlist>
186 <listitem>
187 <para id='qa-issue-build-deps'>
188 <code>
189 &lt;packagename1&gt; rdepends on &lt;packagename2&gt;, but it isn't a build dependency? [build-deps]
190 </code>
191 </para>
192
193 <para>
194 A runtime dependency exists between the two specified
195 packages, but there is nothing explicit within the recipe
196 to enable the OpenEmbedded build system to ensure that
197 dependency is satisfied.
198 This condition is usually triggered by an
199 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
200 value being added at the packaging stage rather than up
201 front, which is usually automatic based on the contents of
202 the package.
203 In most cases, you should change the recipe to add an
204 explicit <filename>RDEPENDS</filename> for the dependency.
205 </para>
206
207 <para>
208 &nbsp;
209 </para>
210 </listitem>
211 </itemizedlist>
212 </para>
213
214 <para>
215 <itemizedlist>
216 <listitem>
217 <para id='qa-issue-dev-so'>
218 <code>
219 non -dev/-dbg/nativesdk- package contains symlink .so: &lt;packagename&gt; path '&lt;path&gt;' [dev-so]
220 </code>
221 </para>
222
223 <para>
224 Symlink <filename>.so</filename> files are for development
225 only, and should therefore go into the
226 <filename>-dev</filename> package.
227 This situation might occur if you add
228 <filename>*.so*</filename> rather than
229 <filename>*.so.*</filename> to a non-dev package.
230 Change
231 <link linkend='var-FILES'><filename>FILES</filename></link>
232 (and possibly
233 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>)
234 such that the specified <filename>.so</filename> file goes
235 into an appropriate <filename>-dev</filename> package.
236 </para>
237
238 <para>
239 &nbsp;
240 </para>
241 </listitem>
242 </itemizedlist>
243 </para>
244
245 <para>
246 <itemizedlist>
247 <listitem>
248 <para id='qa-issue-staticdev'>
249 <code>
250 non -staticdev package contains static .a library: &lt;packagename&gt; path '&lt;path&gt;' [staticdev]
251 </code>
252 </para>
253
254 <para>
255 Static <filename>.a</filename> library files should go into
256 a <filename>-staticdev</filename> package.
257 Change
258 <link linkend='var-FILES'><filename>FILES</filename></link>
259 (and possibly
260 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>)
261 such that the specified <filename>.a</filename> file goes
262 into an appropriate <filename>-staticdev</filename> package.
263 </para>
264
265 <para>
266 &nbsp;
267 </para>
268 </listitem>
269 </itemizedlist>
270 </para>
271
272 <para>
273 <itemizedlist>
274 <listitem>
275 <para id='qa-issue-libdir'>
276 <code>
277 &lt;packagename&gt;: found library in wrong location [libdir]
278 </code>
279 </para>
280
281 <para>
282 The specified file may have been installed into an incorrect
283 (possibly hardcoded) installation path.
284 For example, this test will catch recipes that install
285 <filename>/lib/bar.so</filename> when
286 <filename>${base_libdir}</filename> is "lib32".
287 Another example is when recipes install
288 <filename>/usr/lib64/foo.so</filename> when
289 <filename>${libdir}</filename> is "/usr/lib".
290 False positives occasionally exist.
291 For these cases add "libdir" to
292 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
293 for the package.
294 </para>
295
296 <para>
297 &nbsp;
298 </para>
299 </listitem>
300 </itemizedlist>
301 </para>
302
303 <para>
304 <itemizedlist>
305 <listitem>
306 <para id='qa-issue-debug-files'>
307 <code>
308 non debug package contains .debug directory: &lt;packagename&gt; path &lt;path&gt; [debug-files]
309 </code>
310 </para>
311
312 <para>
313 The specified package contains a
314 <filename>.debug</filename> directory, which should not
315 appear in anything but the <filename>-dbg</filename>
316 package.
317 This situation might occur if you add a path which contains
318 a <filename>.debug</filename> directory and do not
319 explicitly add the <filename>.debug</filename> directory
320 to the <filename>-dbg</filename> package.
321 If this is the case, add the <filename>.debug</filename>
322 directory explicitly to
323 <filename>FILES_${PN}-dbg</filename>.
324 See
325 <link linkend='var-FILES'><filename>FILES</filename></link>
326 for additional information on <filename>FILES</filename>.
327 </para>
328
329 <para>
330 &nbsp;
331 </para>
332 </listitem>
333 </itemizedlist>
334 </para>
335
336 <para>
337 <itemizedlist>
338 <listitem>
339 <para id='qa-issue-arch'>
340 <code>
341 Architecture did not match (&lt;machine_arch&gt; to &lt;file_arch&gt;) on &lt;file&gt; [arch]
342 </code>
343 </para>
344
345 <para>
346 By default, the OpenEmbedded build system checks the
347 Executable and Linkable Format (ELF) type, bit size, and
348 endianness of any binaries to ensure they match the
349 target architecture.
350 This test fails if any binaries do not match the type since
351 there would be an incompatibility.
352 The test could indicate that the wrong compiler or compiler
353 options have been used.
354 Sometimes software, like bootloaders, might need to
355 bypass this check.
356 If the file you receive the error for is firmware
357 that is not intended to be executed within the target
358 operating system or is intended to run on a separate
359 processor within the device, you can add "arch" to
360 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
361 for the package.
362 Another option is to check the
363 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
364 log and verify that the compiler options being used
365 are correct.
366 </para>
367
368 <para>
369 &nbsp;
370 </para>
371 </listitem>
372 </itemizedlist>
373 </para>
374
375 <para>
376 <itemizedlist>
377 <listitem>
378 <para id='qa-issue-arch-bit-size-no-match'>
379 <code>
380 Bit size did not match (&lt;machine_bits&gt; to &lt;file_bits&gt;) &lt;recipe&gt; on &lt;file&gt; [arch]
381 </code>
382 </para>
383
384 <para>
385 By default, the OpenEmbedded build system checks
386 the Executable and Linkable Format (ELF) type,
387 bit size, and endianness of any binaries to ensure
388 they match the target architecture.
389 This test fails if any binaries do not match the type since
390 there would be an incompatibility.
391 The test could indicate that the wrong compiler or compiler
392 options have been used.
393 Sometimes software, like bootloaders, might need to
394 bypass this check.
395 If the file you receive the error for is firmware that
396 is not intended to be executed within the target
397 operating system or is intended to run on a separate
398 processor within the device, you can add "arch" to
399 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
400 for the package.
401 Another option is to check the
402 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
403 log and verify that the compiler options being used are
404 correct.
405 </para>
406
407 <para>
408 &nbsp;
409 </para>
410 </listitem>
411 </itemizedlist>
412 </para>
413
414 <para>
415 <itemizedlist>
416 <listitem>
417 <para id='qa-issue-arch-endianness-no-match'>
418 <code>
419 Endianness did not match (&lt;machine_endianness&gt; to &lt;file_endianness&gt;) on &lt;file&gt; [arch]
420 </code>
421 </para>
422
423 <para>
424 By default, the OpenEmbedded build system checks
425 the Executable and Linkable Format (ELF) type, bit
426 size, and endianness of any binaries to ensure they
427 match the target architecture.
428 This test fails if any binaries do not match the type since
429 there would be an incompatibility.
430 The test could indicate that the wrong compiler or compiler
431 options have been used.
432 Sometimes software, like bootloaders, might need to
433 bypass this check.
434 If the file you receive the error for is firmware
435 that is not intended to be executed within the target
436 operating system or is intended to run on a separate
437 processor within the device, you can add "arch" to
438 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>
439 for the package.
440 Another option is to check the
441 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
442 log and verify that the compiler options being used
443 are correct.
444 </para>
445
446 <para>
447 &nbsp;
448 </para>
449 </listitem>
450 </itemizedlist>
451 </para>
452
453 <para>
454 <itemizedlist>
455 <listitem>
456 <para id='qa-issue-textrel'>
457 <code>
458 ELF binary '&lt;file&gt;' has relocations in .text [textrel]
459 </code>
460 </para>
461
462 <para>
463 The specified ELF binary contains relocations in its
464 <filename>.text</filename> sections.
465 This situation can result in a performance impact
466 at runtime.
467 </para>
468
469 <para>
470 Typically, the way to solve this performance issue is to
471 add "-fPIC" or "-fpic" to the compiler command-line
472 options.
473 For example, given software that reads
474 <link linkend='var-CFLAGS'><filename>CFLAGS</filename></link>
475 when you build it, you could add the following to your
476 recipe:
477 <literallayout class='monospaced'>
478 CFLAGS_append = " -fPIC "
479 </literallayout>
480 </para>
481
482 <para>
483 For more information on text relocations at runtime, see
484 <ulink url='http://www.akkadia.org/drepper/textrelocs.html'></ulink>.
485 </para>
486
487 <para>
488 &nbsp;
489 </para>
490 </listitem>
491 </itemizedlist>
492 </para>
493
494 <para>
495 <itemizedlist>
496 <listitem>
497 <para id='qa-issue-ldflags'>
498 <code>
499 No GNU_HASH in the elf binary: '&lt;file&gt;' [ldflags]
500 </code>
501 </para>
502
503 <para>
504 This indicates that binaries produced when building the
505 recipe have not been linked with the
506 <link linkend='var-LDFLAGS'><filename>LDFLAGS</filename></link>
507 options provided by the build system.
508 Check to be sure that the <filename>LDFLAGS</filename>
509 variable is being passed to the linker command.
510 A common workaround for this situation is to pass in
511 <filename>LDFLAGS</filename> using
512 <link linkend='var-TARGET_CC_ARCH'><filename>TARGET_CC_ARCH</filename></link>
513 within the recipe as follows:
514 <literallayout class='monospaced'>
515 TARGET_CC_ARCH += "${LDFLAGS}"
516 </literallayout>
517 </para>
518
519 <para>
520 &nbsp;
521 </para>
522 </listitem>
523 </itemizedlist>
524 </para>
525
526 <para>
527 <itemizedlist>
528 <listitem>
529 <para id='qa-issue-xorg-driver-abi'>
530 <code>
531 Package &lt;packagename&gt; contains Xorg driver (&lt;driver&gt;) but no xorg-abi- dependencies [xorg-driver-abi]
532 </code>
533 </para>
534
535 <para>
536 The specified package contains an Xorg driver, but does not
537 have a corresponding ABI package dependency.
538 The xserver-xorg recipe provides driver ABI names.
539 All drivers should depend on the ABI versions that they have
540 been built against.
541 Driver recipes that include
542 <filename>xorg-driver-input.inc</filename> or
543 <filename>xorg-driver-video.inc</filename> will
544 automatically get these versions.
545 Consequently, you should only need to explicitly add
546 dependencies to binary driver recipes.
547 </para>
548
549 <para>
550 &nbsp;
551 </para>
552 </listitem>
553 </itemizedlist>
554 </para>
555
556 <para>
557 <itemizedlist>
558 <listitem>
559 <para id='qa-issue-infodir'>
560 <code>
561 The /usr/share/info/dir file is not meant to be shipped in a particular package. [infodir]
562 </code>
563 </para>
564
565 <para>
566 The <filename>/usr/share/info/dir</filename> should not be
567 packaged.
568 Add the following line to your
569 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
570 task or to your <filename>do_install_append</filename>
571 within the recipe as follows:
572 <literallayout class='monospaced'>
573 rm ${D}${infodir}/dir
574 </literallayout>
575 </para>
576
577 <para>
578 &nbsp;
579 </para>
580 </listitem>
581 </itemizedlist>
582 </para>
583
584 <para>
585 <itemizedlist>
586 <listitem>
587 <para id='qa-issue-symlink-to-sysroot'>
588 <code>
589 Symlink &lt;path&gt; in &lt;packagename&gt; points to TMPDIR [symlink-to-sysroot]
590 </code>
591 </para>
592
593 <para>
594 The specified symlink points into
595 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
596 on the host.
597 Such symlinks will work on the host.
598 However, they are clearly invalid when running on
599 the target.
600 You should either correct the symlink to use a relative
601 path or remove the symlink.
602 </para>
603
604 <para>
605 &nbsp;
606 </para>
607 </listitem>
608 </itemizedlist>
609 </para>
610
611 <para>
612 <itemizedlist>
613 <listitem>
614 <para id='qa-issue-la'>
615 <code>
616 &lt;file&gt; failed sanity test (workdir) in path &lt;path&gt; [la]
617 </code>
618 </para>
619
620 <para>
621 The specified <filename>.la</filename> file contains
622 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
623 paths.
624 Any <filename>.la</filename> file containing these paths
625 is incorrect since <filename>libtool</filename> adds the
626 correct sysroot prefix when using the files automatically
627 itself.
628 </para>
629
630 <para>
631 &nbsp;
632 </para>
633 </listitem>
634 </itemizedlist>
635 </para>
636
637 <para>
638 <itemizedlist>
639 <listitem>
640 <para id='qa-issue-pkgconfig'>
641 <code>
642 &lt;file&gt; failed sanity test (tmpdir) in path &lt;path&gt; [pkgconfig]
643 </code>
644 </para>
645
646 <para>
647 The specified <filename>.pc</filename> file contains
648 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>/</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
649 paths.
650 Any <filename>.pc</filename> file containing these paths is
651 incorrect since <filename>pkg-config</filename> itself adds
652 the correct sysroot prefix when the files are accessed.
653 </para>
654
655 <para>
656 &nbsp;
657 </para>
658 </listitem>
659 </itemizedlist>
660 </para>
661
662 <para>
663 <itemizedlist>
664 <listitem>
665 <para id='qa-issue-debug-deps'>
666 <code>
667 &lt;packagename&gt; rdepends on &lt;debug_packagename&gt; [debug-deps]
668 </code>
669 </para>
670
671 <para>
672 A dependency exists between the specified non-dbg package
673 (i.e. a package whose name does not end in
674 <filename>-dbg</filename>) and a package that is a
675 <filename>dbg</filename> package.
676 The <filename>dbg</filename> packages contain
677 debug symbols and are brought in using several
678 different methods:
679 <itemizedlist>
680 <listitem><para>
681 Using the <filename>dbg-pkgs</filename>
682 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
683 value.
684 </para></listitem>
685 <listitem><para>
686 Using
687 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>.
688 </para></listitem>
689 <listitem><para>
690 As a dependency of another
691 <filename>dbg</filename> package that was brought
692 in using one of the above methods.
693 </para></listitem>
694 </itemizedlist>
695 The dependency might have been automatically added
696 because the <filename>dbg</filename> package erroneously
697 contains files that it should not contain (e.g. a
698 non-symlink <filename>.so</filename> file) or it might
699 have been added manually (e.g. by adding to
700 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>).
701 </para>
702
703 <para>
704 &nbsp;
705 </para>
706 </listitem>
707 </itemizedlist>
708 </para>
709
710 <para>
711 <itemizedlist>
712 <listitem>
713 <para id='qa-issue-dev-deps'>
714 <code>
715 &lt;packagename&gt; rdepends on &lt;dev_packagename&gt; [dev-deps]
716 </code>
717 </para>
718
719 <para>
720 A dependency exists between the specified non-dev package
721 (a package whose name does not end in
722 <filename>-dev</filename>) and a package that is a
723 <filename>dev</filename> package.
724 The <filename>dev</filename> packages contain development
725 headers and are usually brought in using several different
726 methods:
727 <itemizedlist>
728 <listitem><para>
729 Using the <filename>dev-pkgs</filename>
730 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
731 value.
732 </para></listitem>
733 <listitem><para>
734 Using
735 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>.
736 </para></listitem>
737 <listitem><para>
738 As a dependency of another
739 <filename>dev</filename> package that was brought
740 in using one of the above methods.
741 </para></listitem>
742 </itemizedlist>
743 The dependency might have been automatically added (because
744 the <filename>dev</filename> package erroneously contains
745 files that it should not have (e.g. a non-symlink
746 <filename>.so</filename> file) or it might have been added
747 manually (e.g. by adding to
748 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>).
749 </para>
750
751 <para>
752 &nbsp;
753 </para>
754 </listitem>
755 </itemizedlist>
756 </para>
757
758 <para>
759 <itemizedlist>
760 <listitem>
761 <para id='qa-issue-dep-cmp'>
762 <code>
763 &lt;var&gt;_&lt;packagename&gt; is invalid: &lt;comparison&gt; (&lt;value&gt;) only comparisons &lt;, =, &gt;, &lt;=, and &gt;= are allowed [dep-cmp]
764 </code>
765 </para>
766
767 <para>
768 If you are adding a versioned dependency relationship to one
769 of the dependency variables
770 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
771 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
772 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
773 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
774 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
775 or
776 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>),
777 you must only use the named comparison operators.
778 Change the versioned dependency values you are adding
779 to match those listed in the message.
780 </para>
781
782 <para>
783 &nbsp;
784 </para>
785 </listitem>
786 </itemizedlist>
787 </para>
788
789 <para>
790 <itemizedlist>
791 <listitem>
792 <para id='qa-issue-compile-host-path'>
793 <code>
794 &lt;recipename&gt;: The compile log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [compile-host-path]
795 </code>
796 </para>
797
798 <para>
799 The log for the
800 <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>
801 task indicates that paths on the host were searched
802 for files, which is not appropriate when cross-compiling.
803 Look for "is unsafe for cross-compilation" or "CROSS COMPILE
804 Badness" in the specified log file.
805 </para>
806
807 <para>
808 &nbsp;
809 </para>
810 </listitem>
811 </itemizedlist>
812 </para>
813
814 <para>
815 <itemizedlist>
816 <listitem>
817 <para id='qa-issue-install-host-path'>
818 <code>
819 &lt;recipename&gt;: The install log indicates that host include and/or library paths were used. Please check the log '&lt;logfile&gt;' for more information. [install-host-path]
820 </code>
821 </para>
822
823 <para>
824 The log for the
825 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
826 task indicates that paths on the host were searched
827 for files, which is not appropriate when cross-compiling.
828 Look for "is unsafe for cross-compilation"
829 or "CROSS COMPILE Badness" in the specified log file.
830 </para>
831
832 <para>
833 &nbsp;
834 </para>
835 </listitem>
836 </itemizedlist>
837 </para>
838
839 <para>
840 <itemizedlist>
841 <listitem>
842 <para id='qa-issue-autoconf-log'>
843 <code>
844 This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this. The path was '&lt;path&gt;'
845 </code>
846 </para>
847
848 <para>
849 The log for the
850 <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>
851 task indicates that paths on the host were searched
852 for files, which is not appropriate when cross-compiling.
853 Look for "is unsafe for cross-compilation" or
854 "CROSS COMPILE Badness" in the specified log file.
855 </para>
856
857 <para>
858 &nbsp;
859 </para>
860 </listitem>
861 </itemizedlist>
862 </para>
863
864 <para>
865 <itemizedlist>
866 <listitem>
867 <para id='qa-issue-pkgname'>
868 <code>
869 &lt;packagename&gt; doesn't match the [a-z0-9.+-]+ regex [pkgname]
870 </code>
871 </para>
872
873 <para>
874 The convention within the OpenEmbedded build system
875 (sometimes enforced by the package manager itself) is to
876 require that package names are all lower case
877 and to allow a restricted set of characters.
878 If your recipe name does not match this, or you add
879 packages to
880 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
881 that do not conform to the convention, then you
882 will receive this error.
883 Rename your recipe.
884 Or, if you have added a non-conforming package name to
885 <filename>PACKAGES</filename>, change the package name
886 appropriately.
887 </para>
888
889 <para>
890 &nbsp;
891 </para>
892 </listitem>
893 </itemizedlist>
894 </para>
895
896 <para>
897 <itemizedlist>
898 <listitem>
899 <para id='qa-issue-unknown-configure-option'>
900 <code>
901 &lt;recipe&gt;: configure was passed unrecognized options: &lt;options&gt; [unknown-configure-option]
902 </code>
903 </para>
904
905 <para>
906 The configure script is reporting that the specified
907 options are unrecognized.
908 This situation could be because the options
909 were previously valid but have been removed from the
910 configure script.
911 Or, there was a mistake when the options were added
912 and there is another option that should be used instead.
913 If you are unsure, consult the upstream build
914 documentation, the
915 <filename>./configure --help</filename> output,
916 and the upstream change log or release notes.
917 Once you have worked out what the appropriate
918 change is, you can update
919 <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
920 or the individual
921 <link linkend='var-PACKAGECONFIG'><filename>PACKAGECONFIG</filename></link>
922 option values accordingly.
923 </para>
924
925 <para>
926 &nbsp;
927 </para>
928 </listitem>
929 </itemizedlist>
930 </para>
931
932 <para>
933 <itemizedlist>
934 <listitem>
935 <para id='qa-issue-pn-overrides'>
936 <code>
937 Recipe &lt;recipefile&gt; has PN of "&lt;recipename&gt;" which is in OVERRIDES, this can result in unexpected behavior. [pn-overrides]
938 </code>
939 </para>
940
941 <para>
942 The specified recipe has a name
943 (<link linkend='var-PN'><filename>PN</filename></link>)
944 value that appears in
945 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
946 If a recipe is named such that its <filename>PN</filename>
947 value matches something already in
948 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
949 happens to be the same as
950 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
951 or
952 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
953 it can have unexpected consequences.
954 For example, assignments such as
955 <filename>FILES_${PN} = "xyz"</filename> effectively
956 turn into <filename>FILES = "xyz"</filename>.
957 Rename your recipe (or if <filename>PN</filename> is being
958 set explicitly, change the <filename>PN</filename> value) so
959 that the conflict does not occur.
960 See
961 <link linkend='var-FILES'><filename>FILES</filename></link>
962 for additional information.
963 </para>
964
965 <para>
966 &nbsp;
967 </para>
968 </listitem>
969 </itemizedlist>
970 </para>
971
972 <para>
973 <itemizedlist>
974 <listitem>
975 <para id='qa-issue-pkgvarcheck'>
976 <code>
977 &lt;recipefile&gt;: Variable &lt;variable&gt; is set as not being package specific, please fix this. [pkgvarcheck]
978 </code>
979 </para>
980
981 <para>
982 Certain variables
983 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
984 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
985 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
986 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
987 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
988 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
989 <link linkend='var-FILES'><filename>FILES</filename></link>,
990 <filename>pkg_preinst</filename>,
991 <filename>pkg_postinst</filename>,
992 <filename>pkg_prerm</filename>,
993 <filename>pkg_postrm</filename>, and
994 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>)
995 should always be set specific to a package (i.e. they
996 should be set with a package name override such as
997 <filename>RDEPENDS_${PN} = "value"</filename> rather than
998 <filename>RDEPENDS = "value"</filename>).
999 If you receive this error, correct any assignments to these
1000 variables within your recipe.
1001 </para>
1002
1003 <para>
1004 &nbsp;
1005 </para>
1006 </listitem>
1007 </itemizedlist>
1008 </para>
1009
1010 <para>
1011 <itemizedlist>
1012 <listitem>
1013 <para id='qa-issue-already-stripped'>
1014 <code>
1015 File '&lt;file&gt;' from &lt;recipename&gt; was already stripped, this will prevent future debugging! [already-stripped]
1016 </code>
1017 </para>
1018
1019 <para>
1020 Produced binaries have already been stripped prior to the
1021 build system extracting debug symbols.
1022 It is common for upstream software projects to default to
1023 stripping debug symbols for output binaries.
1024 In order for debugging to work on the target using
1025 <filename>-dbg</filename> packages, this stripping must be
1026 disabled.
1027 </para>
1028
1029 <para>
1030 Depending on the build system used by the software being
1031 built, disabling this stripping could be as easy as
1032 specifying an additional configure option.
1033 If not, disabling stripping might involve patching
1034 the build scripts.
1035 In the latter case, look for references to "strip" or
1036 "STRIP", or the "-s" or "-S" command-line options being
1037 specified on the linker command line (possibly
1038 through the compiler command line if preceded with "-Wl,").
1039 <note>
1040 Disabling stripping here does not mean that the final
1041 packaged binaries will be unstripped.
1042 Once the OpenEmbedded build system splits out debug
1043 symbols to the <filename>-dbg</filename> package,
1044 it will then strip the symbols from the binaries.
1045 </note>
1046 </para>
1047
1048 <para>
1049 &nbsp;
1050 </para>
1051 </listitem>
1052 </itemizedlist>
1053 </para>
1054
1055 <para>
1056 <itemizedlist>
1057 <listitem>
1058 <para id='qa-issue-packages-list'>
1059 <code>
1060 &lt;packagename&gt; is listed in PACKAGES multiple times, this leads to packaging errors. [packages-list]
1061 </code>
1062 </para>
1063
1064 <para>
1065 Package names must appear only once in the
1066 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
1067 variable.
1068 You might receive this error if you are attempting to add a
1069 package to <filename>PACKAGES</filename> that is
1070 already in the variable's value.
1071 </para>
1072
1073 <para>
1074 &nbsp;
1075 </para>
1076 </listitem>
1077 </itemizedlist>
1078 </para>
1079
1080 <para>
1081 <itemizedlist>
1082 <listitem>
1083 <para id='qa-issue-files-invalid'>
1084 <code>
1085 FILES variable for package &lt;packagename&gt; contains '//' which is invalid. Attempting to fix this but you should correct the metadata. [files-invalid]
1086 </code>
1087 </para>
1088
1089 <para>
1090 The string "//" is invalid in a Unix path.
1091 Correct all occurrences where this string appears in a
1092 <link linkend='var-FILES'><filename>FILES</filename></link>
1093 variable so that there is only a single "/".
1094 </para>
1095
1096 <para>
1097 &nbsp;
1098 </para>
1099 </listitem>
1100 </itemizedlist>
1101 </para>
1102
1103 <para>
1104 <itemizedlist>
1105 <listitem>
1106 <para id='qa-issue-installed-vs-shipped'>
1107 <code>
1108 &lt;recipename&gt;: Files/directories were installed but not shipped [installed-vs-shipped]
1109 </code>
1110 </para>
1111
1112 <para>
1113 Files have been installed within the
1114 <link linkend='ref-tasks-install'><filename>do_install</filename></link>
1115 task but have not been included in any package by way of the
1116 <link linkend='var-FILES'><filename>FILES</filename></link>
1117 variable.
1118 Files that do not appear in any package cannot be present in
1119 an image later on in the build process.
1120 You need to do one of the following:
1121 <itemizedlist>
1122 <listitem><para>
1123 Add the files to <filename>FILES</filename> for the
1124 package you want them to appear in (e.g.
1125 <filename>FILES_${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename> for the main
1126 package).
1127 </para></listitem>
1128 <listitem><para>
1129 Delete the files at the end of the
1130 <filename>do_install</filename> task if the files
1131 are not needed in any package.
1132 </para></listitem>
1133 </itemizedlist>
1134 </para>
1135
1136 <para>
1137 &nbsp;
1138 </para>
1139 </listitem>
1140 </itemizedlist>
1141 </para>
1142
1143 <para>
1144 <itemizedlist>
1145 <listitem>
1146 <para id='qa-issue-old-and-new-package-and-version-names'>
1147 <code>
1148 &lt;oldpackage&gt;-&lt;oldpkgversion&gt; was registered as shlib provider for &lt;library&gt;, changing it to &lt;newpackage&gt;-&lt;newpkgversion&gt; because it was built later
1149 </code>
1150 </para>
1151
1152 <para>
1153 This message means that both
1154 <filename>&lt;oldpackage&gt;</filename> and
1155 <filename>&lt;newpackage&gt;</filename> provide the specified
1156 shared library.
1157 You can expect this message when a recipe has been renamed.
1158 However, if that is not the case, the message might indicate
1159 that a private version of a library is being erroneously
1160 picked up as the provider for a common library.
1161 If that is the case, you should add the library's
1162 <filename>.so</filename> file name to
1163 <link linkend='var-PRIVATE_LIBS'><filename>PRIVATE_LIBS</filename></link>
1164 in the recipe that provides
1165 the private version of the library.
1166 </para>
1167 </listitem>
1168 </itemizedlist>
1169 </para>
1170
1171<!--
1172Here are some messages that might be documented in the future.
1173Right now we are not documenting them because the QA checks are not
1174enabled by default:
1175
1176 <para>
1177 <itemizedlist>
1178 <listitem><para>
1179 <literallayout class='monospaced'>
1180 Desktop file issue: &lt;error&gt; [desktop]
1181 </literallayout>
1182 NEED A DESCRIPTION AND SOLUTION
1183 </para></listitem>
1184 </itemizedlist>
1185 </para>
1186
1187 <para>
1188 <itemizedlist>
1189 <listitem><para>
1190 <literallayout class='monospaced'>
1191 &lt;packagename&gt;: &lt;file&gt;, installed in the base_prefix, requires a shared library under exec_prefix (&lt;exec_prefix&t;g) [unsafe-references-in-binaries]
1192 </literallayout>
1193 NEED A DESCRIPTION AND SOLUTION
1194 </para></listitem>
1195 </itemizedlist>
1196 </para>
1197
1198 <para>
1199 <itemizedlist>
1200 <listitem><para>
1201 <literallayout class='monospaced'>
1202 &lt;packagename&gt;: Found a reference to &lt;exec_prefix&gt;/ in &lt;path&gt; - Shell scripts in base_bindir and base_sbindir should not reference anything in exec_prefix [unsafe-references-in-scripts]
1203 </literallayout>
1204 NEED A DESCRIPTION AND SOLUTION
1205 </para></listitem>
1206 </itemizedlist>
1207 </para>
1208-->
1209</section>
1210
1211<section id='configuring-and-disabling-qa-checks'>
1212 <title>Configuring and Disabling QA Checks</title>
1213
1214 <para>
1215 You can configure the QA checks globally so that specific check
1216 failures either raise a warning or an error message, using the
1217 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
1218 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
1219 variables, respectively.
1220 You can also disable checks within a particular recipe using
1221 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
1222 For information on how to work with the QA checks, see the
1223 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
1224 section.
1225 <note><title>Tip</title>
1226 Please keep in mind that the QA checks exist in order to
1227 detect real or potential problems in the packaged output.
1228 So exercise caution when disabling these checks.
1229 </note>
1230 </para>
1231</section>
1232</chapter>
1233<!--
1234vim: expandtab tw=80 ts=4
1235-->