0

I am new to Yocto and the BitBake "eco system".

In order to try and search for a solution to my probelm I went over the following, YET, as of my understanding, the symptom is similar (or identical) BUT the situation there is different:

First similar scenario

second similar scenario

What I wish to achive is to create an image without the header files of gcc under /usr/lib64/${TARGET_SYS}/${BINV}/include. In order to do that, what I did is "overriding" the do_install_append() method of the gcc_9.2.bb recipe by "adding" to it the removal of the irrelevant files by performing: rm -rf ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include and rm -rf ${D}${gcclibdir}/${TARGET_SYS}/${BINV}/include-fixed at the very end of this function (thus removing all files from the include and include-fixed folders).

This works fine for me (when I load the resulting image I do not see header files of gcc I used to see before). Neverthelss, what I still see (have) on the image are files related to the gcc-sanitizers_9.2.bb recipe which are under the folder (in the final image): /usr/lib64/${TARGET_SYS}/${BINV}/include/sanitizer:

Which are: asan_interface.h common_interface_defs.h lsan_interface.h tsan_interface.h

What I did to remove these files (all 4 of them) is removing them in the do_install_append() of my "derived" gcc-sanitzers_9.2.bbappend recipe, like so:

do_install_append () {
    rm -rf ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/sanitizer/
}

Now in this case, i.e. - there are both my derived gcc_9.2.bbappend and gcc-sanitzers_9.2.bbappend with the respective functions implementation (as described above), I get the following error:

ERROR: gcc-sanitizers-9.2.0-r0 do_package: QA Issue: gcc-sanitizers: Files/directories were installed but not shipped in any package: /usr/lib64/gcc/include

Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install. gcc-sanitizers: 4 installed and not shipped files. [installed-vs-shipped]

What I'm confused about is that if an error is to raise, I would expect an error "the other way around", meaning something like:"Files/directories are NOT installed but are about to be shipped in the package..." (again, this is an hypothetic error message of mine).

What am I missing here? How can I achive my goal of not having the header files (and only them) in my final image?

Guy Avraham
  • 3,482
  • 3
  • 38
  • 50

0 Answers0