When preparing a savedconfig for sys-apps/toybox by running make menuconfig an error was encountered relating to the curses library not being found. Reproducible: Always Steps to Reproduce: 1. emerge --fetchonly =sys-apps/toybox-0.8.10 2. tar xzf /var/cache/distfiles/toybox-0.8.10.tar.gz 3. cd toybox-0.8.10 4. make menuconfig Actual Results: make menuconfig cc -o kconfig/mconf kconfig/mconf.c kconfig/zconf.tab.c \ kconfig/lxdialog/*.c -lcurses -DCURSES_LOC="<ncurses.h>" \ -DKBUILD_NO_NLS=1 -DPROJECT_NAME=\"ToyBox\" /usr/libexec/gcc/x86_64-pc-linux-gnu/ld: cannot find -lcurses: No such file or directory collect2: error: ld returned 1 exit status make: *** [kconfig/Makefile:72: kconfig/mconf] Error 1 Expected Results: Command enters menuconfig interface. A trivial patch changing -lcurses to -lcurses -ltinfo solves the issue.
Created attachment 884647 [details, diff] patch to permit make menuconfig
Correction to description: A trivial patch changing -lcurses to -lncurses -ltinfo solves the issue.
Commented at https://github.com/landley/toybox/pull/332#issuecomment-1936917705 to explain the situation.
(In reply to hairu from comment #2) > Correction to description: > > A trivial patch changing -lcurses to -lncurses -ltinfo solves the issue. It should be using pkg-config.
> It should be using pkg-config. Yes, to follow what Linux kernel's build system does. Upstream won't accept attached patch because it will probably break other OS/embedded targets and they won't want an extra dep that the PR brings. However, should Gentoo patch it in even though portage won't hit this issue installing sys-apps/toybox? This is only triggered if building from source and accessing menuconfig.
(In reply to Joe Kappus from comment #5) > > It should be using pkg-config. > > Yes, to follow what Linux kernel's build system does. Upstream won't accept > attached patch because it will probably break other OS/embedded targets and > they won't want an extra dep that the PR brings. > I did comment on the PR and I suspect that's somewhat bogus. > However, should Gentoo patch it in even though portage won't hit this issue > installing sys-apps/toybox? This is only triggered if building from source > and accessing menuconfig. We should patch it in, where the patch uses pkg-config, yes.
(In reply to Sam James from comment #6) > We should patch it in, where the patch uses pkg-config, yes. (although ofc it wouldn't have actually helped with the original reproduction instructions, it would with "ebuild ... clean prepare" then menuconfig.)
Good points. Essentially, a potential embedded gentoo built with crossdev would only require a compile machine to have pkg-config installed. This said, an ebuild wouldn't usually hit this bug because menuconfig is not used. I agree with "ebuild ... clean prepare" being the way to go, along with a notice from the ebuild with instructions to do so for menuconfig.