[CRIU] Compile errors with 4.18 kernels
Adrian Reber
adrian at lisas.de
Wed Jul 4 17:55:43 MSK 2018
On Fri, Jun 15, 2018 at 12:14:18AM -0700, Andrei Vagin wrote:
> On Thu, Jun 14, 2018 at 10:50:56PM +0100, Radostin Stoyanov wrote:
> > On 14/06/18 19:20, Adrian Reber wrote:
> > > As I see it also in travis (https://api.travis-ci.org/v3/job/392077603/log.txt)
> > > I guess it is known that currently compilation fails on early 4.18
> > > kernels.
> > >
> > > CC criu/pie/parasite.o
> > > In file included from /usr/include/asm/signal.h:7,
> > > from /usr/include/linux/signal.h:5,
> > > from /usr/include/linux/aio_abi.h:32,
> > > from criu/include/aio.h:4,
> > > from criu/pie/parasite.c:22:
> > > /usr/include/linux/time.h:10:8: error: redefinition of ‘struct timespec’
> > >
> > > (and more)
> > >
> > > Is this a bug in the kernel or does it need a fix in CRIU? Just curious
> > > if somebody is looking into it?
> > The problem comes from the commit below, which includes <linux/signal.h>
> > in linux/aio_abi.h
> >
> > https://github.com/torvalds/linux/commit/7a074e96dee62586c935c80cecd931431bfdd0be#diff-590a640c13a8f3a134e57b84f5c4fb79
> >
> > I will try to fix it and I will send a patch.
>
> I suggest to report this problem into lkml.
> Here is a minimal reproducer:
The fixes in Fedora rawhide I was talking about do not help. I have
taken your reproducer and reported it to lkml:
https://lore.kernel.org/lkml/20180704142116.GM17048@lisas.de/
> [root at b5766979408e /]# cat test.c
> #include <signal.h>
> #include <linux/aio_abi.h>
>
>
> int main()
> {
> return 0;
> }
>
>
> [root at b5766979408e /]# gcc -Wall test.c
> In file included from /usr/include/asm/signal.h:7,
> from /usr/include/linux/signal.h:5,
> from /usr/include/linux/aio_abi.h:32,
> from test.c:2:
> /usr/include/linux/time.h:10:8: error: redefinition of 'struct timespec'
> struct timespec {
> ^~~~~~~~
> In file included from /usr/include/signal.h:53,
> from test.c:1:
[skipped gcc complaining]
> [root at b5766979408e /]# cat /etc/redhat-release
> Fedora release 29 (Rawhide)
Adrian
More information about the CRIU
mailing list