[Buildroot] nano package fail to build; cannot include curses.h

Thomas Petazzoni thomas.petazzoni at bootlin.com
Sat May 9 20:36:07 UTC 2020

On Sat, 9 May 2020 16:08:15 -0400
William Tambe <tambewilliam at gmail.com> wrote:

> Adjusting above NANO_MAKE_ENV, I am able to get a successfully
> compilation using:
>        CFLAGS="$(TARGET_CFLAGS) -I$(STAGING_DIR)/usr/include"
> Not sure if above is still terribly wrong.

It is a lot less wrong in the sense that $(STAGING_DIR) contains
libraries built for the target. However, it is still weird, because
$(STAGING_DIR)/usr/include should be in the standard search path of
headers of your cross-compiler. If not, you will have *LOTS* of build
failures, with many packages.

> Toolchain wrapper was called with:
>     'host/bin/iron-elf-gcc'
>     'test.c'
>     '-v'
> Toolchain wrapper executing:
>     '/opt/iron-toolchain/bin/iron-elf-gcc'
>     '--sysroot'
>     '/buildroot-build/host/iron-buildroot-linux-gnu/sysroot'

See, we're passing a --sysroot option here, so
should be in the search path for headers.

> GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
> ignoring nonexistent directory
> "/opt/iron-toolchain/lib/gcc/iron-elf/9.2.0/../../../../iron-elf/sys-include"
> #include "..." search starts here:
> #include <...> search starts here:
>  /opt/iron-toolchain/lib/gcc/iron-elf/9.2.0/include
>  /opt/iron-toolchain/lib/gcc/iron-elf/9.2.0/include-fixed
>  /opt/iron-toolchain/lib/gcc/iron-elf/9.2.0/../../../../iron-elf/include

But it is not. Again, this really looks like a bare metal compiler. I
think your compiler port for this (new?) CPU architecture is not
completely correct. Please compare the results with a known-working ARM
cross-compiler for example.

Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering

More information about the buildroot mailing list