Thanks Kent, that clarifies this issue for me.
So simply adding sel4_autoconf to target_link_libraries resolved my
problem, i.e.: created -I paths to include <autoconf> which in turn
includes <${library_name}/gen_config.h>
Chris

On Thu, Nov 5, 2020 at 1:40 PM Kent Mcleod <[email protected]> wrote:

> On Thu, Nov 5, 2020 at 1:15 PM Chris Koziarz
> <[email protected]> wrote:
> >
> > I'm creating a new project that uses existing libraries,
> > e.g. seL4_libs/libsel4utils, a header page_dma.h, because I want to use
> dma
> > in my IO transfer. When I include  header page_dma.h in question, at line
> > 15, <autoconf.h> is pulled in. There are 100s of  autoconf.h files
> (usually
> > auto-generated ones in kernel binaries) and I have no idea which one
> should
> > be included and how to setup -I option for gcc to include it. Can anyone
> > educate me on it? Thanks very much!
> > Chris
>
> Hi Chris,
>
> sel4_autoconf is the library in CMake that generates the autoconf.h
> and places it in the include path of any libraries or executables that
> add sel4_autoconf as a link dependency.
> sel4_autoconf is declared in the libsel4 CMakeLists.txt file and
> contains configuration options defined for libsel4 and the kernel
> only.  Historically, the autoconf.h would include configuration
> options for every library and app in the system, but this was changed
> to reduce the big set of mutual dependencies that it caused. Other
> apps and libraries that have build system config options usually
> declare a config library named: ${library_name}_Config which can also
> be added to link dependencies in order to include #include
> <${library_name}/gen_config.h>.
>
> Kent.
> >
> > ninja output:
> > [1/9] Building C object
> >
> apps/sel4test-driver/fat32-sel4/CMakeFiles/fat32-sel4.dir/src/interfaces/sel4.c.obj
> > FAILED:
> >
> apps/sel4test-driver/fat32-sel4/CMakeFiles/fat32-sel4.dir/src/interfaces/sel4.c.obj
> >
> > /usr/bin/ccache /usr/bin/aarch64-linux-gnu-gcc
> > --sysroot=/home/chris/sel4_test/tqma8xqp_build
> >  -I/home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/inc
> > -I/home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/config
> >
> -I/home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/../../../sel4_projects_libs/libsdhcdrivers/include/sdhc
> >
> -I/home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/../../../util_libs/libplatsupport/include
> >
> -I/home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/../../../util_libs/libutils/include
> > -Iapps/sel4test-driver/musllibc/build-temp/stage/include -march=armv8-a
> > -D__KERNEL_64__ -g   -nostdinc -fno-pic -fno-pie -fno-stack-protector
> > -fno-asynchronous-unwind-tables -ftls-model=local-exec -mstrict-align
> > -std=gnu11 -MD -MT
> >
> apps/sel4test-driver/fat32-sel4/CMakeFiles/fat32-sel4.dir/src/interfaces/sel4.c.obj
> > -MF
> >
> apps/sel4test-driver/fat32-sel4/CMakeFiles/fat32-sel4.dir/src/interfaces/sel4.c.obj.d
> > -o
> >
> apps/sel4test-driver/fat32-sel4/CMakeFiles/fat32-sel4.dir/src/interfaces/sel4.c.obj
> >   -c
> >
> /home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/src/interfaces/sel4.c
> > In file included from
> >
> /home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/src/interfaces/sel4.c:12:
> >
> /home/chris/sel4_test/projects/sel4test/apps/fat32-sel4/src/interfaces/../../../../../seL4_libs/libsel4utils/include/sel4utils/page_dma.h:15:10:
> > fatal error: autoconf.h: No such file or directory
> >    15 | #include <autoconf.h>
> > _______________________________________________
> > Devel mailing list
> > [email protected]
> > https://sel4.systems/lists/listinfo/devel
>
_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to