[Buildroot] nano package fail to build; cannot include curses.h
thomas.petazzoni at bootlin.com
Sat May 9 14:27:22 UTC 2020
On Sat, 9 May 2020 09:43:44 -0400
William Tambe <tambewilliam at gmail.com> wrote:
> > In any case, since we don't have access to your toolchain, we have no
> > way to reproduce/investigate. On other architectures, nano builds fine.
> My issue seems to be that it is not able to find curses.h headers
> which buildroot already installed at the following path:
> Using something like this in nano.mk didn't help either:
> NANO_MAKE_ENV += \
> $(TARGET_MAKE_ENV) \
> CFLAGS="$(TARGET_CFLAGS) -I$(HOST_DIR)/include/ncurses"
This is terribly wrong: you are point to the headers of host libraries,
while cross-compiling code for the target.
> Any other suggestion I could try in debugging the issue I am having ?
Can we have access to your "iron" toolchain to reproduce ?
Normally, the way it works is that Buildroot generates a toolchain
wrapper, which calls your toolchain "gcc" after adding
--sysroot=$(STAGING_DIR), and therefore, gcc should automatically find
headers in $(STAGING_DIR)/usr/include.
I'd suggest to create a simple C file with just #include <ncurses.h>,
and try to build it with $(HOST_DIR)/bin/iron-...-gcc. If that doesn't
work, pass BR2_DEBUG_WRAPPER=2 when calling gcc, and check what gets
passed to the gcc of your toolchain.
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
More information about the buildroot