PacktPublishing / Mastering-Embedded-Linux-Programming-Third-Edition

Mastering Embedded Linux Programming Third Edition, published by Packt
MIT License
541 stars 153 forks source link

Bitbake cannot find libcap #77

Open ssooffiiaannee opened 1 month ago

ssooffiiaannee commented 1 month ago

OS : Ubuntu 20.04

In "Capturing changes with devtool", page 219 :

  1. To build your new recipe, use the following command:

devtool build bubblewrap

I get the following error :

configure: error: *** POSIX caps headers not found | NOTE: The following config.log files may provide further information. | NOTE: /home/sofiane/Desktop/linux_stuff/build-mine/tmp/work/core2-64-poky-linux/bubblewrap/0.4.1-r0/bubblewrap-0.4.1/config.log | ERROR: configure failed | WARNING: exit code 1 from a shell command. | ERROR: Execution of '/home/sofiane/Desktop/linux_stuff/build-mine/tmp/work/core2-64-poky-linux/bubblewrap/0.4.1-r0/temp/run.do_configure.2828531' failed with exit code 1 ERROR: Task (/home/sofiane/Desktop/linux_stuff/build-mine/workspace/recipes/bubblewrap/bubblewrap_0.4.1.bb:do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 535 tasks of which 534 didn't need to be rerun and 1 failed.

I already tried installing libcap :

sudo apt-get install libcap-dev

And it seems I already have it :

ldconfig -p |grep libcap libcap.so.2 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcap.so.2 libcap.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libcap.so fdlibcap-ng.so.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libcap-ng.so.0

ssooffiiaannee commented 1 month ago

it turns out I had to add DEPENDS = "libcap bash-completion" to bubblewrap0.4.1.bb. And I later ran into another problem : I had to replace FILES${PN} with FILES:${PN} : source

fvasquez commented 1 month ago

it turns out I had to add DEPENDS = "libcap bash-completion" to bubblewrap0.4.1.bb. And I later ran into another problem : I had to replace FILES${PN} with FILES:${PN} : source

Thank you, @ssooffiiaannee. I will add this to the errata.