ref-qa-checks.xml 49 KB

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