0

I managed to compile the Ubuntu 5,15 linux kernel with Eclipse 2022,09, Ubuntu kernel link

I followed The Eclipse Kernel instructions

The kernel is correctly compiled BUT In some files I’m getting “Unresolved inclusion:< …. .h>

This seems to show that the problem is due to Eclipse, NOT the compiler. The indexer is not finding some include library (like #include <inttypes.h> in mkpiggy.c)

I have a DEADLOCK:

I wondering HOW to solve the problem:

-for the Eclipse kernel instructions above, we must NOT INCLUDE Preprocessor Include Paths and Paths and Symbols to consider the standard include directory
-for the Indexer, considering that some include file are NOT present in the linux project tree, we must DO INCLUDE Preprocessor Include Paths and Paths and Symbols to consider the standard include directory

The PROBLEM seems to BE in the same Eclipse INSTRUCTIONS for the Linux kernel, that is preventing the system to look for standard system library:
“ The kernel is a free-standing environment by ISO C99 definition. That is, it does not want to be polluted, and obviously cannot work with, the "host" header files and libraries.
...
Rationale for this step: -nostdinc already asked gcc to not search the standard system directories for header files. But the Linux Kernel depends on GCC-provided "freestanding environment" headers like stdarg.h, stdbool.h and so on, which are typically hosted by GCC under /usr/lib/gcc///include.”

The solutions for the indexer, that are forcing to act on Preprocessor Include Paths and Paths and Symbols, are the following: "Unresolved inclusion" error with Eclipse CDT for C standard library headers

https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_sd.htm

https://help.eclipse.org/latest/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Freference%2Fcdt_u_prop_general_sd_entries.htm

Are there any other solutions compatible with the Eclipse linux kernel instructions ?

howlger
  • 31,050
  • 11
  • 59
  • 99
Giuliano69
  • 11
  • 4
  • `BUT In some file` which files? `The kernel is a free-standing environment by ISO C99 definition` yes, but unit tests _are_ compiled on the host in normal environment with normal compiler. – KamilCuk Jan 02 '23 at 10:06
  • mkpiggy.c the “FILE” type definition; uvc_video.c, the “false” symbol definition ; uvc_ctrl.c, the “true” symbol definition. The **-nostdinc** is mandatory, because in a cross compiling situation there must be NO relation on which include files are available on the host system. The compiler compiles perfectly. The problem is with the indexer (the "unresolved" shows a problem with indexer, _not_ the compiler). IF I would change the general setting, it would help the indexer but would fail the compiler.... – Giuliano69 Jan 02 '23 at 11:10
  • `mkpiggy.c` is a program written for the host to generate assembly wrapper. It even has `main()`. It's not part of the kernel. `uvc_video.c, the “false” symbol definition` yup, that looks valid, if so, ignore me. – KamilCuk Jan 02 '23 at 11:12

0 Answers0