Hi Ryan, On Fri, Jul 07, 2017 at 01:37:47PM +0100, Ryan Harkin wrote: > 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.
You can configure busybox via `make menuconfig`. The setpriv feature is located in "util-linux/setpriv", where you can either disable the setpriv applet completely or, optionally, just support for capabilities. Anyway -- the failure shouldn't occur at all. The included header is not even used as we're only using defines from <linux/capability.h> and prctl, which are provided by linux-headers and your libc implementation. I'll send a patch shortly. Thanks for noticing 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. Regards Patrick
signature.asc
Description: PGP signature
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
