Latest Git kernel doesn't compile because of the LINUX_VERSION_CODE issue

Masahiro Yamada masahiroy at kernel.org
Sun Feb 28 02:42:34 AEDT 2021


On Sat, Feb 27, 2021 at 4:34 PM Christophe Leroy
<christophe.leroy at csgroup.eu> wrote:
>
>
> Le 27/02/2021 à 08:13, Christian Zigotzky a écrit :
> > Hello Christophe,
> >
> > Thanks a lot for compiling the latest git kernel.
> >
> > I have solved the compiling issue through setting up a value for the SUBLEVEL variable in
> > "a/Makefile". Before it wasn't necessary to set up a value for the SUBLEVEL variable.
>
> I see, so it is a regression introduced by commit 9b82f13e7ef3 ("kbuild: clamp SUBLEVEL to 255").
>
> In the past there had already been such a regression at some point, which had then been fixed by
> commit cacd54ef49b7 ("kbuild: Fix KERNELVERSION for empty SUBLEVEL or PATCHLEVEL")
>
> Sasha, can you fix it ?



Thanks for catching this.

I submitted a patch:
https://lore.kernel.org/patchwork/patch/1385119/






> Thanks
> Christophe
>
>
> >
> > Cheers,
> > Christian
> >
> > On 26 February 21 at 5:10 pm, Christophe Leroy wrote:
> >>
> >>
> >> Le 26/02/2021 à 13:34, Christian Zigotzky a écrit :
> >>> Hello,
> >>>
> >>> I tried to compile the latest Git kernel today. Unfortunately it doesn't compile.
> >>
> >> I have no such problem with latest git kernel.
> >>
> >> Christophe
> >>
> >>>
> >>> Error messages:
> >>>
> >>>    CC      arch/powerpc/kernel/udbg_16550.o
> >>> In file included from ./include/linux/stackprotector.h:10:0,
> >>>                   from arch/powerpc/kernel/smp.c:35:
> >>> ./arch/powerpc/include/asm/stackprotector.h: In function ‘boot_init_stack_canary’:
> >>> ./arch/powerpc/include/asm/stackprotector.h:29:30: error: expected expression before ‘;’ token
> >>>    canary ^= LINUX_VERSION_CODE;
> >>>                                ^
> >>> scripts/Makefile.build:271: recipe for target 'arch/powerpc/kernel/smp.o' failed
> >>> make[2]: *** [arch/powerpc/kernel/smp.o] Error 1
> >>>
> >>> ----
> >>>
> >>> drivers/media/cec/core/cec-api.c: In function ‘cec_adap_g_caps’:
> >>> drivers/media/cec/core/cec-api.c:85:35: error: expected expression before ‘;’ token
> >>>    caps.version = LINUX_VERSION_CODE;
> >>>
> >>> ----
> >>>
> >>> I have found the bad commit. It's "Merge tag 'kbuild-v5.12' of
> >>> git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild" [1]
> >>>
> >>> The changes in the Makefile (a/Makefile) are responsible for the compiling errors. [2]
> >>>
> >>> I was able to revert this bad commit. After that it compiled without any problems.
> >>>
> >>> Could you please compile the latest Git kernel and confirm this issue?
> >>>
> >>> Thanks,
> >>> Christian
> >>>
> >>> [1]
> >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=6fbd6cf85a3be127454a1ad58525a3adcf8612ab
> >>>
> >>> [2]
> >>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/Makefile?id=6fbd6cf85a3be127454a1ad58525a3adcf8612ab
> >>>



-- 
Best Regards
Masahiro Yamada


More information about the Linuxppc-dev mailing list