[Buildroot] Analysis of build failures

Ezequiel García ezequiel at vanguardiasur.com.ar
Fri Feb 7 14:53:17 UTC 2014


On 7 February 2014 09:53, Thomas Petazzoni
<thomas.petazzoni at free-electrons.com> wrote:
[..]
>
>>      nios2 |                      lxc-0.9.0 | NOK | http://autobuild.buildroot.net/results/f592a011321429426be81bd1ecf664ad9a2c0161/
>
> Duplicate declaration of setns() :
>
> attach.c:54:12: error: static declaration of 'setns' follows non-static declaration
> In file included from /home/test/test/1/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/include/sched.h:42:0,
>                  from namespace.h:27,
>                  from attach.c:43:
> /home/test/test/1/output/host/usr/nios2-buildroot-linux-gnu/sysroot/usr/include/bits/sched.h:92:12: note: previous declaration of 'setns' was here
> make[4]: *** [liblxc_so-attach.o] Error 1
>
> Ezequiel ?
>

I guess setns is getting problematic today. Problem is this chunk of lxc's code:

#ifndef HAVE_SETNS
static int setns(int fd, int nstype)
{
#ifdef __NR_setns
return syscall(__NR_setns, fd, nstype);
#else
errno = ENOSYS;
return -1;
#endif
}
#endif

We need a way to set HAVE_SETNS. I've found a similar fix here:

http://buildroot-busybox.2317881.n4.nabble.com/git-commit-iproute2-fix-build-with-toolchains-providing-setns-2-td33940.html

I'll see if I can find a suitable fix for lxc. Help is welcome though.
-- 
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar


More information about the buildroot mailing list