[PATCH v3 2/6] setpriv: dump inheritable capability set

Ryan Harkin ryan.harkin at linaro.org
Fri Jul 7 12:37:47 UTC 2017


Hi Patrick/all,

I've just updated to the latest BusyBox source and compilation has
failed. "git bisect" blamed this patch for the failure.

Unfortunately, I have only just subscribed to the mailing list, so
this isn't a proper reply to the patch email. For reference, this is
the patch I'm referring to:

    http://lists.busybox.net/pipermail/busybox/2017-July/085581.html

The error I see is:

  CC      util-linux/setpriv.o
/linaro/platforms/busybox/util-linux/setpriv.c:84:28: fatal error:
sys/capability.h: No such file or directory
 #include <sys/capability.h>
                            ^
compilation terminated.
/linaro/platforms/busybox/scripts/Makefile.build:197: recipe for
target 'util-linux/setpriv.o' failed
make[2]: *** [util-linux/setpriv.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/linaro/platforms/busybox/Makefile:742: recipe for target 'util-linux' failed
make[1]: *** [util-linux] Error 2
Makefile:112: recipe for target 'install' failed
make: *** [install] Error 2

I can see that your patch includes sys/capability.h if
ENABLE_FEATURE_SETPRIV_CAPABILITIES is defined. And that you are
creating a new config called FEATURE_SETPRIV_CAPABILITIES which is
enabled by default, so I can see why it's failing for me. However, I
don't know how to fix the failure.

This is how I build BusyBox:

export ARCH=arm
export CROSS_COMPILE=<path to arm-linux-gnueabihf-* v6.2.1>
mkdir -p $BUSYBOX_OUT_DIR
make O=$BUSYBOX_OUT_DIR defconfig
sed -i 's/# CONFIG_STATIC is not set/CONFIG_STATIC=y/g' $BUSYBOX_OUT_DIR/.config
make O=$BUSYBOX_OUT_DIR -j $PARALLELISM install

A web search around the topic implies that installing libcap-dev will
resolve the dependency, but this doesn't help on my Ubuntu 16.04 LTS
system. It does install /usr/include/sys/capability.h, so it's doing
something. However, as I'm cross compiling, perhaps there is an extra
make param I need to add or something else I need to install? The
build works if I compile native for my x86_64 machine.

So I'm at a loss on how to proceed from there. Any help would be appreciated.

Regards,
Ryan.


More information about the busybox mailing list