Re: Seeking advice on source of compilation errors in kernel header files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 29 Jun 2021 at 07:29, Vinod P <vpb20201973@xxxxxxxxxxx> wrote:
>
> Thanks Jonathan.
>
> I have pasted below a sample of the nature of errors we are seeing during compilation;

I suggested that it would be helpful to show "one or two examples of
the errors", not hundreds and hundreds of the same error, again and
again.


> I have removed segments which are proprietary and replaced with PROPRIETARY:
>
> ====================================
> BEGIN SAMPLE COMPILER LOG
> ====================================
> Makefile:53: Using kernel headers from /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include
> <PROPRIETARY>
> <PROPRIETARY>
> In file included from /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include/linux/kernel.h:15,
>                  from /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include/linux/list.h:9,
>                  from /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include/linux/module.h:9,
>                  from <PROPRIETARY>:41:
> /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include/linux/printk.h:145:24: error: expected declaration specifiers or ‘...’ before numeric constant
>  static inline __printf(1, 2) __cold
>                         ^

This suggests that your proprietary headers are defining a macro
called "__print" which interferes with the use of that name in the
kernel headers.



> /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include/linux/kernel.h: In function ‘do_exit’:
> /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include/linux/kernel.h:279:31: error: expected declaration specifiers before ‘__noreturn’
>  void do_exit(long error_code) __noreturn;
>                                ^~~~~~~~~~

This suggests that something has done #undef __noreturn, or you have
edited the file <linux/compiler_attributes.h> (or maybe put another
file with the same name in the include path, and so the correct one is
not being found).


> /usr/src/kernels/4.18.0-240.15.1.el8_3.x86_64/include/linux/kernel.h:322:18: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_kstrtoul’
>  int __must_check _kstrtoul(const char *s, unsigned int base, unsigned long *res);
>                   ^~~~~~~~~

Similarly here, for __must_check.

I think this is a problem in your proprietary driver headers, not a
problem with GCC.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux