header-filesncursesarchlinuxbusybox

Busybox build fails with ncurses header not found in archlinux (spoiler: i already have ncurses package)


I am trying to build busybox from source, installed all the necessary dependencies, but build fails every time with ncurses header not found err.


OS: Arch Linux x86_64 (On docker: archlinux image)
Kernel: 6.8.9-arch1-2
Shell: bash 5.2.21
Packages Installed: bzip2 git make gcc ncurses flex bison bc cpio libelf openssl

Source: git clone --depth 1 https://git.busybox.net/busybox
Build cmd: cd busybox && make menuconfig

Expected behaviour: a configuration gui opens
Actual behaviour:
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***  
*** Install ncurses (ncurses-devel) and try again.
***  
make[2]: *** [/home/sysmount/busybox/scripts/kconfig/lxdialog/Makefile:15: scripts/kconfig/lxdialog/dochecklxd
ialog] Error 1
make[1]: *** [/home/sysmount/busybox/scripts/kconfig/Makefile:14: menuconfig] Error 2
make: *** [Makefile:444: menuconfig] Error 2

since archlinux bundles header files with base 'ncurses' package, then this shouldn't be happening.


Solution

  • For me, it was simple :)

    $ nano scripts/kconfig/lxdialog/Makefile
    

    and hash out this line:

    always         := $(hostprogs-y) dochecklxdialog