Error cross-compiling daemon-main.cc of AllJoyn15.04a on Ubuntu for ARM

asked 2015-08-13 16:30:42 -0700

vram gravatar image

updated 2015-08-14 15:36:47 -0700

ry.jones gravatar image
Linux Foundation Staff
**scons: done reading SConscript files.
scons: Building targets ...
        [CXX]     alljoyn_core/router/posix/daemon-main.cc
alljoyn_core/router/posix/daemon-main.cc:66:28: fatal error: sys/capability.h: No such file or directory
compilation terminated.**

I tried the fix

sudo apt-get install libcap-dev

as suggested here :


But it still fails. I didn't have this problem with 14.06a.

Any pointers would be greatly appreciated. Thanks Ram

edit retag flag offensive close merge delete


Thanks,Ry for the quick response. I used this: scons OS=linux CPU=arm WS=off BINDINGS="cpp"

vram ( 2015-08-13 16:53:23 -0700 )edit

so you are trying to cross-compile for an arm target, then? or are you building on an arm board?

ry.jones ( 2015-08-13 17:04:11 -0700 )edit

yes I am cross-compiling for ARM target. I was able to do it for 14.06a few months back . But now I need to upgrade to 15.04a and that's when I run into issues. I wonder if this difference in daemon-main.cc matters! (14.06a) #include <linux capability.h=""> (15.04a) #include <sys capability.h="">

vram ( 2015-08-13 17:11:48 -0700 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-08-14 13:14:04 -0700

stevek gravatar image

updated 2015-08-17 11:13:51 -0700

Please note that scons CPU=arm OS=linux is not supported and is not tested nor guaranteed to work. See the following 2 posts for details and alternatives:



Note, that you will need the libcap development libraries and header files for your cross-compilation environment, simply installing libcap-dev on an Ubuntu host will only install the header files for building for Ubuntu.

edit flag offensive delete publish link more


Thanks, Steve for these useful pointers. I did try with openwrt option. I downloaded libcap source file and point to the header file. While the above error is gone, I am still unable to do the final linking. This is because libcap is not built for ARM.

vram ( 2015-08-20 19:06:42 -0700 )edit

scons: Building targets ... [LINK] build/openwrt/openwrt/release/obj/alljoyn_core/router/posix/alljoyn-daemon /local/...../lib/gcc/arm-none-linux-gnueabi/4.6.3/libcap.so: file not recognized: File format not recognized I modified makefile to build for ARM compiler. It fails. Any tips?

vram ( 2015-08-20 19:12:00 -0700 )edit

@vram, I've never built libcap myself. You want to check with that project about cross compiling it. If it is like many open source projects that use autoconf, you probably need to tell the ./configure script about your cross-compiler. Modifying the Makefile directly is unlikely to work well.

stevek ( 2015-08-21 11:53:58 -0700 )edit

@vram Could you please provide the link to download libcap

johansaji ( 2015-08-25 09:28:10 -0700 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-08-13 16:30:42 -0700

Seen: 611 times

Last updated: Aug 17 '15