make menuconfig problem on NixOS

Laurent Bercot ska-dietlibc at skarnet.org
Sun Oct 6 18:53:56 UTC 2024


>
>What could be the problem here? Because I think that I have installed 
>ncurses already by specifying it as a flake package. And why
>  can't I open menuconfig in the busybox repo, but I can open it in the 
>linux kernel repo? Thanks!

  lxdialog relies on a pkg-config program being in the PATH in order to
get the correct compiler and linker flags for ncurses. If it doesn't
find such a program, it hardcodes looking for ncurses under /usr, which
of course doesn't work for Nix.

  Recent versions of the Linux kernel have changed the invocation of
pkg-config to be customizable via the HOSTPKG_CONFIG variable. I
suspect Nix uses this variable to control stuff built with Kconfig.

  But busybox uses a version of Kconfig that predates that change, and
hardcodes the call to pkg-config (look at
scripts/kconfig/lxdialog/check-lxdialog.sh, as opposed to
scripts/kconfig/mconf-cfg.sh in a recent Linux kernel).

  Nix should be able to accommodate a hardcoded call to pkg-config, by
setting all the necessary variables in the current environment, but
my guess is that they don't bother and use HOSTPKG_CONFIG instead, which
does not work for busybox's Kconfig.

--
  Laurent



More information about the busybox mailing list